Hack Forums
[Python] (★ ★ Basic TWO Files Binder ★ ★)---[Tutorial]+[Source] - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] (★ ★ Basic TWO Files Binder ★ ★)---[Tutorial]+[Source] (/showthread.php?tid=3095533)

Pages: Pages 1 2


(★ ★ Basic TWO Files Binder ★ ★)---[Tutorial]+[Source] - Hydra_ - Dec 15, 2012

[img]http://s4.postimage.org/5ftaj2zrb/Hello_HF_2_copy.png[/img]

[img]http://s16.postimage.org/nltoy9fb9/File_Binder.png[/img]

It's been a long time guys since I made a thread here and a long time since I coded in python, just helping the guys. But here I am making something basic but I hope it's helpful for someone, or maybe it inspires someone 😉.
Let's begin ..

The idea is explained by the following image
Open Me :D (Click to View)

Explaining:
The main script will do the following tasks:
  1. Takes the location of the file no.1 you want to bind.

  2. Takes the location of the file no.2 you want to bind.

  3. Takes the the Name of the binded file (the final file after binding)

  4. Takes the location of the icon for the binded file (without .ico extension, it'd be added automatically by the script)

  5. Read file#1 and encode the read bytes to hex, then save them to a variable

  6. Read file#2 and encode the read bytes to hex, then save them to a variable

  7. Then comes the part of CREATING the other python file:
    • This script will have two variables contains the bytes of the the two files you want to bind, and first it has some code to Hide this script when it runs.

    • Then the part which will create files we binded.

    • Then the part which will RUN the binded files.



  8. After that, the main script will convert the SECOND (created) python script to exe via pyinstaller module with upx compression, then you have your files binded ✌




SOURCE: http://pastebin.com/cvC7548G
Download package: http://www.mediafire.com/?kd1aimbab3la4w6
The package contains: (Click to View)


Important Note
This script is a basic one, but maybe it teaches someone something he wasn't aware of, maybe it inspires someone with something. You are free to modify and edit the script. But, don't forget to give me the Credits 🙂




Any Question? just post and I will reply. Any help Post or PM me 😅
🤝 I hope you Enjoy this thread 🤝



* - zapfen - Dec 15, 2012

nice script will try it out when i got my pc back :S Thanks for you Facebook post :)


* - thething88 - Dec 15, 2012

Looks sick mate good job
Thank´s for contributing


* - glob - Dec 15, 2012

Looks pretty nice, thank you for the share and I will try this out soon ^ ^


* - Rhynorater. - Dec 16, 2012

Wow, that's really HQ dude. Nice work

-Rhynorater.


* - Dyme - Dec 16, 2012

I would never think that this could be done using python. Awesome work man.


* - I Eat Pixels - Dec 17, 2012

Impressive work Hydra. Keep up the HQ posts.


* - dberube - Dec 18, 2012

Good tutorial. It reminds me the first python program I released here (it was also a file binder).

There's something that really bugs me though... why did you used win32gui and win32console to hide the console?

You can use "--noconsole [filename]" as argument instead... 😏


* - Hydra_ - Dec 19, 2012

(Dec 18, 2012 03:09 PM)dberube Wrote:  Good tutorial. It reminds me the first python program I released here (it was also a file binder).

There's something that really bugs me though... why did you used win32gui and win32console to hide the console?

You can use "--noconsole [filename]" as argument instead... 😏

And I can save the script with .pyw extension either, I know 😝
I just forgot to mention, But I wanted to teach reader something they maybe doesn't know ✌


* - jazzycool - Dec 23, 2012

We have another python legend standing right besides rhynorater


* - Hydra_ - Dec 28, 2012

(Dec 23, 2012 11:57 PM)jazzycool Wrote:  We have another python legend standing right besides rhynorater

lol ... thanx a lot jazzycool. though I will be away for couple of weeks coz of Exams .. Oh Fuck 😠


* - Light Yagami. - Dec 29, 2012

Wow this is awesome i have never seen anything like this


* - Rhynorater. - Dec 29, 2012

Really cool proof of concept Hydra XD

-Rhynorater.


* - Hydra_ - Jan 6, 2013

(Dec 29, 2012 08:59 PM)ℛhynorater. Wrote:  Really cool proof of concept Hydra XD

-Rhynorater.

Thanx Rhyno.



* - z3r0.d4rkn355 - May 14, 2013

I just saw it. Will Definitely try it out.
And I am browsing your other threads on the python tools that you have released.
Great Work bro.