--- nfo/perl/scripts/fluscate/bin/fluscate.pl 2004/07/26 13:51:54 1.4 +++ nfo/perl/scripts/fluscate/bin/fluscate.pl 2004/07/26 16:11:58 1.5 @@ -1,9 +1,14 @@ #!/usr/bin/perl -# fluscate.pl 0.03 - The Flash Obfuscator +# fluscate.pl 0.04 - The Flash Obfuscator -# $Id: fluscate.pl,v 1.4 2004/07/26 13:51:54 joko Exp $ +# $Id: fluscate.pl,v 1.5 2004/07/26 16:11:58 joko Exp $ # $Log: fluscate.pl,v $ +# Revision 1.5 2004/07/26 16:11:58 joko +# updated pod +# included more complete list of flash event-handlers +# fixed substitution regex #1: now using spaces around function names +# # Revision 1.4 2004/07/26 13:51:54 joko # updated pod # @@ -101,6 +106,9 @@ branchIfTrue ls" ... after each "constants" declaration (->pollute) - what about other symbols beside "function"s? (e.g. variables) (->mode) + - include list of ->keywords from: + http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/ + - replace symbols in multiple files (->multifile) =head2 Notes @@ -170,7 +178,42 @@ 'function_stacked' => 'function(?:2|)\s\s\(.*?\)', 'push' => 'push\s\'(.+?)\'', }; -my @symbols_events = qw( onPress onReleaseOutside onRelease onMouseDown onEnterFrame ); +my @symbols_events = qw( + onDragOut + onDragOver + onKeyUp + onKeyDown + onKillFocus + onPress + onRelease + onReleaseOutside + onRollOut + onRollOver + onSetFocus + onActivity + onStatus + onSelect + onData + onLoad + allowDomain + allowInsecureDomain + onMouseDown + onMouseMove + onMouseUp + onMouseWheel + onEnterFrame + onUnload + onLoadComplete + onLoadError + onLoadInit + onLoadProgress + onLoadStart + onID3 + onSoundComplete + onResize + onChanged + onScroller +); my @symbols; # 1. read flasm code from STDIN @@ -213,7 +256,7 @@ # function declarations; single quotes might not be there! if (m/$regex->{function}/) { - s/'*$symbol'*/'$symbol_counter'/i; + s/\s'*$symbol'*\s/ '$symbol_counter' /i; # "constants"-line at begin of each block; single quotes should already be there } elsif (m/$regex->{constants}/) {