Compare commits
8 Commits
dependabot
...
fix/non-la
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de4f65e69b | ||
|
|
bce3b48ac7 | ||
|
|
2c1eb27f79 | ||
|
|
a423b15d53 | ||
|
|
162fcf4c2d | ||
|
|
c11f4b9064 | ||
|
|
99fca11958 | ||
|
|
a5adcfec97 |
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
ruby: [2.7, '3.0', 3.1]
|
||||
ruby: [2.7, '3.0', 3.1, 3.2]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
||||
@@ -38,7 +38,9 @@ When using a pentesting distubution (such as Kali Linux), it is recommended to i
|
||||
|
||||
### In macOSX via Homebrew
|
||||
|
||||
`brew install wpscanteam/tap/wpscan`
|
||||
```shell
|
||||
brew install wpscanteam/tap/wpscan
|
||||
```
|
||||
|
||||
### From RubyGems
|
||||
|
||||
|
||||
@@ -7,6 +7,10 @@ module WPScan
|
||||
class KnownLocations < CMSScanner::Finders::Finder
|
||||
include CMSScanner::Finders::Finder::Enumerator
|
||||
|
||||
def valid_response_codes
|
||||
@valid_response_codes ||= [200, 206].freeze
|
||||
end
|
||||
|
||||
SQL_PATTERN = /(?:DROP|(?:UN)?LOCK|CREATE|ALTER) (?:TABLE|DATABASE)|INSERT INTO/.freeze
|
||||
|
||||
# @param [ Hash ] opts
|
||||
@@ -17,7 +21,7 @@ module WPScan
|
||||
def aggressive(opts = {})
|
||||
found = []
|
||||
|
||||
enumerate(potential_urls(opts), opts.merge(check_full_response: 200)) do |res|
|
||||
enumerate(potential_urls(opts), opts.merge(check_full_response: valid_response_codes)) do |res|
|
||||
if res.effective_url.end_with?('.zip')
|
||||
next unless %r{\Aapplication/zip}i.match?(res.headers['Content-Type'])
|
||||
else
|
||||
|
||||
@@ -92,7 +92,7 @@ module WPScan
|
||||
tags: 'Tags',
|
||||
text_domain: 'Text Domain'
|
||||
}.each do |attribute, tag|
|
||||
instance_variable_set(:"@#{attribute}", parse_style_tag(style_body, tag))
|
||||
instance_variable_set(:"@#{attribute}", parse_style_tag(style_body, tag)&.force_encoding('UTF-8'))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -16,5 +16,8 @@ def classify_slug(slug)
|
||||
classified = slug.to_s.gsub(/[^a-z\d\-]/i, '-').gsub(/-{1,}/, '_').camelize.to_s
|
||||
classified = "D_#{classified}" if /\d/.match?(classified[0])
|
||||
|
||||
# Special case for slugs with all non-latin characters.
|
||||
classified = "HexSlug_#{slug.bytes.map { |i| i.to_s(16) }.join}" if classified.empty?
|
||||
|
||||
classified.to_sym
|
||||
end
|
||||
|
||||
@@ -7,7 +7,8 @@ describe '#classify_slug' do
|
||||
'12-slug' => :D_12Slug,
|
||||
'slug.s' => :SlugS,
|
||||
'slug yolo $' => :SlugYolo,
|
||||
'slug $ ab.cd/12' => :SlugAbCd12
|
||||
'slug $ ab.cd/12' => :SlugAbCd12,
|
||||
'カスタムテーマ' => :HexSlug_e382abe382b9e382bfe383a0e38386e383bce3839e
|
||||
}.each do |slug, expected_symbol|
|
||||
context "when #{slug}" do
|
||||
it "returns #{expected_symbol}" do
|
||||
|
||||
Reference in New Issue
Block a user