magicalhobo / swfwire Goto Github PK
View Code? Open in Web Editor NEWFlash Development Tools
Home Page: http://www.swfwire.com/
License: MIT License
Flash Development Tools
Home Page: http://www.swfwire.com/
License: MIT License
Namespaces references use the URI instead of global variable name.
this.http://www.adobe.com/2006/flex/mx/internal.topLevel = false;
Should be:
this::mx_internal.topLevel = false;
This technique causes errors when:
const
sThis source code:
var obj:Object = {};
for(var iter:String in obj)
{
trace(iter);
}
Decompiles into:
forin(local3.hasNext())
{
local1 = String(nextname(undefined, undefined));
trace();
}
read a swf and write it ,the swf can't open.unless I write:
swf.header.signature = "FWS";
package com.swfwire.test
{
public function broken():Boolean
{
return true;
}
}
These functions show up in the class list, but show nothing when you click on them.
just after the start of a air swf debug session. very unstable. fps down to 1 and ui freezed.
Hi!
Please, look at this SWF:
http://www.sendspace.com/file/coet1u
It contains a DefineBinaryData tag.
But after Read-Write (using this code: http://pastebin.com/UudmEZYY) that tag is not present in the saved SWF:
http://www.sendspace.com/file/dxpzed
BTW, SWFWire Inspector fails with opening this file.
For clarification, in the abc code, "Declrement" is the name of the source file.
AcionScript:
https://gist.github.com/868318#file_decrement.as
Interfaces should be declared with the interface keyword, methods should not have bodies, and there should be no constructor.
public interface ITest {}
Decompiles into:
public class ITest
{
public function ITest() {}
}
var obj:Object = {a: 'test'};
with(obj)
{
trace(a);
}
becomes
var obj:Object = {'a': 'test'};
var local1 = obj;
//UNKNOWN OP: [object Instruction_pushwith]
trace(a);
Hi!
I have this error:
[Fault] exception, information=RangeError: Error #1125: The index 2 is out of range 2.
A the line 652 of file ABCReader.as:
if(!instructions[instructionId])
while trying to load this file:
http://www.sendspace.com/file/7iysgb
Loaded right as shown in example (Parse a SWF http://www.swfwire.com/decompiler)
This is a test.
com.swfwire.decompiler.SWF8Reader references class com.swfwire.decompiler.data.swf8.records.VP6SWFAlphaVideoPacketRecord, but no such class file exists, so it won't compile.
The following code turns into a huge group of nested if, and if duplicated a few times, takes more than a minute to decompile.
var obj:Object;
if(obj.prop == 1 || obj.prop == 2 || obj.prop == 3 || obj.prop == 4)
{
trace('if');
}
else
{
trace('else');
}
This source:
super.prop = 1;
decompiles into:
//UNKNOWN OP: [object Instruction_setsuper]
SWF Wire feature request:
create a configurable file with list of classes, that describe witch properties should be hidden, and it what order they should appear if shown.
Requirements:
try/catch statements are displayed inline
try
{
throw new Error('fail');
}
catch(e:Error)
{
trace('catch: '+e);
}
finally
{
trace('finally');
}
Decompiles into:
throw new Error("fail");
trace("finally");
The following code decompiles into if..else blocks:
switch(1)
{
case 1:
break;
case 2:
break;
}
bitand, bitnot, bitor, bitxor, lshift, rshift, urshift are not implemented.
I'd love to use the SWFWire Debugger to find objects that do not (but should) get garbage collected. But our rather large application fails with an error. Mac OS X 10.6. Here's the console:
Injection loaded
Attempting to load: file://localhost/private/tmp/game.swf
Loading: file://localhost/private/tmp/game.swf
Reading swf took: 829ms
Modifying swf took: 1423ms
Writing swf took: 3107ms
Writing to: /Applications/SWFWire Debugger.app/Contents/Resources/file:/localhost/private/tmp/game.swf.recompiled.0.swf
Error writing file to: file://localhost/private/tmp/game.swf.recompiled.0.swf
Everyone has read & write permissions in the tmp folder.
When I use an HTTP URL via localhost apache, I get the same thing, but the last line of the Console is:
Error writing file to: app-storage:/localhost-path-game.swf.recompiled.0.swf
Hi!
I got this error:
[Fault] exception, information=Error: Error #2030: End of file was encountered.
With this file:
http://www.sendspace.com/file/oz0pd9
Here is a stacktrace, hope it helps!
http://j.mp/UYtGbx
VerifyError: Error #1014: Class flash.system::Worker could not be found.
at SWFWireInspector/completeHandler()[/Users/crazy/flash/source/SWFWire/SWFWireInspector/src/classes/SWFWireInspector.mxml:248]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
This code:
public class SWFCorpse extends Sprite
{
public function SWFCorpse() {}
}
decompiles into:
public class SWFCorpse extends Sprite
{
public function SWFCorpse():* {}
}
This code:
public class SWFCorpse extends Sprite implements IEmpty
decompiles into:
public class SWFCorpse extends Sprite
Hey there, Sean!
I got this error:
[Fault] exception, information=ReferenceError: Error #1069: Property undefined not found on AS3.vec.Vector.com.swfwire.decompiler.abc.instructions::IInstruction and there is no default value.
at line 799 if the ABCReader.as file
while trying to read this file:
http://www.sendspace.com/file/jb8yeh
with AsyncSWFReader.
Stack trace:
http://j.mp/UYu9u7
It would be useful if hexadecimal bytes are showed when displaying AS bytecode. Something like this:
#4 pushnull // 0x32
#5 setlocal index: 14 // 0x63 14
var local13:* = null;
SWFs using the new AIR 3 features such as JSON are failing.
After cloning there is not hint about where/what the program entry point is.
Using a command-line based GNU/Linux distribution, what are the step the run the program?
And how compatible is it with gnash/lightspark/swfdec/...?
Hi!
Please, take a look at this files:
http://www.sendspace.com/file/jkwixe
gui.swf is an original file and gui_ren.swf is a file after this: http://pastebin.com/UudmEZYY
And this is a screenshot from ASV (decompiler): http://j.mp/PbFRnm
Left - original, right - re-saved.
As you can see, the re-saved file have a broken MovieClips nesting (and a much more items in the library at all).
E.g. Symbol 6 MovieClip is placed on the root, but originally it was inside the Symbol 7 MovieClip {bu1copy4}, etc.
Is there any reason the ABC bytecode to ActionScript generation code is in SWFWireInspector? Could it be moved SWFWireInspector to SWFWireDecompiler?
I made a small command line Air application that takes a SWF file as input and dumps all the classes as .as files in the current directory. (It's fairly slow, but works.). Almost all of the needed classes were in SWFWireDecompiler.swc and SWFWireUtils.swc, but I had to copy the com.swfwire.decompiler.* files from SWFWireInspector into my project. It would be nice to include them in the SWFWireDecompiler.swc library.
Images written with DefineBitsLossless2 should be previewable.
I'm trying to use the library to edit text inside an SWF file. The reason is that I want to do some kind of parser inside that SWF.
I am able to get content of the unknown tags. But they are in binary! Which makes modifying them just damage the file.
Help is much appreciated.
The type of local variables should be detected, then the declared at the first usage. Coercion should be removed when setting the variable.
local0 = Number(0);
Should be:
var local0:Number = 0;
This might need a new interface to handle binding and listening states.
The SWF can contain package, class, and variable names like "%$^#". These should be rewritten to alphanumeric versions, or replaced with random words.
If I'll read and then write (without any changes) using SWF10Writer this file:
http://www.sendspace.com/file/pf9ciq
It will become a significantly smaller and stop start in Flash Player.
Also this file will have a numerous different strange tags added.
The following code turns into garbage:
var vector:Vector. = new Vector.;
hi
https://www.dropbox.com/s/evp4e9v9sj12hi0/a.swf?dl=0
failed when parsing this swf file
and
does SWFWire support avm1 decompliling?
it seems that there's only code for DoABCTag in your src code.
Unambiguous package references should be turned into imports.
private var _moduleFactory:mx.core.IFlexModuleFactory;
Should be:
import mx.core.IFlexModuleFactory;
private var _moduleFactor:IFlexModuleFactory;
When I try to load this file in inspector 2.22:
https://www.dropbox.com/s/ougox3k5c80fsi3/testfile.swf
It says:
Done loading.
Parsing 1409733 bytes...
Uncaught Error.
Error: Error #2030
And doesn't do or say anything else.
Here is an ActionScript function that uses the 'newactivation' opcode. It is a mix of the functions generated by Sothink and Trillix decompilers but I am quite certain that I have reproduced the example correctly.
https://gist.github.com/865663#file_action_script%3A%20newactivation%20example.as
Here is the p-code that is generated from it:
https://gist.github.com/865659#file_opcode%3A%20newactivation
This source:
if(0 === 0)
decompiles into:
//UNKNOWN OP: [object Instruction_ifstricteq]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.