Skip to main content

How To Hide Data Behind File Using Python

The Python Way :-

It is possible to hide some data into an image using CMD as demonstrated in my previous post. In this post we are going to accomplish just that but by using Python. Now you must be thinking if we can do it using command prompt in Windows then why should we bother with python, so the answer to that question is Because We Can..!!


hidden-data-behind-image

Behind The Scene :-
Before i tell you how to hide the data into an image, let's discuss what is really happening in the background :-
The process opens each file at it's binary state and merges them into one. To view the image you can open it simply and if you want to view the hidden data open it with any archiver software like 7zip or WinRAR as the files must be first archived before merging into the image.

Don't Miss :- Password Protect Any Folder In Windows (No Software)

Requirement :-
  • Python Compiler
  • Text Editor
The Process :-
Type the following lines in a text file and save it with .py extension :
  • image = open("image.jpg", "ab")
  • archive = open("file.zip","rb")
  • image.write("\n"+archive.read())
  • image.close()
  • archive.close()

Here image.jpg is the image behind which the data will be hidden and file.zip is the file which contains the data to be hidden.
So, with just 5 lines of code we can easily hide our data from the eyes of an unsuspecting user. Note that it doesn't encrypt the data in any way, a user with some know-how could still find the information that is hidden.

If you feel the need to split the files again you can create and run this python script same as above :
  • import os
  • imgsize = os.stat("image.jpg").st_size
  • image = open("image.jpg", "ab")
  • archsize = os.stat("file.zip").st_size
  • archive = open("file.zip","rb")
  • image.write("\n"+archive.read())
  • image.close()
  • archive.close()
  • narchive = open("file2.zip", "wb")
  • old = open("image.jpg", "rb")
  • oldr = old.read()
  • data = oldr[-archsize:]
  • narchive.write(data)
  • narchive.close()
  • old.close()

Just run this script and your file will be splitted in no time.

Comments



  1. If you ever want to change or up your university grades contact cybergolden hacker he'll get it done and show a proof of work done before payment. He's efficient, reliable and affordable. He can also perform all sorts of hacks including text, whatsapp, password decrypt,hack any mobile phone, Escape Bancruptcy, Delete Criminal Records and the rest

    Email: cybergoldenhacker at gmail dot com

    ReplyDelete

Post a Comment

Popular posts from this blog

Free Download DELmE's Batch Virus Creator Tool (Updated 2018)

DELmE's Virus Generator DELmE’s Batch Virus Generator is an amazing virus creation program with lots of options to infect the victim’s PC such as formating C: drive, deleting all files in Hard Disk Drive, disabling admin Privileges , cleaning registry, changing home page, killing tasks, disabling/removing antivirus and firewall and lots more.

Top Websites To Send Fake Messages To Anyone

Hey Guys in today's post I will show you some cool websites that will let you send  sms  to anyone anonymously.   If you want to send messages without paying a single penny and also without registration go to below listed sites and enjoy SEND ANONYMOUS SMS This Service Is Completely Anonymous.Your Mobile No. Will Not Be Shown Anywhere. Click Here  to visit the website 

How To Use ProRat Easily Tutorial

Today I will show you how to configure ProRat Trojan to hack into your victim's computer. ProRat is also a Trojan making program which is similar to Beast Trojan but in compare to Beast, ProRat is much better. It can connect to the server more faster. It has more features/functions to play with your victim's PC. Easy to configure.