
Originally Posted by
maat7043
Good Job! I glad you figured this out so mac users have to help
contribute.
Thats also a cool script for the 13 to 13.1. Im not familiar with macs but seeing that its done in one line
makes it impressive
Thanks @
maat7043
I do hope it gives incentive to contribute, or at least to show others if they look at these scripts that they can do it too, and get away from this crappy "Im on a Mac I can't do it, please help me waaaahh!"
I've actually been sitting on these for quite a while now. I got the idea from JustAnoobROTMG after mentioning he had made batch files to do his Decompile and one for Compile.
Also the script is larger than 1 line, that line is where the numbers need changed.
Code:
#!/bin/bash
cd *//rabcasm
mv *.swf client.swf
./swfdecompress client.swf
./abcexport client.swf
./rabcdasm client-1.abc
cd ~/Desktop/rabcasm/client-1/com/company/assembleegameclient/parameters
vi '+%s/\"13\"/\"13.1\"/g' '+wq' Parameters.class.asasm
cd ~/Desktop/rabcasm
./rabcasm client-1/client-1.main.asasm
./abcreplace client.swf 1 client-1/client-1.main.abc
mv *.swf Hexed.swf
exit 0
---------- Post added at 09:30 PM ---------- Previous post was at 08:58 PM ----------
Quick Hex
If the decompile and compile is removed from the Hexer script, this thing finds and replaces in a blink, its really very quick. But the swf would need to be uncompiled firstly to access the client-1 folder.
But in case someone is reading and would rather just the hexing script for an uncompiled swf. use this:
Code:
#!/bin/bash
cd ~/Desktop/rabcasm/client-1/com/company/assembleegameclient/parameters
vi '+%s/\"13\"/\"13.1\"/g' '+wq' Parameters.class.asasm
mv *.swf Hexed.swf
exit 0
You dont even really need the line: mv *.swf Hexed.swf :all this is doing is renaming your file from whatever.swf to Hexed.swf. so your script will be only 3 - 4 lines lol
Creating your first Hex script
To create a shell script, open a new empty file in your editor. Any text editor will do.
Place the above code into your text file.
Save - name it any name, and remember where you are saving it to. e.g. Hexer2 and maybe place on your Desktop.
Go to your file and replace the .txt or .rtf to .sh ... e.g. Hexer2.txt and change it to Hexer2.sh
Open Terminal
Here we need to 'cd' to the directory with your file. To do this type:
press return
Now to make your file executabe, in Terminal type:
And finally, a few ways to execute your file:
1: you would need to open Terminal and execute your file by typing:
2: What I have done to allow double clicking of your file:
Right click on your file and select "Get Info"
Down the info you will see "Open With"
Click the drop down menu, if Terminal is not in the menu, simply select "Other..." at the bottom of the drop down and go to Applications / Utilities / Terminal.
3: you could also change the .sh to .command
Thats it, you should be able to simply double click your new script
