MD5 replace tool
1 Attachment(s)
Hi,
I just wrote a quick tool to patch all occurrences of a file inside a program folder (no matter the file name) given an MD5 checksum. It is useful when the original files may have different names and are present in multiple sub directories. Usage: python replace.py FOLDER MD5_SUM CRACKED_FILE_PATH Example: python replace.py 098f6bcd4621d373cade4e832627b4f6 c:\mysoftware license.dll Where: -> 098f6bcd4621d373cade4e832627b4f6: is the MD5 of the original files to be replaced by the cracked file. You can get the MD5 checksum by using powershell with the function Get-FileHash -alg md5 ORIGINAL_FILE -> c:\mysoftware is the folder of the software -> license.dll is the path to the cracked file You can also edit the file and set DEBUG_MODE=True to only print the occurrence of the files instead of replacing them. Compiled version is also available attached. Code:
import os |
can it be uploaded to other site? thx
|
Probably you would include the file size as a pre-filter before filtering based on MD5 checksum. Otherwise this is the sort of inelegance that grinds away hard drives especially when huge files might be in that same directory. Since MD5 requires disk reading and is generally thereby expensive, it should not be treated so lightly. It should only be done when absolutely needed. Hence file size hint.
|
any chance to upload elsewhere ?
|
1 Attachment(s)
@chants: Thank you for your feedbacks
Version 2 with the following changelog: -> Added a 4th optional argument MAX_FILE_SIZE_IN_MB, the md5 wont be computed is the file size in MB is larger than the MAX_FILE_SIZE_IN_MB specified. -> If the 4th argument is not specified, all files md5 will be computed. Code:
import os |
If you include file size (in bytes) then the script would be even faster!
|
replace all file type?
|
can @Elesty upload to other site.
cant download from attachment forum.(you do not have permission to access this page) |
Quote:
fyi: Compiled using existing code in this thread. |
|
All times are GMT +8. The time now is 19:56. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX