Jump to content



Photo

ResHacker project


  • Please log in to reply
168 replies to this topic

#1 trancexx

trancexx

    Hm, I really shouldn't.

  • Active Members
  • PipPipPipPipPipPip
  • 5,242 posts

Posted 07 December 2008 - 07:58 PM

Resources viewer and compiler.

You can drop file (dll, exe ...) on treeview or use menu control to load file, or drop file on executable after compiled or just run and use it as a resource dll compiler.

Constructive comments are always welcomed.

New script attached (16th April 2009)


How to use compiling option:
- click on Action menu.
- choose Initialize Compiler.
- go to menu again and choose Generate Initial DLL
- any file that you want to add to your resource dll drop on tree view or use Add Resource button. New window pops up. You need to chose type, name and language of resource. You can choose to use predifined values, only name is required in that case.
- when you are done with modifications save new dll file. File menu will have Save as... option
- that's it. You have your resource dll compiled with AutoIt




Supported resources:
- RT_CURSOR
- RT_BITMAP
- RT_ICON
- RT_MENU
- RT_DIALOG
- RT_STRING
- RT_ACCELERATOR
- RT_GROUP_CURSOR
- RT_GROUP_ICON
- RT_VERSION
- RT_ANICURSOR
- RT_ANIICON
- RT_HTML
- RT_MANIFEST
- AVI (special)
- WAV (special)
- JPEG (special)
- PNG (special)
- GIF (special)

By supported I mean that resource can be viewed and/or saved. Other resources are shown as hexadecimals, with ASCII character and address display.

Download script (zip format due to upload size limit):
Attached File  ResourcesViewerAndCompiler.zip   41.01KB   4006 downloads


edit: had to remove the old attachment to make more space in my attachment folder.

Edited by trancexx, 20 October 2009 - 02:41 PM.

  • wakillon likes this

eMyvnE








#2 smashly

smashly

  • Active Members
  • PipPipPipPipPipPip
  • 1,635 posts

Posted 08 December 2008 - 02:56 AM

Nice work trancexx,
Thank You for sharing.

Cheers

#3 trancexx

trancexx

    Hm, I really shouldn't.

  • Active Members
  • PipPipPipPipPipPip
  • 5,242 posts

Posted 14 December 2008 - 10:22 AM

Thanks guys (girls? :) )

I've noticed that Vista is arguing about combination of FileOpenDialog() and GlobalSize function from kernel32.dll, so script is modified to avoid that.

Also, you can drop files on TreeView to load them now and if you compile the script you can drop on it (...you know) to load the dropped file.

Resources that I'm currently working on to show properly are shown as hexadecimals, with ASCII character and address display.
Btw, Im trying to keep the functions as standaloneable (word?) as possible. That's why some parts of the code may be or look the same as in some other function.

Parallel with this I'm working on "compiling" part of the final script and it's at about the same stage as this is.

I'm inviting everyone to join me in this. Post suggestions and codes (no includes so that we all learn something about DllCall() and other nice functions), or don't. It's ok.
It would be incredibly cool to have the ultimate PE Viewer and resource compiler written in AutoIt.

eMyvnE


#4 torels

torels

    I Hacked 127.0.0.1! :D

  • Active Members
  • PipPipPipPipPipPip
  • 676 posts

Posted 14 December 2008 - 10:28 AM

Nice Work!
Some Projects:indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

#5 trancexx

trancexx

    Hm, I really shouldn't.

  • Active Members
  • PipPipPipPipPipPip
  • 5,242 posts

Posted 16 December 2008 - 07:08 PM

I'm attaching new script (first post). Now it's able to process wav and avi resources if stored properly.

I have to comment on the great interest for this here. Last attachment had 8000x10^-3 downloads. Incredible! That speaks something.
Poor code -> poor interest. Right? Yes, right.

eMyvnE


#6 wraithdu

wraithdu

    I am less fun than a twisted ankle.

  • MVPs
  • 2,140 posts

Posted 16 December 2008 - 08:00 PM

Looking really good! I like the interface, and you handle the icons nicely. Only thing I could see now, is to be able to resize the two halves of the GUI separately by dragging the divider bar.

#7 trancexx

trancexx

    Hm, I really shouldn't.

  • Active Members
  • PipPipPipPipPipPip
  • 5,242 posts

Posted 16 December 2008 - 10:23 PM

Looking really good! I like the interface, and you handle the icons nicely. Only thing I could see now, is to be able to resize the two halves of the GUI separately by dragging the divider bar.

What icons??

Except of that incredibly beautiful half naked female body that get drawn on screen when... you know, I'm not seeing any icons.
Do you see icons somewhere? Do you see icons?

eMyvnE


#8 Skrip

Skrip

    Psychonaut

  • Active Members
  • PipPipPipPipPipPip
  • 2,341 posts

Posted 16 December 2008 - 10:57 PM

incredibly beautiful half naked female body

Where...? I have to judge for myself.
  • n1maS likes this

We're trapped in the belly of this horrible machine.And the machine is bleeding to death...


#9 wraithdu

wraithdu

    I am less fun than a twisted ankle.

  • MVPs
  • 2,140 posts

Posted 16 December 2008 - 11:35 PM

Umm, yeah, icons....

Edited by wraithdu, 16 December 2008 - 11:36 PM.


#10 Innovative

Innovative

    Super powers FTW!

  • Active Members
  • PipPipPipPipPipPip
  • 572 posts

Posted 17 December 2008 - 08:39 AM

It'll be even better with features like extracting of icons and editing of the resources =)

Nevertheless, awesome job !

EDIT : I see those string tables , is it possible to know what string is it ? Because it's all in unreadable text o.O

Edited by xVivoCity, 17 December 2008 - 08:40 AM.


#11 DexterMorgan

DexterMorgan

    My Member Title

  • Active Members
  • PipPipPipPipPipPip
  • 890 posts

Posted 17 December 2008 - 11:25 AM

This is great, ovbiously not as great as REShacker but, very very good start, keep it up and It will be one of the bes :)
code

#12 trancexx

trancexx

    Hm, I really shouldn't.

  • Active Members
  • PipPipPipPipPipPip
  • 5,242 posts

Posted 17 December 2008 - 10:13 PM

Umm, yeah, icons....

aaaahhh, that icons :)
I thought you meant icons :)

Yes, you are right about that ones.


@Firestorm, bug maybe?


anyway... I couldn't find appropriate resizing value for bitmaps (current one is changing the size of the shown bitmap when resizing GUI), so I added it to that function that is handling positioning of the mci window.
Accelerators tables are over and can be shown, seen as they are. Some data types are more correct now.
Will update... eventually.

Extracting icons and other resources are already prepared if you look at the posted code deeply.

eMyvnE


#13 Dampe

Dampe

    Polymath

  • Active Members
  • PipPipPipPip
  • 231 posts

Posted 18 December 2008 - 09:01 AM

Wow, this is nice.
Would be awesome to see some more functions for saving / editing :)
Posted Image

#14 corgano

corgano

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 724 posts

Posted 18 December 2008 - 02:42 PM

one of the better things i have seen, very nice.

can it save like reshacker could?

maby add a feture to extract icons or other partd of the target program

Edited by corgano, 18 December 2008 - 02:54 PM.

0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

#15 trancexx

trancexx

    Hm, I really shouldn't.

  • Active Members
  • PipPipPipPipPipPip
  • 5,242 posts

Posted 19 December 2008 - 01:58 AM

New script (first post) have ability to extract resources.

I've added support for RT_ACCELERATOR resource and progress control for gui and generally it's much powerful now.

eMyvnE


#16 wraithdu

wraithdu

    I am less fun than a twisted ankle.

  • MVPs
  • 2,140 posts

Posted 20 December 2008 - 01:23 AM

Really looking good!

#17 corgano

corgano

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 724 posts

Posted 20 December 2008 - 08:21 PM

OP: this would take alot of work but maby a feture to convert and export parts of the program to autoit?

*edit*
what i mean is you select a gui or peice of code in the program you are veiwing, and it will convert it to autoit for you

Edited by corgano, 21 December 2008 - 05:22 AM.

0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

#18 wraithdu

wraithdu

    I am less fun than a twisted ankle.

  • MVPs
  • 2,140 posts

Posted 21 December 2008 - 01:06 AM

@corgano
That....makes no sense. I don't think you have any idea what you're asking.

#19 trancexx

trancexx

    Hm, I really shouldn't.

  • Active Members
  • PipPipPipPipPipPip
  • 5,242 posts

Posted 21 December 2008 - 01:12 PM

After the edit (I don't know what was the original post :) ) it has sense... for RT_MENU and RT_DIALOG. I suppose those two could be converted to AutoIt code, but I'm currently focused on getting sense out of binary data of the resources.

Anyway, I did it for RT_STRING resource. I was struggling about determining string ID, but It turned to be kind of obvious how to get it :o
Also, sometimes some bitmaps are not stored inside PE file properly, few of them inside shell32.dll (XP for sure), and that caused them not to be extracted properly (bitmap offset was not right). Improved BMP header generating algorithm.
Improvement arround file saving dialog too.

Will update soon. If you are interested peek up.

eMyvnE


#20 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,409 posts

Posted 21 December 2008 - 01:17 PM

Looks very good trancexx!! :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users