As promised, I’m publishing our first FREE UBot Plugin called MD5 Hash Generator.
Plugin consist of 2 functions, which will help you to get MD5 hash value from a string or file directly in UBot Studio (it replaces the need for a workaround, like running MD5Sums.exe in Command Prompt and using Java Script or even 3rd party websites).
Plugin uses MD5 algorithm to encrypt input data into a 128-bit hash value (string consisting of 32 alpha-numeric characters). Because of the nature of MD5 algorithm direct decryption isn’t possible, but it can be achieved indirectly in some cases, by looking up the hash value in rainbow tables.
Lets get straight to our new functions, their usage and functionality:
FUNCTION: $MD5 from string(string)
- “String to encrypt” – string that is used as input for MD5 hash generation
Function Returns: MD5 hash value that is a result of encryption of input “String to encrypt”
FUNCTION: $MD5 from file(File Path)
- “File Path” – string which points to a file that we are getting MD5 hash value for
Function Returns: MD5 hash value that is a result of encryption of input file located at “File Path”
UBOT CODE EXAMPLES
Data Integrity ($MD5 from file)
In other programming languages, similar functions are commonly used to verify data integrity, after the file has been transferred to a new location. In order to check the integrity you first need a MD5 hash value of original file, which you then compare to MD5 hash value of a file from the new location; if they match, the file was transferred without data loss, else the file got corrupted during the transfer.
Generation of MD5 hash value from file
set(#filepath, "c:\file.txt", "Global")
set(#hash, $plugin function("MD5.dll", "$MD5 from file", #filepath), "Global")
Storing Sensitive Data ($MD5 from string)
This kind of function is widely used to store sensitive data. For additional security layer salt (a string of random characters) is usually concatenated to the original input string, making indirect decryption almost impossible (if salt is long enough). The newly created string (in format: “sting+salt” or “salt+string”) is used as input for MD5 encryption, which produces a MD5 hash value. Storing sensitive data using salt is more secure, since rainbow tables don’t have the value of your salt and will there so return a wrong decrypted value.
While this is one way algorithm, it doesn’t allow to retrieve the original information (original input string, excluding salt), but we are still able to compare a new input to a previous input, which makes this perfect for use when you are not interested in the actual data, but you need a way to verify it (storing website account passwords).
UBOT FORUM DISCUSSION