Bash Script: Scramble checksum hash values of all files in current directory.

Status
Not open for further replies.

Peter South

Active Member
607
2013
360
1,690
Code:
#! /bin/bash
# /usr/local/bin/fucker.sh v13.1.15
# Echos 4 random integers into all files of a directory which scrambles their checksum hash values.
touch ./'$filename';
for filename in ./*
do
  if [ "$filename" != "$0" ]
  then
    echo $RANDOM >> "$filename";
  fi
done;

To verify the md5 checksum hash value of a file has been changed you can use the command:
Code:
md5sum exampleFileName.rar;

Furthermore, this script has been tested and proven to not impact the integrity of all types of video files as well as RAR files (even ones split into parts)


For more of my scripts see: Index of various Bash Script Threads contributed by Eddie Johnson.
 
Last edited:
2 comments
Can you please make a video tutorial or screenshot with indication will be great.

I don't make video tutorials because they're a complete waste of everyones' time. They always contain either false information, deprecated information, and/or highly obnoxious lead-ins such as some moron is talking about his life story for 5 minutes before showing you what they're supposed to show.



All you need to do is copy the bash script into your Ubuntu Linux system, most commonly in /usr/local/bin/.

Then you can even create an alias to the bash script in your bash profile file ~/.bashrc.

Then from the directory in which you desire to scramble the files' checksum hash values simply run the Bash script (or its' alias) and it will execute it on all the files in the directory (as noted in the script itself).
 
Status
Not open for further replies.
Back
Top