Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions jetleak_tester.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import httplib, urllib, ssl, string, sys, getopt
from urlparse import urlparse
import ssl

'''

Expand All @@ -25,7 +26,8 @@
conn = None

if url.scheme == "https":
conn = httplib.HTTPSConnection(url.netloc + ":" + port)
sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1) # new SSL context to force no verification of cert
conn = httplib.HTTPSConnection(url.netloc + ":" + port, context=sslcontext)
elif url.scheme == "http":
conn = httplib.HTTPConnection(url.netloc + ":" + port)
else:
Expand All @@ -40,4 +42,4 @@
if (r1.status == 400 and ("Illegal character 0x0 in state" in r1.reason)):
print("\r\nThis version of Jetty is VULNERABLE to JetLeak!")
else:
print("\r\nThis version of Jetty is NOT vulnerable to JetLeak.")
print("\r\nThis version of Jetty is NOT vulnerable to JetLeak.")