Follow us on Twitter!
Your life is ending one minute at a time. If you were to die tomorrow, what would you do today?
Monday, June 27, 2016
Navigation
Home
 Find:
 Information:
Learn
Communicate
Submit
Shop
Challenges
 Exploit:
 Programming:
 Think:
 Track:
 Patch:
 Other:
 Need Help?
Other
Members Online
Total Online: 45
Guests Online: 41
Members Online: 4

Registered Members: 94292
Newest Member: nice
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

reading bmps


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 18-02-06 21:06
i want to make a program in c, to convert a bmp (or other types) file to text. i have read some thing about the structures of the headers, but i dont know how to start. any help?


Author

RE: reading bmps


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 18-02-06 21:20
you mean that you can see the shapes of the pictures in ASCII?
else just let C change the name to .txt Wink


Author

RE: reading bmps


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 24-02-06 14:11
i mean to read the bits of each pixel, so i can change them. something like steganography.


Author

RE: reading bmps


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 24-02-06 20:07
you could read the file you'd gt text the encrypt that some how then you could save it and have a decrypter. to fix it
Code

#!/usr/bin/python
a=open('image.bmp', 'r')#open file to encode
b=a.read().replace('a','password')#chnage a to password
#Or some encryoting algo.
c=open('image1.enc', 'w')#make a file .enc (ranodm lol)
c.write(b)# write to it
c.close()#close files
a.close()



that will take a bmp file and make it impossible to view by replacing all the a's in the encoding with password. this is the decoder.
Code

#!/usr/bin/python
a=open('image1.enc', 'r')#opne image file
b=a.read().replace('password','a')# read it and chnage pasword to a
#or the revearse algo
c=open('image.bmp', 'w')#open file to wreite to
c.write(b)#wriet to it
c.close()#close files
a.close()





That would do it, its a bit conveluted but it makes it easier to understand




Edited by on 24-02-06 20:17