| 1 |
#!/usr/bin/perl |
#!/usr/bin/perl |
| 2 |
|
|
| 3 |
# fluscate.pl 0.03 - The Flash Obfuscator |
# fluscate.pl 0.04 - The Flash Obfuscator |
| 4 |
|
|
| 5 |
# $Id$ |
# $Id$ |
| 6 |
# $Log$ |
# $Log$ |
| 7 |
|
# Revision 1.5 2004/07/26 16:11:58 joko |
| 8 |
|
# updated pod |
| 9 |
|
# included more complete list of flash event-handlers |
| 10 |
|
# fixed substitution regex #1: now using spaces around function names |
| 11 |
|
# |
| 12 |
# Revision 1.4 2004/07/26 13:51:54 joko |
# Revision 1.4 2004/07/26 13:51:54 joko |
| 13 |
# updated pod |
# updated pod |
| 14 |
# |
# |
| 106 |
branchIfTrue ls" |
branchIfTrue ls" |
| 107 |
... after each "constants" declaration (->pollute) |
... after each "constants" declaration (->pollute) |
| 108 |
- what about other symbols beside "function"s? (e.g. variables) (->mode) |
- what about other symbols beside "function"s? (e.g. variables) (->mode) |
| 109 |
|
- include list of ->keywords from: |
| 110 |
|
http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/ |
| 111 |
|
- replace symbols in multiple files (->multifile) |
| 112 |
|
|
| 113 |
=head2 Notes |
=head2 Notes |
| 114 |
|
|
| 178 |
'function_stacked' => 'function(?:2|)\s\s\(.*?\)', |
'function_stacked' => 'function(?:2|)\s\s\(.*?\)', |
| 179 |
'push' => 'push\s\'(.+?)\'', |
'push' => 'push\s\'(.+?)\'', |
| 180 |
}; |
}; |
| 181 |
my @symbols_events = qw( onPress onReleaseOutside onRelease onMouseDown onEnterFrame ); |
my @symbols_events = qw( |
| 182 |
|
onDragOut |
| 183 |
|
onDragOver |
| 184 |
|
onKeyUp |
| 185 |
|
onKeyDown |
| 186 |
|
onKillFocus |
| 187 |
|
onPress |
| 188 |
|
onRelease |
| 189 |
|
onReleaseOutside |
| 190 |
|
onRollOut |
| 191 |
|
onRollOver |
| 192 |
|
onSetFocus |
| 193 |
|
onActivity |
| 194 |
|
onStatus |
| 195 |
|
onSelect |
| 196 |
|
onData |
| 197 |
|
onLoad |
| 198 |
|
allowDomain |
| 199 |
|
allowInsecureDomain |
| 200 |
|
onMouseDown |
| 201 |
|
onMouseMove |
| 202 |
|
onMouseUp |
| 203 |
|
onMouseWheel |
| 204 |
|
onEnterFrame |
| 205 |
|
onUnload |
| 206 |
|
onLoadComplete |
| 207 |
|
onLoadError |
| 208 |
|
onLoadInit |
| 209 |
|
onLoadProgress |
| 210 |
|
onLoadStart |
| 211 |
|
onID3 |
| 212 |
|
onSoundComplete |
| 213 |
|
onResize |
| 214 |
|
onChanged |
| 215 |
|
onScroller |
| 216 |
|
); |
| 217 |
my @symbols; |
my @symbols; |
| 218 |
|
|
| 219 |
# 1. read flasm code from STDIN |
# 1. read flasm code from STDIN |
| 256 |
|
|
| 257 |
# function declarations; single quotes might not be there! |
# function declarations; single quotes might not be there! |
| 258 |
if (m/$regex->{function}/) { |
if (m/$regex->{function}/) { |
| 259 |
s/'*$symbol'*/'$symbol_counter'/i; |
s/\s'*$symbol'*\s/ '$symbol_counter' /i; |
| 260 |
|
|
| 261 |
# "constants"-line at begin of each block; single quotes should already be there |
# "constants"-line at begin of each block; single quotes should already be there |
| 262 |
} elsif (m/$regex->{constants}/) { |
} elsif (m/$regex->{constants}/) { |