Compare commits

...

36 Commits

Author SHA1 Message Date
erwanlr
abdf285c69 Bumps version 2019-01-11 11:53:11 +00:00
erwanlr
fd4da23d4f Creates simplecov exetrnal config 2019-01-11 11:13:49 +00:00
erwanlr
bb8f58c83b Updates deps 2019-01-11 11:12:34 +00:00
erwanlr
077da6ae86 Moves require spec_helper to config file 2019-01-11 11:11:56 +00:00
erwanlr
d5222d7e9a Adds DFs 2019-01-07 14:58:03 +00:00
erwanlr
01702c127b Tries to fix Travis again 2019-01-07 11:47:58 +00:00
Erwan
87902cbfb4 Tries to fix Travis builds 2019-01-07 10:54:05 +00:00
ethicalhack3r
fcaa393ffe Update license 2019-01-07 10:54:24 +01:00
ethicalhack3r
18bac6e792 Update to Ruby 2.6.0 2019-01-07 10:16:32 +01:00
erwanlr
9a21efebe3 Updates DFs 2018-12-28 22:50:05 +00:00
erwanlr
357182ef17 Adds DFs 2018-12-28 22:43:41 +00:00
erwanlr
5fad540a4c Bumps version 2018-12-28 13:35:01 +00:00
erwanlr
c1fc153420 Updates Deps, ref #1266 2018-12-28 11:17:37 +00:00
erwanlr
73a1974f85 Bumps version 2018-12-13 22:16:45 +00:00
erwanlr
dec73c21b6 Fixes #1264 2018-12-13 22:11:37 +00:00
erwanlr
46a00cc864 Adds DFs 2018-12-07 14:59:03 +00:00
erwanlr
62455be165 Deletes useless specs 2018-12-06 22:54:17 +00:00
erwanlr
17ef5ef918 Reverts spec changes 2018-12-06 22:52:10 +00:00
erwanlr
922b6fffd0 Fixes specs 2018-12-06 21:46:13 +00:00
erwanlr
b47bf006d0 Removes useless spec 2018-12-06 21:44:54 +00:00
erwanlr
d60269f4bc Adds DFs 2018-12-06 21:41:00 +00:00
erwanlr
1ce057a78e Adds DFs 2018-12-06 15:54:15 +00:00
erwanlr
a0fe04b990 Fixes #1260 2018-12-06 02:51:23 +00:00
erwanlr
31c9172e19 Removes false positive DFs 2018-12-03 15:37:09 +00:00
erwanlr
7f23cbef71 Adds DFs 2018-12-03 15:08:56 +00:00
Ryan Dewhurst
4884defaed Add some references to interesting findings 2018-11-22 15:04:43 +01:00
erwanlr
3039218c40 Adds DFs 2018-11-18 11:45:58 +00:00
erwanlr
8bbc2f32ae Bumps version 2018-11-12 16:11:14 +00:00
erwanlr
4ca46ab3ba Fixes #1241 2018-11-12 15:57:17 +00:00
erwanlr
7442c72d01 Fixes #1244 2018-11-08 20:28:24 +00:00
erwanlr
01cd8350bc Fixes 1242 2018-11-08 19:16:47 +00:00
erwanlr
8b5ea589db Ref #1241 2018-11-08 19:04:40 +00:00
Erwan
3555ca1d1e Merge pull request #1223 from taha-abbasi/patch-1
Added username enumeration instructions
2018-11-07 11:40:41 +00:00
erwanlr
ae034a47ed Removes FP DFs 2018-11-03 19:36:55 +00:00
erwanlr
ec3862c930 Adds DFs 2018-11-03 19:27:52 +00:00
Taha Abbasi
804a8c34c6 Added username enumeration instructions
Added username enumeration instructions, and username enumeration with range instructions for use with Docker and without.
2018-10-08 13:39:11 -04:00
214 changed files with 35492 additions and 263 deletions

1
.rspec
View File

@@ -1,2 +1,3 @@
--color
--fail-fast
--require spec_helper

View File

@@ -1 +1 @@
2.5.3
2.6.0

4
.simplecov Normal file
View File

@@ -0,0 +1,4 @@
SimpleCov.start do
add_filter '/spec/'
add_filter 'helper'
end

View File

@@ -20,10 +20,11 @@ rvm:
- 2.5.1
- 2.5.2
- 2.5.3
- 2.6.0
- ruby-head
before_install:
- "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
- "gem update --system"
- gem update --system
matrix:
allow_failures:
- rvm: ruby-head

View File

@@ -1,6 +1,6 @@
WPScan Public Source License
The WPScan software (henceforth referred to simply as "WPScan") is dual-licensed - Copyright 2011-2018 WPScan Team.
The WPScan software (henceforth referred to simply as "WPScan") is dual-licensed - Copyright 2011-2019 WPScan Team.
Cases that include commercialization of WPScan require a commercial, non-free license. Otherwise, WPScan can be used without charge under the terms set out below.
@@ -8,7 +8,7 @@ Cases that include commercialization of WPScan require a commercial, non-free li
1.1 “License” means this document.
1.2 “Contributor” means each individual or legal entity that creates, contributes to the creation of, or owns WPScan.
1.3 “WPScan Team” means WPScans core developers, an updated list of whom can be found within the CREDITS file.
1.3 “WPScan Team” means WPScans core developers.
2. Commercialization
@@ -29,8 +29,6 @@ Example cases which do not require a commercial license, and thus fall under the
If you need to purchase a commercial license or are unsure whether you need to purchase a commercial license contact us - team@wpscan.org.
We may grant commercial licenses at no monetary cost at our own discretion if the commercial usage is deemed by the WPScan Team to significantly benefit WPScan.
Free-use Terms and Conditions;
3. Redistribution

View File

@@ -35,6 +35,17 @@ bundle install && rake install
Pull the repo with ```docker pull wpscanteam/wpscan```
Enumerating usernames
```
docker run -it --rm wpscanteam/wpscan --url https://target.tld/ --enumerate u
```
Enumerating a range of usernames
```
docker run -it --rm wpscanteam/wpscan --url https://target.tld/ --enumerate u1-100
```
** replace u1-100 with a range of your choice.
# Usage
```wpscan --url blog.tld``` This will scan the blog using default options with a good compromise between speed and accuracy. For example, the plugins will be checked passively but their version with a mixed detection mode (passively + aggressively). Potential config backup files will also be checked, along with other interesting findings. If a more stealthy approach is required, then ```wpscan --stealthy --url blog.tld``` can be used.
@@ -69,6 +80,19 @@ url: 'http://target.tld'
Running ```wpscan``` in the current directory (pwd), is the same as ```wpscan -v --proxy socks5://127.0.0.1:9090 --url http://target.tld```
Enumerating usernames
```
wpscan --url https://target.tld/ --enumerate u
```
Enumerating a range of usernames
```
wpscan --url https://target.tld/ --enumerate u1-100
```
** replace u1-100 with a range of your choice.
# PROJECT HOME
[https://wpscan.org](https://wpscan.org)
@@ -81,7 +105,7 @@ Running ```wpscan``` in the current directory (pwd), is the same as ```wpscan -v
## WPScan Public Source License
The WPScan software (henceforth referred to simply as "WPScan") is dual-licensed - Copyright 2011-2018 WPScan Team.
The WPScan software (henceforth referred to simply as "WPScan") is dual-licensed - Copyright 2011-2019 WPScan Team.
Cases that include commercialization of WPScan require a commercial, non-free license. Otherwise, WPScan can be used without charge under the terms set out below.
@@ -91,7 +115,7 @@ Cases that include commercialization of WPScan require a commercial, non-free li
1.2 "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns WPScan.
1.3 "WPScan Team" means WPScans core developers, an updated list of whom can be found within the CREDITS file.
1.3 "WPScan Team" means WPScans core developers.
### 2. Commercialization
@@ -112,8 +136,6 @@ Example cases which do not require a commercial license, and thus fall under the
If you need to purchase a commercial license or are unsure whether you need to purchase a commercial license contact us - team@wpscan.org.
We may grant commercial licenses at no monetary cost at our own discretion if the commercial usage is deemed by the WPScan Team to significantly benefit WPScan.
Free-use Terms and Conditions;
### 3. Redistribution

View File

@@ -11,7 +11,8 @@ module WPScan
WPScan::DebugLog.new(
target.url(path),
confidence: 100, found_by: DIRECT_ACCESS
confidence: 100, found_by: DIRECT_ACCESS,
references: { url: 'https://codex.wordpress.org/Debugging_in_WordPress' }
)
end
end

View File

@@ -14,7 +14,8 @@ module WPScan
target.url(path),
confidence: 100,
found_by: DIRECT_ACCESS,
interesting_entries: fpd_entries
interesting_entries: fpd_entries,
references: { url: 'https://www.owasp.org/index.php/Full_Path_Disclosure' }
)
end
end

View File

@@ -14,29 +14,35 @@ module WPScan
# @param [ Hash ] opts
#
# TODO: make this code pretty :x
#
# @return [ Array<User> ]
def aggressive(_opts = {})
found = []
found_by_msg = 'Oembed API - %s (Aggressive Detection)'
oembed_data = JSON.parse(Browser.get(api_url).body)
details = user_details_from_oembed_data(oembed_data)
return [] unless details
[CMSScanner::User.new(details[0],
found_by: format(found_by_msg, details[1]),
confidence: details[2],
interesting_entries: [api_url])]
rescue JSON::ParserError
[]
end
def user_details_from_oembed_data(oembed_data)
return unless oembed_data
if oembed_data['author_url'] =~ %r{/author/([^/]+)/?\z}
details = [Regexp.last_match[1], 'Author URL', 90]
elsif oembed_data['author_name'] && !oembed_data['author_name'].empty?
details = [oembed_data['author_name'].delete(' '), 'Author Name', 70]
details = [oembed_data['author_name'], 'Author Name', 70]
end
return unless details
details
end
found << CMSScanner::User.new(details[0],
found_by: format(found_by_msg, details[1]),
confidence: details[2],
interesting_entries: [api_url])
rescue JSON::ParserError
found
def found_by_msg
'Oembed API - %s (Aggressive Detection)'
end
# @return [ String ] The URL of the API listing the Users

View File

@@ -53,7 +53,12 @@ module WPScan
# @return [ String ]
def release_date
@release_date ||= db_data['release_date']
@release_date ||= db_data['release_date'] || 'Unknown'
end
# @return [ String ]
def status
@status ||= db_data['status'] || 'Unknown'
end
end
end

View File

@@ -1,5 +1,5 @@
<% if @version -%>
<%= info_icon %> WordPress version <%= @version.number %> identified (Released on <%= @version.release_date %>).
<%= info_icon %> WordPress version <%= @version.number %> identified (<%= @version.status.capitalize %>, released on <%= @version.release_date %>).
<%= render('@finding', item: @version) -%>
<% else -%>
<%= notice_icon %> The WordPress version could not be detected.

View File

@@ -2,6 +2,7 @@
"version": {
"number": <%= @version.number.to_json %>,
"release_date": <%= @version.release_date.to_json %>,
"status": <%= @version.status.to_json %>,
<%= render('@finding', item: @version) -%>
},
<% else -%>

View File

@@ -16,9 +16,7 @@ require 'securerandom'
require 'wpscan/helper'
require 'wpscan/db'
require 'wpscan/version'
require 'wpscan/errors/wordpress'
require 'wpscan/errors/http'
require 'wpscan/errors/update'
require 'wpscan/errors'
require 'wpscan/browser'
require 'wpscan/target'
require 'wpscan/finders'

8
lib/wpscan/errors.rb Normal file
View File

@@ -0,0 +1,8 @@
module WPScan
class Error < StandardError
end
end
require_relative 'errors/http'
require_relative 'errors/update'
require_relative 'errors/wordpress'

View File

@@ -1,6 +1,6 @@
module WPScan
# HTTP Error
class HTTPError < StandardError
class HTTPError < Error
attr_reader :response
# @param [ Typhoeus::Response ] res

View File

@@ -1,6 +1,6 @@
module WPScan
# Error raised when there is a missing DB file and --no-update supplied
class MissingDatabaseFile < StandardError
class MissingDatabaseFile < Error
def to_s
'Update required, you can not run a scan if a database file is missing.'
end

View File

@@ -1,20 +1,20 @@
module WPScan
# WordPress hosted (*.wordpress.com)
class WordPressHostedError < StandardError
class WordPressHostedError < Error
def to_s
'Scanning *.wordpress.com hosted blogs is not supported.'
end
end
# Not WordPress Error
class NotWordPressError < StandardError
class NotWordPressError < Error
def to_s
'The remote website is up, but does not seem to be running WordPress.'
end
end
# Invalid Wp Version (used in the WpVersion#new)
class InvalidWordPressVersion < StandardError
class InvalidWordPressVersion < Error
def to_s
'The WordPress version is invalid'
end

View File

@@ -1,4 +1,4 @@
# Version
module WPScan
VERSION = '3.3.3'.freeze
VERSION = '3.4.3'.freeze
end

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Controller::Aliases do
subject(:controller) { described_class.new }
let(:target_url) { 'http://ex.lo/' }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Controller::Core do
subject(:core) { described_class.new }
let(:target_url) { 'http://ex.lo/' }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Controller::CustomDirectories do
subject(:controller) { described_class.new }
let(:target_url) { 'http://ex.lo/' }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Controller::Enumeration do
subject(:controller) { described_class.new }
let(:target_url) { 'http://wp.lab/' }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Controller::PasswordAttack do
subject(:controller) { described_class.new }
let(:target_url) { 'http://ex.lo/' }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
def it_calls_the_formatter_with_the_correct_parameter(version)
it 'calls the formatter with the correct parameter' do
expect(controller.formatter).to receive(:output)

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::ConfigBackups::KnownFilenames do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::ConfigBackups::Base do
subject(:config_backups) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::DbExports::KnownLocations do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::DbExports::Base do
subject(:db_exports) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::InterestingFindings::BackupDB do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::InterestingFindings::DebugLog do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::InterestingFindings::DuplicatorInstallerLog do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::InterestingFindings::EmergencyPwdResetScript do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::InterestingFindings::FullPathDisclosure do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::InterestingFindings::MuPlugins do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::InterestingFindings::Multisite do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::InterestingFindings::Readme do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::InterestingFindings::Registration do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::InterestingFindings::TmmDbMigrate do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::InterestingFindings::UploadDirectoryListing do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::InterestingFindings::UploadSQLDump do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::InterestingFindings::Base do
subject(:files) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::MainTheme::CssStyle do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::MainTheme::UrlsInHomepage do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::MainTheme::WooFrameworkMetaGenerator do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::MainTheme::Base do
subject(:main_theme) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Medias::AttachmentBruteForcing do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Medias::Base do
subject(:media) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::PluginVersion::Readme do
subject(:finder) { described_class.new(plugin) }
let(:plugin) { WPScan::Plugin.new('spec', target) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
# If this file is tested alone (rspec path-to-this-file), then there will be an error about
# constants not being intilialized. This is due to the Dynamic Finders.

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Plugins::BodyPattern do
it_behaves_like WPScan::Finders::DynamicFinder::WpItems::Finder do
subject(:finder) { described_class.new(target) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Plugins::Comment do
it_behaves_like WPScan::Finders::DynamicFinder::WpItems::Finder do
subject(:finder) { described_class.new(target) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Plugins::ConfigParser do
xit

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Plugins::HeaderPattern do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Plugins::JavascriptVar do
it_behaves_like WPScan::Finders::DynamicFinder::WpItems::Finder do
subject(:finder) { described_class.new(target) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Plugins::KnownLocations do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Plugins::QueryParameter do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Plugins::UrlsInHomepage do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Plugins::Xpath do
it_behaves_like WPScan::Finders::DynamicFinder::WpItems::Finder do
subject(:finder) { described_class.new(target) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Plugins::Base do
subject(:plugins) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::ThemeVersion::Style do
subject(:finder) { described_class.new(theme) }
let(:theme) { WPScan::Theme.new('spec', target) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::ThemeVersion::WooFrameworkMetaGenerator do
subject(:finder) { described_class.new(theme) }
let(:theme) { WPScan::Theme.new(slug, target) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::ThemeVersion::Base do
subject(:theme_version) { described_class.new(theme) }
let(:theme) { WPScan::Plugin.new(slug, target) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Themes::KnownLocations do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Themes::UrlsInHomepage do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Themes::Base do
subject(:themes) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::TimthumbVersion::BadRequest do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Timthumb.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::TimthumbVersion::Base do
subject(:timthumb_version) { described_class.new(target) }
let(:target) { WPScan::Timthumb.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Timthumbs::KnownLocations do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Timthumbs::Base do
subject(:timthumb) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Users::AuthorIdBruteForcing do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Users::AuthorPosts do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Users::LoginErrorMessages do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Users::OembedApi do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }
@@ -7,6 +5,59 @@ describe WPScan::Finders::Users::OembedApi do
let(:fixtures) { File.join(FINDERS_FIXTURES, 'users', 'oembed_api') }
describe '#aggressive' do
xit
before do
allow(target).to receive(:sub_dir).and_return(false)
stub_request(:get, finder.api_url).to_return(body: body)
end
context 'when not a JSON response' do
let(:body) { '' }
its(:aggressive) { should eql([]) }
end
context 'when a JSON response' do
context 'when 404' do
let(:body) { File.read(File.join(fixtures, '404.json')) }
its(:aggressive) { should eql([]) }
end
context 'when 200' do
context 'when author_url present' do
let(:body) { File.read(File.join(fixtures, '200_author_url.json')) }
it 'returns the expected array of users' do
users = finder.aggressive
expect(users.size).to eql 1
user = users.first
expect(user.username).to eql 'admin'
expect(user.confidence).to eql 90
expect(user.found_by).to eql 'Oembed API - Author URL (Aggressive Detection)'
expect(user.interesting_entries).to eql ['http://wp.lab/wp-json/oembed/1.0/embed?url=http://wp.lab/&format=json']
end
end
context 'when author_url not present but author_name' do
let(:body) { File.read(File.join(fixtures, '200_author_name.json')) }
it 'returns the expected array of users' do
users = finder.aggressive
expect(users.size).to eql 1
user = users.first
expect(user.username).to eql 'admin sa'
expect(user.confidence).to eql 70
expect(user.found_by).to eql 'Oembed API - Author Name (Aggressive Detection)'
expect(user.interesting_entries).to eql ['http://wp.lab/wp-json/oembed/1.0/embed?url=http://wp.lab/&format=json']
end
end
end
end
end
end

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Users::RSSGenerator do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Users::WpJsonApi do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }
@@ -8,7 +6,6 @@ describe WPScan::Finders::Users::WpJsonApi do
describe '#aggressive' do
before do
# allow(target).to receive(:content_dir).and_return('wp-content')
allow(target).to receive(:sub_dir).and_return(false)
stub_request(:get, finder.api_url).to_return(body: body)
end

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Users::YoastSeoAuthorSitemap do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::Users::Base do
subject(:user) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::WpVersion::AtomGenerator do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::WpVersion::RDFGenerator do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::WpVersion::Readme do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::WpVersion::RSSGenerator do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Finders::WpVersion::UniqueFingerprinting do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
# If this file is tested alone (rspec path-to-this-file), then there will be an error about
# constants not being intilialized. This is due to the Dynamic Finders.

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::InterestingFinding do
it_behaves_like WPScan::References do
subject(:finding) { described_class.new('http://e.org/file.php', opts) }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Media do
subject(:media) { described_class.new(url) }
let(:url) { 'http://e.oeg/?attachment_id=2' }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Plugin do
subject(:plugin) { described_class.new(slug, blog, opts) }
let(:slug) { 'spec' }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Theme do
subject(:theme) { described_class.new(slug, blog, opts) }
let(:slug) { 'spec' }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::Timthumb do
subject(:timthumb) { described_class.new(url, opts) }
let(:url) { 'http://wp.lab/wp-content/timthumb.php' }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::WpItem do
subject(:wp_item) { described_class.new(slug, blog, opts) }
let(:slug) { 'test_item' }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::WpVersion do
describe '#new' do
context 'when invalid number' do
@@ -91,5 +89,23 @@ describe WPScan::WpVersion do
subject(:version) { described_class.new('3.8.1') }
its(:release_date) { should eql '2014-01-23' }
context 'when the version is not in the DB' do
subject(:version) { described_class.new('3.8.2') }
its(:release_date) { should eql 'Unknown' }
end
end
describe '#status' do
subject(:version) { described_class.new('3.8.1') }
its(:status) { should eql 'outdated' }
context 'when the version is not in the DB' do
subject(:version) { described_class.new('3.8.2') }
its(:release_date) { should eql 'Unknown' }
end
end
end

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe WPScan::XMLRPC do
subject(:xml_rpc) { described_class.new('http//e.org/xmlrpc.php') }

View File

@@ -1,5 +1,3 @@
require 'spec_helper'
describe 'App::Views' do
let(:target_url) { 'http://ex.lo/' }
let(:target) { WPScan::Target.new(target_url) }

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,11 @@
{
"4.0": {
"release_date" : "2014-09-04"
"release_date" : "2014-09-04",
"status": "latest"
},
"3.8.1": {
"release_date" : "2014-01-23",
"status": "outdated",
"vulnerabilities" : [
{
"created_at" : "2014-08-01T10:58:19.000Z",
@@ -30,6 +32,7 @@
},
"3.8": {
"release_date" : "2013-12-12",
"status": "insecure",
"vulnerabilities" : [
{
"references": {

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,341 @@
# Copyright (C) 2018 Joel James
# This file is distributed under the GPL-2.0+.
msgid ""
msgstr ""
"Project-Id-Version: 404 to 301 3.0.1\n"
"Report-Msgid-Bugs-To: https://duckdev.com/products/404-to-301/\n"
"POT-Creation-Date: 2018-08-24 08:32:46+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
"Last-Translator: Joel James <me@joelsays.com>\n"
"Language-Team: Joel James <me@joelsays.com>\n"
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Country: United States\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: "
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
"X-Poedit-Basepath: ../\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-Bookmarks: \n"
"X-Textdomain-Support: yes\n"
"X-Generator: grunt-wp-i18n1.0.2\n"
#: includes/admin/class-jj4t3-admin.php:127
msgid "Custom Redirect"
msgstr ""
#: includes/admin/class-jj4t3-admin.php:151
#: includes/admin/class-jj4t3-admin.php:212
#: includes/admin/class-jj4t3-log-listing.php:47
msgid "404 Error Logs"
msgstr ""
#: includes/admin/class-jj4t3-admin.php:151
msgid "404 Errors"
msgstr ""
#: includes/admin/class-jj4t3-admin.php:157
msgid "404 to 301 Settings"
msgstr ""
#: includes/admin/class-jj4t3-admin.php:157
msgid "404 Settings"
msgstr ""
#: includes/admin/class-jj4t3-admin.php:186
msgid "Error Logs"
msgstr ""
#. Plugin Name of the plugin/theme
msgid "404 to 301"
msgstr ""
#: includes/admin/class-jj4t3-admin.php:339 includes/admin/views/admin.php:27
msgid "Settings"
msgstr ""
#: includes/admin/class-jj4t3-admin.php:340
msgid "Logs"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:46
msgid "404 Error Log"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:328
#: includes/functions/jj4t3-general-functions.php:317
msgid "Date"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:329
#: includes/functions/jj4t3-general-functions.php:318
#: includes/public/class-jj4t3-404-email.php:193
msgid "404 Path"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:330
#: includes/functions/jj4t3-general-functions.php:319
msgid "From"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:331
#: includes/functions/jj4t3-general-functions.php:320
#: includes/public/class-jj4t3-404-email.php:198
msgid "IP Address"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:332
#: includes/functions/jj4t3-general-functions.php:321
msgid "User Agent"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:333
msgid "Customization"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:475
msgid "Are you sure you want to delete this item?"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:477
msgid "Delete"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:624
#: includes/admin/views/custom-redirect.php:17
#: includes/admin/views/custom-redirect.php:25
#: includes/admin/views/custom-redirect.php:33
msgid "Default"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:626
msgid "Customize"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:696
msgid "Delete Selected"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:697
msgid "Delete All"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:698
msgid "Delete All (Keep redirects)"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:735
msgid "Group by"
msgstr ""
#: includes/admin/class-jj4t3-log-listing.php:740
msgid "Apply"
msgstr ""
#: includes/admin/views/admin.php:21
msgid "by <a href=\"%s\">Joel James</a>"
msgstr ""
#: includes/admin/views/custom-redirect.php:11
msgid "Redirecting from"
msgstr ""
#: includes/admin/views/custom-redirect.php:15
#: includes/functions/jj4t3-general-functions.php:322
msgid "Redirect"
msgstr ""
#: includes/admin/views/custom-redirect.php:18
#: includes/admin/views/custom-redirect.php:26
#: includes/admin/views/custom-redirect.php:34
msgid "Enable"
msgstr ""
#: includes/admin/views/custom-redirect.php:19
#: includes/admin/views/custom-redirect.php:27
#: includes/admin/views/custom-redirect.php:35
msgid "Disable"
msgstr ""
#: includes/admin/views/custom-redirect.php:23
msgid "Error logging"
msgstr ""
#: includes/admin/views/custom-redirect.php:31
msgid "Email alert"
msgstr ""
#: includes/admin/views/custom-redirect.php:39
#: includes/admin/views/settings.php:30
msgid "Redirect to"
msgstr ""
#: includes/admin/views/custom-redirect.php:42
msgid ""
"Enter the url if you want to set custom redirect for above 404 path. Enter "
"the full url including http://. Leave empty if you want to follow deafult "
"settings."
msgstr ""
#: includes/admin/views/custom-redirect.php:51
#: includes/admin/views/settings.php:17
msgid "Redirect type"
msgstr ""
#: includes/admin/views/custom-redirect.php:58
msgid "Select redirect type to override default one."
msgstr ""
#: includes/admin/views/custom-redirect.php:65
msgid "Save Redirect"
msgstr ""
#: includes/admin/views/settings.php:24
msgid "Learn more"
msgstr ""
#: includes/admin/views/settings.php:24
msgid "about these redirect types"
msgstr ""
#: includes/admin/views/settings.php:33 includes/admin/views/settings.php:37
msgid "Existing Page"
msgstr ""
#: includes/admin/views/settings.php:34 includes/admin/views/settings.php:38
#: includes/admin/views/settings.php:52
msgid "Custom URL"
msgstr ""
#: includes/admin/views/settings.php:35 includes/admin/views/settings.php:39
msgid "No Redirect"
msgstr ""
#: includes/admin/views/settings.php:37
msgid "Select any WordPress page as a 404 page"
msgstr ""
#: includes/admin/views/settings.php:38
msgid "Redirect 404 requests to a specific URL"
msgstr ""
#: includes/admin/views/settings.php:39
msgid "To disable redirect"
msgstr ""
#: includes/admin/views/settings.php:40
msgid ""
"You can override this by setting individual custom redirects from error "
"logs list."
msgstr ""
#: includes/admin/views/settings.php:44
msgid "Select the page"
msgstr ""
#: includes/admin/views/settings.php:47
msgid "The default 404 page will be replaced by the page you choose in this list."
msgstr ""
#: includes/admin/views/settings.php:48
msgid ""
"You can <a href=\"%s\" target=\"_blank\">create a custom 404</a> page and "
"assign that page here."
msgstr ""
#: includes/admin/views/settings.php:55
msgid "Enter any url (including http://)"
msgstr ""
#: includes/admin/views/settings.php:59
msgid "Log 404 Errors"
msgstr ""
#: includes/admin/views/settings.php:62
msgid "Enable/Disable Logging"
msgstr ""
#: includes/admin/views/settings.php:66
msgid "Email notifications"
msgstr ""
#: includes/admin/views/settings.php:69
msgid ""
"If you check this, an email will be sent on every 404 log on the admin "
"email account."
msgstr ""
#: includes/admin/views/settings.php:73
msgid "Email address"
msgstr ""
#: includes/admin/views/settings.php:77
msgid "Change the recipient email address for error log notifications."
msgstr ""
#: includes/admin/views/settings.php:81
msgid "Exclude paths"
msgstr ""
#: includes/admin/views/settings.php:84
msgid "If you want to exclude few paths from error logs, enter here. One per line."
msgstr ""
#: includes/admin/views/settings.php:89
msgid "Save settings"
msgstr ""
#: includes/functions/jj4t3-general-functions.php:283
msgid "301 Redirect (SEO)"
msgstr ""
#: includes/functions/jj4t3-general-functions.php:284
msgid "302 Redirect"
msgstr ""
#: includes/functions/jj4t3-general-functions.php:285
msgid "307 Redirect"
msgstr ""
#: includes/public/class-jj4t3-404-email.php:141
msgid "Snap! One more 404 on "
msgstr ""
#: includes/public/class-jj4t3-404-email.php:189
msgid "Bummer! You have one more 404"
msgstr ""
#: includes/public/class-jj4t3-404-email.php:203
msgid "Time"
msgstr ""
#: includes/public/class-jj4t3-404-email.php:208
msgid "Referral Page"
msgstr ""
#: includes/public/class-jj4t3-404-email.php:213
msgid "Alert sent by the %s404 to 301%s plugin for WordPress."
msgstr ""
#. Plugin URI of the plugin/theme
msgid "https://duckdev.com/products/404-to-301/"
msgstr ""
#. Description of the plugin/theme
msgid ""
"Automatically redirect all <strong>404 errors</strong> to any page using "
"<strong>301 redirect for SEO</strong>. You can <strong>redirect and "
"log</strong> every 404 errors. No more 404 errors in Webmaster tool."
msgstr ""
#. Author of the plugin/theme
msgid "Joel James"
msgstr ""
#. Author URI of the plugin/theme
msgid "https://duckdev.com/"
msgstr ""

View File

@@ -0,0 +1,372 @@
/* Version: 1.2.1 */
jQuery(document).ready(function($){
var to=(function(){var timers={};return function(callback,ms,x_id){if(!x_id){x_id='';}if(timers[x_id]){clearTimeout(timers[x_id]);}timers[x_id]=setTimeout(callback,ms);};})(),id,xstyle,xtop,slr=300,show_popup=false,allottedtime,expiration,ifautofit = 0,rd_bxslider,ads_scrolltop,ae,aeii,ae_popup_title,ae_multiple,ae_loading = false,ae_upload_type,ae_media_type,ae_submit_text,ae_key;
String.prototype.number_format = (function(d){
var n = this,c = isNaN(d = Math.abs(d)) ? 2 : d,s = n < 0 ? "-" : "",i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "", j = (j = i.length) > 3 ? j % 3 : 0;
return s + (j ? i.substr(0, j) + ',' : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + ',') + (c ? '.' + Math.abs(n - i).toFixed(c).slice(2) : "");
});
var xa, xthis,xattach_id = 0,
xb = $( '.ae-ua-upload .ae-upload' ),
xc = $( '.ae-ua-upload .ae-new' ),
xd = $( '.ae-ua-upload .ae-crop-wrap' ),
xe = $( '.ae-ua-upload .ae-img-wrap' ),
xawidth = parseInt( xb.attr( 'data-width' ) ),
xawidth = ( xawidth ? xawidth : 300 ),
xaheight = parseInt( xb.attr( 'data-height' ) ),
xaheight = ( xaheight ? xaheight : 300 ),
xboundaryw = xawidth + 200,
xboundaryh = xaheight + 100;
if( window.innerWidth <= xboundaryw ){
xboundaryw = 300,
xboundaryh = 200;
xcroppie();
}else{
xcroppie();
}
function xcroppie(){
xc.on( 'click', function() {
xb.trigger( 'click' );
});
$( '.ae-ua-upload .edit-image' ).on( 'click', function() {
if( ! xb.val() ){
xb.trigger( 'click' );
xc.hide();
}else{
xc.show();
xd.fadeIn( function(){});
}
});
$( '.ae-ua-upload .ae-cancel' ).on( 'click', function () {
xd.fadeOut();
});
xb.on( 'change', function () {
xthis = this;
if( ! xa ){
xa = $( '.ae-ua-upload .ae-crop' ).croppie({
enableExif: true,
viewport: {
width: xawidth,
height: xaheight,
type: 'square'
},
boundary: {
width: xboundaryw,
height: xboundaryh
}
});
}
if( xa ){
xd.fadeIn(function(){
var xreader = new FileReader();
xreader.onload = (function (e) {
xa.croppie( 'bind', {
url: e.target.result
}).then(function(){});
});
if( xthis.files.length ){
xreader.readAsDataURL( xthis.files[0] );
}
});
}
});
$( '.ae-ua-upload .ae-save' ).on( 'click', function () {
xa.croppie( 'result', {
type: 'base64',
size: 'original'
}).then(function ( resp ){
if( xthis.files.length ){
var xfiledata = xthis.files[0];
$.ajax({
type : "POST",
url : ae_addon.ajaxurl,
data : {
action : 'user_avatar_upload',
base64 : resp,
file : xb.val(),
filename : xfiledata.name,
filetype : xfiledata.type,
attach_id : xattach_id,
key : xb.data( 'key' ),
},
beforeSend: function( response ) {
if( ! xd.find( '#save-loading' ).length ){
xd.find( '.cr-boundary' ).append( '<img id="save-loading" src="' + ae_addon.spinner2x + '" />' );
}
},
success: function( response ){
if(response){
var data = JSON.parse(response);
xattach_id = data.attach_id;
if( data.attach_id ){
xe.find( 'img.image' ).attr( 'src', data.attach_url ).parent( '.ae-img-wrap' ).addClass( 'ae-img-active' );
xd.find( '#save-loading' ).remove();
xd.fadeOut();
}else{
xe.find( 'img.image' ).parent( '.ae-img-wrap' ).removeClass( 'ae-img-active' );
xd.fadeOut();
xd.find( '#save-loading' ).remove();
alert( 'ERROR #1: something went wrong !!!' );
}
}else{
xe.find( 'img.image' ).parent( '.ae-img-wrap' ).removeClass( 'ae-img-active' );
xd.fadeOut();
xd.find( '#save-loading' ).remove();
alert( 'ERROR #2: something went wrong !!!' );
}
},
});
}
});
});
}
var a, _this,attach_id = 0,
b = $( '.ae-upload .ae-upload' ),
c = $( '.ae-upload .ae-new' ),
d = $( '.ae-upload .ae-crop-wrap' ),
e = $( '.ae-upload .ae-img-wrap' ),
awidth = parseInt( b.attr( 'data-width' ) ),
awidth = ( awidth ? awidth : 300 ),
aheight = parseInt( b.attr( 'data-height' ) ),
aheight = ( aheight ? aheight : 300 ),
boundaryw = awidth + 200,
boundaryh = aheight + 100;
if( window.innerWidth <= boundaryw ){
boundaryw = 300,
boundaryh = 200;
croppie();
}else{
croppie();
}
function croppie(){
c.on( 'click', function() {
b.trigger( 'click' );
});
$( '.ae-upload .edit-image' ).on( 'click', function() {
if( ! b.val() ){
b.trigger( 'click' );
c.hide();
}else{
c.show();
d.fadeIn( function(){});
}
});
$( '.ae-upload .ae-cancel' ).on( 'click', function () {
d.fadeOut();
});
b.on( 'change', function () {
_this = this;
if( ! a ){
a = $( '.ae-upload .ae-crop' ).croppie({
enableExif: true,
viewport: {
width: awidth,
height: aheight,
type: 'square'
},
boundary: {
width: boundaryw,
height: boundaryh
}
});
}
if( a ){
d.fadeIn(function(){
var reader = new FileReader();
reader.onload = (function (e) {
a.croppie( 'bind', {
url: e.target.result
}).then(function(){
/*console.log( 'jQuery bind complete' );*/
});
});
if( _this.files.length ){
reader.readAsDataURL( _this.files[0] );
}
});
}
});
$( '.ae-upload .ae-save' ).on( 'click', function () {
a.croppie( 'result', {
type: 'base64',
size: 'original'
}).then(function ( resp ){
if( _this.files.length ){
var filedata = _this.files[0];
$.ajax({
type : "POST",
url : ae_addon.ajaxurl,
data : {
action : 'single_image_crop',
base64 : resp,
file : b.val(),
filename : filedata.name,
filetype : filedata.type,
attach_id : attach_id,
key : $(b.attr( 'data-id' )).attr( 'id' ),
},
beforeSend: function( response ) {
if( ! d.find( '#save-loading' ).length ){
d.find( '.cr-boundary' ).append( '<img id="save-loading" src="' + ae_addon.spinner2x + '" />' );
}
},
success: function( response ){
if(response){
var data = JSON.parse(response);
attach_id = data.attach_id;
if( data.attach_id && $(b.attr( 'data-id' )).length ){
e.find( 'img.image' ).attr( 'src', data.attach_url ).parent( '.ae-img-wrap' ).addClass( 'ae-img-active' );
$(b.attr( 'data-id' )).val( data.attach_url );
d.find( '#save-loading' ).remove();
d.fadeOut();
}else{
e.find( 'img.image' ).parent( '.ae-img-wrap' ).removeClass( 'ae-img-active' );
d.fadeOut();
d.find( '#save-loading' ).remove();
alert( 'ERROR #3: something went wrong !!!' );
}
}else{
e.find( 'img.image' ).parent( '.ae-img-wrap' ).removeClass( 'ae-img-active' );
d.fadeOut();
d.find( '#save-loading' ).remove();
alert( 'ERROR #4: something went wrong !!!' );
}
},
});
}
});
});
}
if($('#apmediaupload').length){
$(document).delegate('#apmediaupload','click',function(){
if(ae_loading){return;}
ae_filed_id = $(this).attr('field_id');
ae_popup_title = String($(this).attr('popup_title'));
ae_multiple = $(this).attr('multiple');
ae_upload_type = $(this).attr('upload_type');
ae_media_type = $(this).attr('media_type');
ae_submit_text = $(this).attr('submit_text');
ae_key = $(this).attr('key');
if(ae_multiple == 'true'){
ae_multiple = true;
}else if(ae_multiple == 'add'){
ae_multiple = 'add';
}else{
ae_multiple = false;
}
if(ae_media_type == 'image'){
ae = wp.media.frames.file_frame = wp.media({
multiple: ae_multiple,
title: ae_popup_title,
type: ae_media_type,
library:{type: ae_media_type},
button:{text : ae_submit_text},
});
ae.on('select', function(){
attachment = ae.state().get('selection').toJSON();
var ids = [];
var images = [];
for (i = 0; i < attachment.length; i++){
ids[i] = attachment[i]['id'];
images[i] = attachment[i]['url'];
}
if(! ids){return;}
if(ae_upload_type == 'single'){
ids = ids[0];
}
$.ajax({
type : "POST",
url : ae.ajaxurl,
data :{
action : 'ae_ajax',
ids : ids,
multiple : ae_multiple,
type : ae_upload_type,
media_type : ae_media_type,
},
beforeSend: function(response){
ae_loading = true;
if(ae_upload_type == 'single'){
$('.agfmu-' + ae_filed_id.replace('#','').replace(' ','')).css({
'background-image' : "url('" + ae.homeurl + "/wp-includes/images/spinner-2x.gif')",
'background-position' : 'center center',
'background-repeat' : 'no-repeat',
'background-size' : 'auto',
});
}
},
success: function(response){
if(response && ae_upload_type == 'single'){
$(ae_filed_id).val(response);
}
if(response && ae_upload_type == 'gallery'){
var data = JSON.parse(response);
$(ae_filed_id).val(data.ids);
}
if(response && ae_upload_type == 'single'){
$('.agfmu-' + ae_filed_id.replace('#','').replace(' ','')).css({
'background-image' : 'url('+images[0]+')',
'background-size' : 'auto',
});
}
if(response && ae_upload_type == 'gallery'){
var data = JSON.parse(response);
$('#gallery-' + ae_filed_id.replace('#', '').replace(' ', '')).html(data.preview);
}
setTimeout(function(){
ae_loading = false;
}, 300);
},
});
});
ae.on('open', function(){
var selection = ae.state().get('selection');
ids = $('input' + ae_filed_id).val();
if(ids){
ids = ids.split(",");
if(ids){
ids.forEach(function(id){
attachments = wp.media.attachment(id);
attachments.fetch();
selection.add(attachments ? [ attachments ] : []);
});
}
}
});
ae.open();
}
});
}
$( window ).on( 'resize', function(){
to(function(){
if( window.innerWidth <= boundaryw ){
a.destroy();
boundaryw = 300,
boundaryh = 200;
croppie();
}
},200);
});
function ajax_search(id){
name = $(id).attr('name');
if(! $(id).val()){$('.rd-ajax .sr').html('').hide(); return;}
$('.rd-ajax .sr').html('<span class="loading">&nbsp;</span>');
to(function(){
$.ajax({
url : ae.ajaxurl,
type : 'post',
data :{
action : 'location_ajax',
value : $(id).val(),
name : name
},
success : function(data){
$('.rd-ajax .sr').html(data).show();
}
});
}, 200);
}
});

View File

@@ -0,0 +1,19 @@
{
"name": "my-block-cgb-guten-block",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "cgb-scripts start",
"build": "cgb-scripts build",
"eject": "cgb-scripts eject"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.12",
"@fortawesome/free-brands-svg-icons": "^5.6.3",
"@fortawesome/free-regular-svg-icons": "^5.6.3",
"@fortawesome/free-solid-svg-icons": "^5.6.3",
"@fortawesome/react-fontawesome": "^0.1.3",
"cgb-scripts": "1.13.0",
"classnames": "^2.2.6"
}
}

View File

@@ -0,0 +1,7 @@
{
"name": "andrejpavlovic/acf-conditional-logic-advanced",
"description": "Adds an Advanced Conditional Logic field setting to ACF that can show/hide individual fields based on post template, format, and/or category.",
"version": "1.1.3",
"type": "wordpress-plugin",
"license": "GPL-2.0"
}

View File

@@ -0,0 +1,167 @@
/*Default Plugin Styles*/
/*plugin version 4.0.3.3*/
a[target="amazonwin"] {margin: 0 !important;}
a[rel^="appiplightbox"] { display: inline-block; font-size: .75rem; text-align: center; max-width: 100%; }
.instock { color: #008000; font-size: .85em; }
.outofstock { color: #800000; font-size: .85em; }
.amazon-image-wrapper { padding: 0 1%; text-align: center;float: left; margin: 0 2% 0 0;-webkit-box-sizing: border-box;-moz-box-sizing: border-box; box-sizing: border-box; max-width: 25%; width: 100%; }
.amazon-image-wrapper a { border-bottom: none; display: block; font-size: 12px; text-align: center; }
.amazon-image-wrapper br {display: none;}
.asin-title {text-align: left; font-size: inherit;}
.appip-label {color: #666; font-size: inherit;font-weight: bold;text-transform: uppercase;}
.appip-multi-divider {margin: 10px 0;}
.amazon-asin-title {margin: 0 0 5px 0; }
.amazon-author { color: #666; }
.amazon-buying {text-align: left; box-sizing: border-box; float: left; max-width: 73%; width: 100%; }
.amazon-dates { padding: 0 !important; text-align: left; height: auto;}
.amazon-dates br {display: none;}
.amazon-dates .amazon-preorder { color: #d16601; font-weight: bold; text-align: left; }
.amazon-dates .amazon-release-date { color: #666; font-size: 10px; text-align: left; }
.amazon-director { color: #666; }
.amazon-director-label { color: #999; }
.amazon-ESRB { color: #666; font-size : 12px;}
.amazon-feature { color: #666; font-size : inherit;}
.amazon-manufacturer { color: #666; }
.amazon-new { color: #800000; font-weight: bold; text-align: left; }
.amazon-new-label { color: #666; text-align: left;}
.amazon-platform { color: #666; font-size : 12px;}
.amazon-post-text { padding: 0 !important; text-align: left; }
.amazon-price-label { color: #666; text-align: left; }
.amazon-price { color: #800000; font-weight: bold; text-align: left; }
.amazon-rating { color: #666; }
.amazon-rating-label { color: #999; }
.amazon-starring { color: #666; }
.amazon-starring-label { color: #999; }
.amazon-system { color: #666; font-size : 12px;}
.amazon-tiny {text-align: center;font-size: 10px;}
.amazon-used { color: #666; text-align: left; }
.amazon-used-label { color: #666; text-align: left; }
.amazon-list-price { text-align: left; text-decoration: line-through; }
.amazon-list-price-label { color: #666; text-align: left; }
.amazon-list-price-label, .amazon-new-label, .amazon-used-label { font-weight: bold; min-width: 7em;width: auto;}
.amazon-product-table { border-collapse: collapse; border: 0 none !important; width: 100%; clear: both; margin-bottom: 10px;}
.amazon-product-table td{ border: 0 none ; padding: 0; }
.amazon-product-table:after {clear: both;}
.amazon-product-table a { border-bottom: 0 none; text-decoration: none; }
.amazon-product-table > tbody > tr > td {padding: .5rem !important;}
.amazon-product-table hr {display:inline-block;max-width:100%; width: 100%; border-top: 1px solid #e2e5e7;height: 0px; margin: 6px 0;}
.amazon-product-table .amazon-buying h2.amazon-asin-title { border-bottom: 0 none; font-size: 1rem; line-height: 1.25em; margin: 0; }
.amazon-product-table .amazon-list-variants {border-top: 1px solid #CCC;border-bottom: 1px solid #ccc;padding: 2%;margin-top:2%;}
.amazon-product-price { border-collapse: collapse; border: 0 none; padding: 0 !important; }
.amazon-product-price { -moz-border-radius: 0; -webkit-border-radius: 0; border-collapse: collapse; border-radius: 0; border: 0 none; margin: 0; max-width: 100%; width: auto; }
.amazon-product-price { float: left; margin: 0; width: 100%; }
.amazon-product-price a img.amazon-image { background-color: transparent; border: 0 none; }
.amazon-product-price td { border: 0 none !important; padding: .25em 0; }
.amazon-product-price td { padding: 1%; width: auto; }
.amazon-product-price tr:first-child td {width:7em;}
.amazon-price-button{margin-top:2%;display:block;}
.amazon-price-button > a{display:block;margin-top:8px;margin-bottom:5px;width:165px;}
.amazon-price-button > a img.amazon-price-button-img{border:0 none;margin:0px;background:transparent;}
.amazon-additional-images-text { display: block; font-size: x-small; font-weight: bold; }
.amazon-element-imagesets { border: 1px solid #ccc; display: inline-block; margin: 5px; overflow: hidden; padding: 10px; }
.amazon-element-imagesets br {display: none;}
.amazon-element-imagesets a { float: left; margin: 3px; }
.amazon-element-imagesets a img {border: 1px solid #fff;}
.amazon-additional-images-wrapper { border: 1px solid #ccc; box-sizing: border-box; display: inline-block; margin: 1%; overflow: hidden; padding: 2%; }
.amazon-additional-images-wrapper a { float: left; margin: 3px; }
.amazon-additional-images-wrapper a img {border: 1px solid #fff;width:25px;}
.amazon-additional-images-wrapper br {display: none;}
.amazon_variations_wrapper{}
.amazon_varients{}
.amazon-varient-type-link {display: inline-block;font-weight: bold;}
.amazon-varient-type-price {display: inline-block;color: #EA0202;font-weight: bold;}
.amazon-variant-price-text{color:initial;}
.amazon-variant-price-text {font-weight: normal;}
.amazon-elements-wrapper,
.amazon-element-wrapper{clear: both;}
img.amazon-varient-image {max-width: 50px;margin: 1%;padding: 1px;background-color: #999;}
img.amazon-varient-image:hover {background-color: #3A9AD9;}
/*
a.amazon__price--button--style,
a.amazon__price--button--style:visited {background-color: #444;padding: 10px 20px;margin: 5px 0;display: inline-block;text-decoration: none;color: #fff;-moz-transition: all .5s ease;-webkit-transition: all .5s ease;transition: all .5s ease;}
a.amazon__price--button--style:hover {background-color: #2196F3;text-decoration: none;color: #fff;}
a.amazon__price--button--style:focus,
a.amazon__price--button--style:active{outline: 0;-moz-box-shadow:0 0 5px #2196F3;-webkit-box-shadow:0 0 5px #2196F3;box-shadow: 0 0 5px #2196F3;}
a.amazon__price--button--style{ background-color: #2196F3;text-decoration: none;color: #fff;}
*/
body[class*=amp-mode] .amazon-image-wrapper a amp-img img{height:auto;position:relative;}
body[class*=amp-mode] .amazon-image-wrapper a amp-img>*{padding:0;}
body[class*=amp-mode] table{width:100%;background:0 0}
body[class*=amp-mode] .amazon-buying{padding:4px}
body[class*=amp-mode] .amazon-image-wrapper{margin:0;background:0 0;padding:4px}
body[class*=amp-mode] .amazon-buying hr{border-style:solid;border-width:0 0 1px;border-color:#ccc}
body[class*=amp-mode] h2.amazon-asin-title{max-width:100%;font-size:1.3em;line-height:1.35;background:0 0}
body[class*=amp-mode] .amazon-product-pricing-wrap{max-width:100%}
body[class*=amp-mode] .amazon-product-pricing-wrap table tr td{border:0;background:0 0;margin:0;padding:0 2px;display:inline-block;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}
body[class*=amp-mode] .amazon-product-pricing-wrap table tr{border:0;background:0 0;margin:0;padding:2px;text-align:left}
body[class*=amp-mode] .amazon-image-wrapper amp-img{width:160px;margin:0 auto;max-width:100%}
body[class*=amp-mode] .amazon-image-wrapper>a{display:block;text-align:center}
body[class*=amp-mode] .amazon-image-wrapper>br{display:none}
body[class*=amp-mode] .amazon-product-pricing-wrap table tr td:last-child:first-child,
body[class*=amp-mode] .amazon-product-pricing-wrap tbody,
body[class*=amp-mode] .amazon-product-pricing-wrap tr{width:100%;display:block}
body[class*=amp-mode] .amazon-price-button amp-img{margin:0 auto}
body[class*=amp-mode] p.amazon-asin-title{margin-bottom:0;font-size:1.25em;line-height:1.35}
body[class*=amp-mode] .amazon-product-pricing-wrap table{background:0 0}
body[class*=amp-mode] .amazon-image-wrapper .amazon-additional-images-wrapper amp-img{width:50px;display:inline-block;margin:0 2px}
body[class*=amp-mode] span.amazon-additional-images-text{display:block}
body[class*=amp-mode] .amazon-additional-images-wrapper{line-height:1.25;text-align:center}
body[class*=amp-mode] .amazon-additional-images-wrapper br{display:none}
.appip-clear { clear: both; }
.appip-debug .appip-errors { display: block !important; color: #FEFEFE; background: #cd0000; padding: 1%; font-weight: bold; font-size: 16px; }
/* New Flat Button Styles 4.0.3.3*/
.button-rounded{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
/* default */
.amazon__price--button--style,
.amazon__price--button--style:visited {background-color: #444;padding: 10px 20px;margin: 5px 0;display: inline-block;text-decoration: none;color: #fff;-moz-transition: all .5s ease;-webkit-transition: all .5s ease;transition: all .5s ease;}
.amazon__price--button--style:hover {cursor:pointer;background-color: #666;text-decoration: none;color: #fff;}
.amazon__price--button--style:focus {color: #fff;background-color: #595959;outline: 0;-moz-box-shadow: 0 0 5px #9c9c9c;-webkit-box-shadow: 0 0 5px #9c9c9c;box-shadow: 0 0 5px #9c9c9c;text-decoration: none;}
.amazon__price--button--style:active {color: #fff;background-color: #595959;outline: 0;text-decoration: none;-moz-box-shadow:0px 3px 9px rgba(0, 0, 0, 0.43) inset;-webkit-box-shadow:0px 3px 9px rgba(0, 0, 0, 0.43) inset;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.43) inset;}
/* blue */
.amazon__btn--blue,
.amazon__btn--blue:visited{color: #fff;background-color: #0085ba;}
.amazon__btn--blue:hover {color: #fff;background-color: #008ec2;}
.amazon__btn--blue:focus {color: #fff;background-color: #0073aa;-moz-box-shadow: 0 0 5px #2196F3;-webkit-box-shadow: 0 0 5px #2196F3;box-shadow: 0 0 5px #2196F3;}
.amazon__btn--blue:active{color: #fff;background-color: #0073aa;}
/* red */
.amazon__btn--red,
.amazon__btn--red:visited{color: #fff;background-color: #e10505;}
.amazon__btn--red:hover {color: #fff;background-color: #f00;}
.amazon__btn--red:focus {color: #fff;background-color: #a70707;-moz-box-shadow: 0 0 5px #ff338e;-webkit-box-shadow: 0 0 5px #ff338e;box-shadow: 0 0 5px #ff338e;}
.amazon__btn--red:active{color: #fff;background-color: #a70707;}
/* green */
.amazon__btn--green,
.amazon__btn--green:visited{color: #fff;background-color: #4aa74e;}
.amazon__btn--green:hover {color: #fff;background-color: #2f8d33;}
.amazon__btn--green:focus {color: #fff;background-color: #17851c;-moz-box-shadow: 0 0 5px #8BC34A;-webkit-box-shadow: 0 0 5px #8BC34A;box-shadow: 0 0 5px #8BC34A;}
.amazon__btn--green:active{color: #fff;background-color: #17851c;}
@media screen and (min-width:550px){
body[class*=amp-mode] .amazon-image-wrapper{float:left;width:28%}
body[class*=amp-mode] .amazon-buying{float:left;width:70%}
body[class*=amp-mode] .amazon-price-button amp-img{margin:5px 0 0}
body[class*=amp-mode] p.amazon-asin-title{margin-bottom:12px}
}
@media only screen and (max-width : 1200px) {}
@media only screen and (max-width : 992px) {}
@media only screen and (max-width : 768px) {}
@media only screen and (max-width : 550px) {
.amazon-image-wrapper { padding: 0; text-align: center; float: none; margin: 0 auto 2%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; max-width: 75%; width: 100%; }
.amazon-buying { box-sizing: border-box; float: none; max-width: 100%; width: 100%; }
.amazon-product-price,table.amazon-product-price { float: none; margin: 0; max-width: 100%; width: 100%; }
.amazon-product-pricing-wrap { display: block; clear: both; }
.amazon-dates { text-align: center; }
.amazon-dates a { margin: 0 auto !important; width: 50% !important; }
.amazon-dates a img { margin: 5% auto 0 !important; width: 95% !important; }
span.amazon-tiny {margin-top: 2px;background: #ccc;padding:1%;display: block;font-size: 1.25em;color: #000;text-transform: uppercase;border: 1px solid #999;line-height: 1.25em;}
span.amazon-tiny:active {background: #EDEDED;}
.amazon-product-table .amazon-buying h2.amazon-asin-title {margin-top: 3%;display: block;line-height: 1.5em;}
.amazon-additional-images-wrapper { max-width: 100%; width: 100%; margin: 1% 0; text-align: center; }
.amazon-additional-images-wrapper a { float: none; display: inline-block; width: 18%; margin: 0; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
.amazon-additional-images-wrapper a img { width: 75%; }
td.amazon-list-price-label, td.amazon-new-label, td.amazon-used-label, td.amazon-used-price, td.amazon-new, td.amazon-list-price { display: inline-block; }
a.amazon__price--button--style {max-width: 90%;margin: 5px auto;}
}
@media only screen and (max-width : 320px) {}
/* Custom Styles*/

Some files were not shown because too many files have changed in this diff Show More