Bugfix for issue 7 - Error when the wordpress version is unknown

pull/15/head
Swissky 2017-08-31 13:57:05 +02:00
parent 8f32d08f5a
commit fa7804573c
6 changed files with 47 additions and 28 deletions

View File

@ -85,6 +85,6 @@ python main.py -u "http://127.0.0.1/wordpress/" --fuzz
![alt tag](https://github.com/swisskyrepo/Wordpresscan/blob/master/screens/Version%204.4.7.png?raw=true)
## Credits and Contributorm
## Credits and Contributors
* Original idea and script from [WPScan Team](https://wpscan.org/)
* Many PR and bugfixes from [bl4de](https://github.com/bl4de)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -138,6 +138,19 @@ def is_lower(str_one, str_two, equal):
sum_one = 0
sum_two = 0
# Handle the NoneType
if str_one == None:
if str_two == None:
return False
else:
return True
if str_two == None:
if str_one == None:
return False
else:
return True
# Fix for X.X <= X.X.X and X.X.X <= X.X
if len(str_one) < 5:
str_one += '.0'

View File

@ -107,6 +107,12 @@ class Scan_Engine:
# Try to get a close result if the version is not in the list
version = wordpress.version
# This version doesn't exist
if wordpress.version not in data:
print warning("The version %s isn't in the database - Please try the option --update" % (wordpress.version))
return
if data[wordpress.version]["vulnerabilities"] == []:
versions = data.keys()
for v in versions: