
Python exploit for CVE-2019-9053 targeting CMS Made Simple with SQL injection detection and password hash cracking via wordlist, featuring argparse and improved error handling.
Fixed it bcz of https://tryhackme.com/room/easyctf :) enjoy Critical Issues Fixed
Old: print "string" New: print("string") Changed all print statements to print() functions Updated string formatting to use f-strings
Old: import optparse New: import argparse Replaced entire option parsing system with modern argparse Added proper help text and default values
Old: String concatenation and old % formatting New: f-strings throughout (f"string {variable}") More readable and efficient
Old: Global flag variable could cause infinite loops New: Loop breaks when no character match found Better control flow logic
Old: No error handling for network requests or file operations New: Added try-except blocks for:
requests.exceptions.RequestException FileNotFoundError KeyboardInterrupt General exceptions
Old: Procedural script with global variables New: Object-oriented approach with CMSMSExploit class
Better encapsulation Easier to maintain and debug Reusable components
Old: hex(ord(char))[2:] - prone to encoding issues New: format(ord(char), 'x') - cleaner and more reliable
Added --time parameter for configurable delays (default: 1 second) Better terminal output with clear screen function Progress feedback every 100 words during cracking Proper timeout for HTTP requests (10 seconds) UTF-8 encoding support for wordlist reading Better help/usage information