Skip to content

Instantly share code, notes, and snippets.

@Ludo6431
Created April 10, 2011 21:28
Show Gist options
  • Save Ludo6431/912738 to your computer and use it in GitHub Desktop.
Save Ludo6431/912738 to your computer and use it in GitHub Desktop.
dsisavpatch little fix
diff --git a/exploits/dsisavpatch_py/dsisavpatch.py b/exploits/dsisavpatch_py/dsisavpatch.py
index 4ab6304..1a01bb9 100644
--- a/exploits/dsisavpatch_py/dsisavpatch.py
+++ b/exploits/dsisavpatch_py/dsisavpatch.py
@@ -108,13 +108,13 @@ if location[0:5] != 'http:':
end_of_redirect_host = location.find('/', 7)
redirect_host = location[7:end_of_redirect_host]
redirect_query = location[end_of_redirect_host:]
end_of_path = redirect_query.find('?')
redirect_path = redirect_query[0:end_of_path]
-name,val = location[end_of_path+1:].split('=')
+name,val = redirect_query[end_of_path+1:].split('=')
#print 'waiting for successful reply for %s' % redirect_path
-params = urllib.urlencode({'hash': val})
+params = urllib.urlencode({name: val})
headers = {"Content-type": "application/x-www-form-urlencoded"}
attempts = 20
payload = ''
while attempts > 0:
print 'trying %s with hash as %s'%(redirect_path ,val)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment