LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-10-2010, 07:00 AM   #1
saurabhpandey39
LQ Newbie
 
Registered: Nov 2010
Posts: 9

Rep: Reputation: 0
md5sum


i have a file and i want to change the content of file but i also want that md5sum of that file remains same.
is it possible?
if yes then send me the procedure.
 
Old 11-10-2010, 07:05 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Yes, it is possible, but it's a hack, and I suspect malevolent intent, so no I will not help. Unless, you say what you need it for.
 
Old 11-10-2010, 02:12 PM   #3
saurabhpandey39
LQ Newbie
 
Registered: Nov 2010
Posts: 9

Original Poster
Rep: Reputation: 0
md5sum

i just want to know how it can be done.
i have no intention to do anything wrong.
so please tell me how i can do it.
 
Old 11-10-2010, 03:16 PM   #4
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Umm... if you say that then I am in trouble. I have my debian 4 connected to the internet and all I am betting on is the md5sum that I check ocassionally. So far I do not think there is anything wrong with my pc. I can install tripwire but then I suppose it is too late. Any suggestions for me?
 
Old 11-10-2010, 04:12 PM   #5
martinbc
Member
 
Registered: Jun 2010
Distribution: Ubuntu, played with Puppy Slitaz & OpenSUSE
Posts: 40

Rep: Reputation: 4
Well one way could be to add 128bits to the end of the file and then try every combination possible in those 16 bytes performing md5sum on each until it produces the right value.

Might take a few days though!
 
Old 11-10-2010, 04:22 PM   #6
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
@Martinbc, sorry but I am not that fluent in Linux. Can you simplify the answer please?
 
Old 11-10-2010, 10:50 PM   #7
hilyard
Member
 
Registered: Jan 2010
Location: Inland PNW
Distribution: Lite | siduction
Posts: 291

Rep: Reputation: 66
I thought I detected sarcasm there, maybe in both posts! LOL
 
Old 11-10-2010, 10:59 PM   #8
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,845

Rep: Reputation: 452Reputation: 452Reputation: 452Reputation: 452Reputation: 452
You would think he/she could make up an example.
 
Old 11-11-2010, 11:01 AM   #9
saurabhpandey39
LQ Newbie
 
Registered: Nov 2010
Posts: 9

Original Poster
Rep: Reputation: 0
md5sum

if anyone know what i asked then please tell me with a example on linux or windows
 
Old 11-11-2010, 11:09 AM   #10
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
If you don't intend to do something bad with it, why don't you say what you need it for ?
 
Old 11-12-2010, 10:19 AM   #11
saurabhpandey39
LQ Newbie
 
Registered: Nov 2010
Posts: 9

Original Poster
Rep: Reputation: 0
md5sum

i told u that it is just for my knowledge and nothing more
so if u know please tell me
or send it to my mail
 
Old 11-12-2010, 04:34 PM   #12
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
I hope I did not offend anyone with saying something I did not really mean.
@martinbc I apologise if somehow I said something that was rude or offensive. I did not mean it.
I speak, write and understand four languages... and english is in someway my fourth language so please bear with me. Adding to it is the complication that all I have is a mobile (a very basic one) to post so it is that somehow I have only a limited screen space that I can see and I have to pack everything in very small place.
I am not a programer neither will I ever be but then I love the philosophy of linux and so I will stick around for perhaps my lifetime. So making some people like you all my enemies is something I am not really willing to do.
Sorry again if sarcasm was detected - I did not mean it.
 
Old 11-12-2010, 04:54 PM   #13
martinbc
Member
 
Registered: Jun 2010
Distribution: Ubuntu, played with Puppy Slitaz & OpenSUSE
Posts: 40

Rep: Reputation: 4
Hi SilverBack

I took no offence to anything you said and did not think you rude.
I wish I had the knowledge, intelligence, skill and patience to master four languages. What talent I have is in a different direction.
If there was any misunderstanding, it comes from me not making it obvious that the suggestion was not a serious one.

Your friend

Martin


I haven't done a calculation but I doubt there is enough coal and oil on this planet to power the computers long enough to solve the problem in the inefficient way I suggested. It would certainly give rise to a very high electricity bill.
 
Old 11-12-2010, 05:11 PM   #14
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
@martinbc - thanks that is really appericiated. Getting back to me was very polite. Thanks again.
BTW: I speak with my wife in one language and then with family (joint family) a different one, at work english ofcourse and with my sister-in-law and her family another one. And I have to it on a daily basis
 
Old 11-12-2010, 07:11 PM   #15
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
I wonder
Quote:
I thought I detected sarcasm there, maybe in both posts! LOL
hGiven that it is common knowledge that practically, changing a message will result in a different digest, may be the poster should clarify which two posts seem sarcastic.

To the OP. It is not possible unless you cheat the system - by hard-coding the output - irrespective of the computed result.

I give you the following reference from wikipedia: http://en.wikipedia.org/wiki/Md5sum

and quotes from it:
Quote:
md5sum is a computer program that calculates and verifies 128-bit MD5 hashes, as described in RFC 1321. The MD5 hash (or checksum) functions as a compact digital fingerprint of a file. It is extremely unlikely that any two non-identical files existing in the real world will have the same MD5 hash
OK.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MD5SUM How to use it Baz Linux - Newbie 10 11-12-2013 10:39 AM
cp changes md5sum kel_en Mandriva 0 07-05-2005 08:44 AM
Md5sum Brad52 Mandriva 1 05-20-2005 04:47 PM
Different md5sum no. BW~Merlin Linux - Newbie 1 11-24-2004 04:48 AM
Help with MD5SUM Smokeball Linux - Newbie 3 08-30-2003 10:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration