Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 461f894

Browse files
committedJul 26, 2019
(1.1.0) Releases 1.1.0 / Fixed bug, modify report format, etc..
1 parent 562c720 commit 461f894

File tree

7 files changed

+145
-103
lines changed

7 files changed

+145
-103
lines changed
 

‎.idea/workspace.xml

Lines changed: 95 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎XSpear-1.0.9.gem

-26 KB
Binary file not shown.

‎XSpear-1.1.0.gem

26.5 KB
Binary file not shown.

‎lib/XSpear.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def run
400400
r.push makeQueryPattern('x', '"\'><details/open/ontoggle="alert`45`">', '<details/open/ontoggle="alert`45`">', 'h', "reflected "+"HTML5 XSS Code".red, CallbackStringMatch)
401401
r.push makeQueryPattern('x', '"\'><audio src onloadstart=alert(45)>', '<audio src onloadstart=alert(45)>', 'h', "reflected "+"HTML5 XSS Code".red, CallbackStringMatch)
402402
r.push makeQueryPattern('x', '"\'><marquee onstart=alert(45)>', '<marquee onstart=alert(45)>', 'h', "reflected "+"HTML5 XSS Code".red, CallbackStringMatch)
403-
r.push makeQueryPattern('x', '"\'><meter value=2 min=0 max=10 onmouseover=alert(45)>2 out of 10</meter>', '<meter value=2 min=0 max=10 onmouseover=alert(45)>2 out of 10</meter>', 'h', "reflected "+"HTML5 XSS Code".red, CallbackStringMatch)
403+
r.push makeQueryPattern('x', '"\'><meter onmouseover=alert(45)>0</meter>', '<meter onmouseover=alert(45)>0</meter>', 'h', "reflected "+"HTML5 XSS Code".red, CallbackStringMatch)
404404

405405
onfocus_tags.each do |t|
406406
r.push makeQueryPattern('x', "\"'><#{t} autofocus onfocus=alert(45)>", "<#{t} autofocus onfocus=alert(45)>", 'h', "reflected "+"onfocus XSS Code".red, CallbackStringMatch)

‎lib/XSpear/XSpearRepoter.rb

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,20 @@ def initialize(url,starttime, method)
2929
# desc
3030
# category
3131
# callback
32+
@rtype = {"i"=>"INFO".blue,"v"=>"VULN".red,"l"=>"LOW".green,"m"=>"MIDUM".yellow,"h"=>"HIGH".light_red}
33+
@rissue = {"f"=>"FILERD RULE","r"=>"REFLECTED","x"=>"XSS","s"=>"STATIC ANALYSIS","d"=>"DYNAMIC ANALYSIS"}
3234
end
3335

3436
def add_issue_first(type, issue, param, payload, pattern, description)
35-
rtype = {"i"=>"INFO".blue,"v"=>"VULN".red,"l"=>"LOW".green,"m"=>"MIDUM".yellow,"h"=>"HIGH".red}
36-
rissue = {"f"=>"FILERD RULE","r"=>"REFLECTED","x"=>"XSS","s"=>"STATIC ANALYSIS","d"=>"DYNAMIC ANALYSIS"}
37+
rtype = @rtype
38+
rissue = @rissue
3739
@issue.insert(0,["-", rtype[type], rissue[issue], @method, param, pattern, description])
3840
@query.push payload
3941
end
4042

4143
def add_issue(type, issue, param, payload, pattern, description)
42-
rtype = {"i"=>"INFO".blue,"v"=>"VULN".red,"l"=>"LOW".green,"m"=>"MIDUM".yellow,"h"=>"HIGH".red}
43-
rissue = {"f"=>"FILERD RULE","r"=>"REFLECTED","x"=>"XSS","s"=>"STATIC ANALYSIS","d"=>"DYNAMIC ANALYSIS"}
44+
rtype = @rtype
45+
rissue = @rissue
4446
@issue << [@issue.size, rtype[type], rissue[issue], @method, param, pattern, description]
4547
@query.push payload
4648
end
@@ -84,35 +86,46 @@ def to_cli
8486
puts table
8587
puts "< Available Objects >".yellow
8688
@filtered_objects.each do |key, value|
87-
eh = []
88-
tag = []
89-
sc = []
90-
uc = []
91-
puts "[#{key}]".blue+" param"
92-
value.each do |n|
93-
if n.include? "=64"
94-
# eh
95-
eh.push n.chomp("=64")
96-
elsif n.include? "xsp<"
97-
# tag
98-
n = n.sub("xsp<","")
99-
tag.push n.chomp(">")
100-
elsif n.include? ".xspear"
101-
# uc
102-
uc.push n.sub(".xspear","")
103-
else
104-
# sc
105-
sc.push n.sub("XsPeaR","")
89+
begin
90+
eh = []
91+
tag = []
92+
sc = []
93+
uc = []
94+
puts "[#{key}]".blue+" param"
95+
value.each do |n|
96+
if n.include? "=64"
97+
# eh
98+
eh.push n.chomp("=64")
99+
elsif n.include? "xsp<"
100+
# tag
101+
n = n.sub("xsp<","")
102+
tag.push n.chomp(">")
103+
elsif n.include? ".xspear"
104+
# uc
105+
uc.push n.sub(".xspear","")
106+
else
107+
# sc
108+
sc.push n.sub("XsPeaR","")
109+
end
106110
end
111+
puts " + Available Special Char: ".green+"#{sc.map(&:inspect).join(',').gsub('"',"")}".gsub(',',' ')
112+
puts " + Available Event Handler: ".green+"#{eh.map(&:inspect).join(',')}"
113+
puts " + Available HTML Tag: ".green+"#{tag.map(&:inspect).join(',')}"
114+
puts " + Available Useful Code: ".green+"#{uc.map(&:inspect).join(',')}"
115+
rescue
116+
puts "Not found"
107117
end
108-
puts " + Available Special Char: ".green+"#{sc.map(&:inspect).join(',').gsub('"',"")}".gsub(',',' ')
109-
puts " + Available Event Handler: ".green+"#{eh.map(&:inspect).join(',')}"
110-
puts " + Available HTML Tag: ".green+"#{tag.map(&:inspect).join(',')}"
111-
puts " + Available Useful Code: ".green+"#{uc.map(&:inspect).join(',')}"
112118
end
113-
puts "< Raw Query >".yellow
119+
if @filtered_objects.length == 0
120+
puts "Not found"
121+
end
122+
puts "\n< Raw Query >".yellow
123+
begin
114124
@query.each_with_index do |q, i|
115125
puts "[#{i}] #{@url.sub(URI.parse(@url).query,"")}"+q
116126
end
127+
rescue
128+
puts "Not found"
129+
end
117130
end
118131
end

‎lib/XSpear/banner.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ def banner;
33
( /( )\\ )
44
)\\())(()/( ( ) (
55
((_)\\ /(_))` ) ))\\ ( /( )(
6-
__((_)(_)) /(/( /((_))(_))(()\\
7-
\\ \\/ // __|((_)_\\ (_)) ((_)_ ((_)
6+
__((_)(_)) /(/( /((_))(_))(()\\".red+"
7+
\\ \\/ // __|"+"((_)_\\ (_)) ((_)_ ((_)".red+"
88
> < \\__ \\| '_ \\)/ -_)/ _` || '_|
9-
/_/\\_\\|___/| .__/ \\___|\\__,_||_| />
10-
|_| \\ /<
11-
{\\\\\\\\\\\\\\\\\\\\\\\\\\BYHAHWUL\\\\\\\\\\\\\\\\\\\\\\(0):::<======================-
12-
/ \\<
13-
\\> [ v#{XSpear::VERSION} ]"
9+
/_/\\_\\|___/| .__/ \\___|\\__,_||_| "+"/>".red+"
10+
|_| "+"\\ /<".red+"
11+
"+"{\\\\\\\\\\\\\\\\\\\\\\\\\\".red+"BYHAHWUL"+"\\\\\\\\\\\\\\\\\\\\\\(0):::<======================-".red+"
12+
"+"/ \\<".red+"
13+
"+"\\>".red+" [ v#{XSpear::VERSION} ]"
1414
end

‎lib/XSpear/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module XSpear
2-
VERSION = "1.0.9"
2+
VERSION = "1.1.0"
33
end

0 commit comments

Comments
 (0)
Please sign in to comment.