Need help for changing MD5 Hash of a remote Zip file.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
xceed
Forum Newbie
Posts: 5
Joined: Sat Mar 08, 2008 9:25 am

Need help for changing MD5 Hash of a remote Zip file.

Post by xceed »

Hey guys,

I want to change the MD5 Hash of a zip file on my server.

Is there anyway by which i can add 1kb text file to that file using some script or any way?
Or Is there any other way by which i can change the MD5 Hash of that file?

-------------------------------
I have found a script that changes the MD5 hash of a rar or zip file by adding 1byte to it but i dont know how to use it. Can someone please help

Code: Select all

<?
// Here the downloads
$path = "files";
 
if (isset($_GET['file'])) {
    $handle = fopen("$path/".$_GET['file']."", 'a+');
 
    if ($handle) {
        fwrite($handle, '0');
    } else {
        echo "<br />Error!<br />";    
    }
    
    fclose($handle);
}
 
echo "Just click to change the md5 hash<br /<br />";
 
 
 
$handle = opendir ($path);
 
 
while (false !== ($file = readdir ($handle))){
    if ($file != "."){
        if ($file != ".."){
            if ($file != "index.html") {
                
                $byte = filesize($path."/".$file);
                
                
                if (! is_dir($path."/".$file)) {
                    echo "<a href='uploads.php?file=$file'>uploads/$file</a> ($byte Bytes)<br />";
                }
            }
        }
    }
}
 
closedir($handle);
?>
Please Help.

Thankyou.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Need help for changing MD5 Hash of a remote Zip file.

Post by requinix »

You don't change the hash of something, you change its contents.

To edit a file on a remote server you'd have to download it, make your changes, and upload.
xceed
Forum Newbie
Posts: 5
Joined: Sat Mar 08, 2008 9:25 am

Re: Need help for changing MD5 Hash of a remote Zip file.

Post by xceed »

tasairis wrote:You don't change the hash of something, you change its contents.

To edit a file on a remote server you'd have to download it, make your changes, and upload.
I want to do it remotely. And i want to change the MD5 to bypass rapidshare blacklist. Also Downloading 100MB Files and Re-upploading would be Pain in A** :cry: . So i want to somehow change the MD5 Remotely.

Thankyou :wink:
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Need help for changing MD5 Hash of a remote Zip file.

Post by requinix »

Oh, you want to circumvent something... I didn't know that.
xceed
Forum Newbie
Posts: 5
Joined: Sat Mar 08, 2008 9:25 am

Re: Need help for changing MD5 Hash of a remote Zip file.

Post by xceed »

You can say that, Anyone else who can help please :( I need this solved as soon as possible.
Post Reply