diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 346e27c..0000000 Binary files a/LICENSE and /dev/null differ diff --git a/engine/core.py b/engine/core.py index eac0a25..6d58ef0 100644 --- a/engine/core.py +++ b/engine/core.py @@ -138,8 +138,11 @@ def is_lower(str_one, str_two): str_two = str_two[::-1].split('.') for i in range(len(str_one)): - sum_one += ((i+1) ** 10) * (int(str_one[i])) - sum_two += ((i+1) ** 10) * (int(str_two[i])) + try: + sum_one += ((i+1) ** 10) * (int(str_one[i])) + sum_two += ((i+1) ** 10) * (int(str_two[i])) + except Exception as e: + return True if sum_one < sum_two: return True diff --git a/engine/scan.py b/engine/scan.py index 4e1b4a9..783b5ec 100644 --- a/engine/scan.py +++ b/engine/scan.py @@ -67,7 +67,16 @@ class Scan_Engine: with open('database/'+file+'.json') as data_file: data = json.load(data_file) - for vuln in data[wordpress.version]["vulnerabilities"]: + # Try to get a close result if the version is not in the list + version = wordpress.version + if data[wordpress.version]["vulnerabilities"] == []: + versions = data.keys() + for v in versions: + if v[:4] in wordpress.version and is_lower(wordpress.version, v): + version = v + + # Best accurate result + for vuln in data[version]["vulnerabilities"]: # Basic infos print warning("\t%s : %s - ID:%s" % (vuln['vuln_type'], vuln['title'] , vuln['id']) ) diff --git a/engine/wordpress.py b/engine/wordpress.py index b1ce0a1..224e072 100644 --- a/engine/wordpress.py +++ b/engine/wordpress.py @@ -27,7 +27,6 @@ class Wordpress: self.enum_wordpress_users() - """ name : clean_url() description : set the url to http(s)://example.com/