AutoHotkey Community

It is currently May 27th, 2012, 11:00 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: February 19th, 2007, 8:11 pm 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
Hi!

I've a little problem:
I'd like to uncompress a self-compiled AHK-Exe-File...

If I use "upx.exe -d Test.exe" the file is uncompressed but ends in "EXE corrupted".

I'm using upx version 2.03..

Thalon

_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 19th, 2007, 8:18 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Compressing and uncompressing after the script has already been compiled is usually problematic. You can, however, remove upx.exe from the compiler directory to have it compile without any compression. [Source]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 19th, 2007, 8:52 pm 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
Thanks jonny!

The topic does help a lot.
But do you know why upx does corrupt the exe when uncompressing or compressing when compiled uncompressed?
Just as Chris mentiones here:
Chris wrote:
Even if it helps, such EXEs cannot be subsequently compressed with UPX without corrupting them.

Thalon

_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 20th, 2007, 4:29 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
No, I don't know. Sorry.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2007, 10:31 pm 
Offline

Joined: March 24th, 2007, 8:10 pm
Posts: 39
Hi,

Thalon wrote:
But do you know why upx does corrupt the exe when uncompressing or compressing when compiled uncompressed?

I think I do: It seems the compiler takes the output of UPX and adds something (maybe the script itself?) to the EXE. It you decompress it, you lose that something. The same would happen if you try to compress an uncompressed compiled script (once decompressed in memory, it doesn't find the "something" where it should be in the file).


Last edited by atnbueno on March 25th, 2007, 9:00 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2007, 8:55 am 
Thanks, but normally UPX doesn't change anything at the abilities of the exe, but it might be that internal ressources aren't adress correctly..


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 9th, 2007, 6:28 pm 
Offline

Joined: April 9th, 2007, 4:43 pm
Posts: 172
To decompile a script, you should use "exe2ahk".
You can download it here:
http://www.autohotkey.net/~John/Exe2Ahk.exe

Run it from the command prompt.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 10th, 2007, 7:22 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
He doesn't ask to decompile, but to decompress...

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 5th, 2007, 12:31 am 
Offline

Joined: December 5th, 2007, 12:26 am
Posts: 5
It looks like some sort of bizarre "security feature". UPX doesn't "do" anything, any more than zip or rar does, so it's not UPX's fault. I regularly compress and decompress .exe files from my explorer right-click menus, but AutoHotKey binaries have this "key" of some sort to prevent this.

Why?

It's an Open Source application, isn't it? So why this "feature"?

I'd like to decompress, alter resources (like version info strings, etc) and then compress again, something I do regularly with AutoIt applications.

Is this ever likely to be possible with AutoHotKey?

;o)
(or


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Edd, Exabot [Bot], HotkeyStick, Yahoo [Bot] and 15 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group