Jump to content

ResHacker project


trancexx
 Share

Recommended Posts

@trancexx

Very nice !! :)

2 small improvements :

1. Add the full path + filename in the status bar at the bottom

2. Add a button to Expand / Collapse all Tree Items

Regards

ptrex

Thanks

If I add full path then it won't fit there. Main problem is (would be) caused by some big bitmap resource because it is drawn in its full size and if I move "Save Selected" button to the right to make space for file name + path then that button would be covered by mentioned huge bitmap. Full path is there as a tip on the filename label. But I could change window title.

Will add Expand / Collapse option in Wiew menu (to be).

edit:

Nice avatar

Edited by trancexx

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

You know that SciTE quality to show how many instances of it is running an what is current one that you view. Information about this is in SciTE window title. Something like: "path\name - SciTE [2 of 7 ]"

I find that very useful an wanted to implement that in one of my script. This is the idea:

1. When script starts call function CreateSemaphore from kernel32.dll. Use unique string (GUID)

2. Call ReleaseSemaphore function from kernel32 to increas the count of the semaphore object by one

3. Register new unique window message using function RegisterWindowMessage from user32.dll

4. Use function SendMessageCallback from user32.dll to send message to all top-level windows in the system. This message will be caught only by our windows. This is to say "Hey I'm here and I'm your new instance!"

5. Use GUIRegisterMsg() to register function ( _IntermediaryFunction) that deals with enumeration. Message ID is return value of RegisterWindowMessage (step 3)

To make it work properly few more steps needs to be done when our script is about to exit:

6. Get handle of our the semaphore object (that is done for example calling CreateSemaphore function again)

7. Decrease the semaphore's count by one calling function WaitForSingleObject from kernel32.dll

8. Use SendMessageCallback from user32.dll to announce other windows intention to exit.

Other windows processes that message and updates their titles (step 5).

And that's it!!!

No script here but I've made ResHacker wannabe update. In newly attached script this method is fully implemented.

Link to Example script

Check it, it's totaly cool

Edited by trancexx

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

trancexx

You know that SciTE quality to show how many instances of it is running an what is current one that you view. Information about this is in SciTE window title. Something like: "path\name - SciTE [2 of 7 ]"

I find that very useful an wanted to implement that in one of my script. This is the idea:

1. When script starts call function CreateSemaphore from kernel32.dll. Use unique string (GUID)

2. Call ReleaseSemaphore function from kernel32 to increas the count of the semaphore object by one

3. Register new unique window message using function RegisterWindowMessage from user32.dll

4. Use function SendMessageCallback from user32.dll to send message to all top-level windows in the system. This message will be caught only by our windows. This is to say "Hey I'm here and I'm your new instance!"

5. Use GUIRegisterMsg() to register function ( _IntermediaryFunction) that deals with enumeration. Message ID is return value of RegisterWindowMessage (step 3)

Useful information. Thank you! Oh... yes, very good script! 5 stars :)
Link to comment
Share on other sites

trancexx

Useful information. Thank you! Oh... yes, very good script! 5 stars :)

Thanks

I forgot to mention that new script requires AutoIt 3.3.0.0. That is because this AutoIt's version is dealing with some structures, data types, (more) properly.

Now you can do this:

$tStructure = DllStructCreate("char[6]")
DllStructSetData($tStructure, 1, "AutoIt")
ConsoleWrite(DllStructGetData($tStructure, 1) & @CRLF)

Previously you would have to do it like this:

$tStructure = DllStructCreate("byte[6]")
DllStructSetData($tStructure, 1, "AutoIt")
ConsoleWrite(BinaryToString(DllStructGetData($tStructure, 1)) & @CRLF)

If you run versions prior 3.3.0.0 you will get error because null terminator is replacing the last character in created structure - DllStructGetData($tStructure, 1, 6) - thus giving false reading.

Edited by trancexx

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

  • 2 weeks later...

That's nice HypercamJ. Thanks for the effort.

New script attached. This one is capable of compiling. For newly created dlls untill it's bug-free.

I've made a new comment in first post on how to use this new option. Bugs are to be expected in this phase in some special situations (I can create them - that's good, lol), or maybe not so special, khm...

If something is not working for you or anything else please say.

It's compiling dlls from thin air now. I told you.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

  • 3 weeks later...

New version available (first post as always).

What's new?

- RT_DIALOG support (few more resources and viewer will be complete)

- usage of SHMessageBoxCheck function from shlwapi.dll for some messages. This dialogs have in future don't show this... blah, blah option. This function is available on some systems (my XP SP3 does not support it, but Vista is)

- new menu added for restoring default dialogs' behaviour.

- treeview context menu added. One item available. It will expand/collapse all treeview type items.

- window title is proccessed by PathCompactPath function from shlwapi.dll. Result of this is gained accent on name of loaded file. Just check it to see what I'm trying to say.

- minor other changes.

That's it.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

New version available (first post as always).

WOOT!!! UPDATE!!!!

when you open a section of text, it shows you the hex values and then the text

-could you add an option to hide or show the hex part?

-could you make it so if you edit the text it will let you save the exe?

your dialouge preveiw is cool

-the display is a little glichey.

-could you make it also display the code?

--to make it display the preview it must have used some script to convert it to autoit gui format, you could export it that way

-could you make it display the code so if you edit it you cane save it to the exe?

the picture/bitmap view/exporter works perfectally

-being able to edit or replace the images would be awesome

Edited by corgano

0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Link to comment
Share on other sites

WOOT!!! UPDATE!!!!

when you open a section of text, it shows you the hex values and then the text

-could you add an option to hide or show the hex part?

-could you make it so if you edit the text it will let you save the exe?

your dialouge preveiw is cool

-the display is a little glichey.

-could you make it also display the code?

--to make it display the preview it must have used some script to convert it to autoit gui format, you could export it that way

-could you make it display the code so if you edit it you cane save it to the exe?

the picture/bitmap view/exporter works perfectally

-being able to edit or replace the images would be awesome

What is text? Is that string? Let's say it is. How do you define string? What is the end of the string?

There are certain rules that needs to be followed.

Currently, I'm using rather simple algorithm to detect resource that is meant to be stored or accessed as a string. If something that you see is not in form of plain text then likely it's not meant to be presented like that. That's why you are seeing it like hexadecimal (with address and translated part).

What do you mean glichey?

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

  • 2 weeks later...

New version again - first post.

I've been playing with gdi+ functions. Two ProgAndy's contributions are used as fundament(s) for new exiting features.

What's new?

- RT_MENU support

- JPEG, PNG and GIF also. This images are automatically recognized and processed properly afterward. Plenty of available data on images tips. Animated GIFs are shown animated and listview control is populated with frames and informations about delays. Compile some if you don't have acces to file with GIF resource to see GIF handling. I tried some huge GIFs and all went well.

- since gdip is used in script I used it to add small image next to Save Selected button. This image is shown (with tip on it) when dealing with compressed images.

- few small fixes and some more error checkings

- script is little over 200 kB therefore it's in zip format now, due to upload size limit

I think that's all.

edit:

Frame that preceded next one - transparent gifs - were not cleared causing inproper display (all shown). Fixed now.

Edited by trancexx

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

I'm sorry, but I'm missing something. I have compiled my dll but how do I load my jpg from it to display in another script? All I want to do is add my pics to my script, is there an easier way? Any samples would be greatly appreciated.

Link to comment
Share on other sites

I'm sorry, but I'm missing something. I have compiled my dll but how do I load my jpg from it to display in another script? All I want to do is add my pics to my script, is there an easier way? Any samples would be greatly appreciated.

Use functions from ResourcesViewerAndCompiler.au3 to do that. All you have to do is chop it out and add to your script.

Also Zedna (link) made a script to do that.

Task is extremely simple for e.g. bitmaps or icons and just a little more complicated for other images (jpg, gif...) because of gdip functions.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

Hi Transxx

its out out of topic , hope u dont mind.

can you made a udf which will return the Sections of PE file and also the offset of sections?

for example :

the PE file contain 3 sections

1: ".text"

2: ".rdata"

3: ".data"

and the offsets are

1: 0x00DB0

2: 0x01400

3: 0x01CD0

i can get this information with PE explorer but dont know how to split the bytes and how to get the offsets for sections.

actually i want to analysis the files with some signatures , currently i m analysis the whole file (extremely slow), if it possible so my program will be much faster.

73 108 111 118 101 65 117 116 111 105 116

Link to comment
Share on other sites

Of course I don't mind.

That guy from the third post did that what you want/need. Search the forums for PEScope crashdemons (what a nick - mean mdfk).

You should locate $tagIMAGE_SECTION_HEADER in his script(s) and everything arround it. If you would have troubles doing that I'm sure he (...or me, or someone else) will help you.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

Of course I don't mind.

That guy from the third post did that what you want/need. Search the forums for PEScope crashdemons (what a nick - mean mdfk).

You should locate $tagIMAGE_SECTION_HEADER in his script(s) and everything arround it. If you would have troubles doing that I'm sure he (...or me, or someone else) will help you.

Thanks for REF, i have to work on it :P

73 108 111 118 101 65 117 116 111 105 116

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...