diff --git a/lib/TunnaClient.py b/lib/TunnaClient.py index 539531e..47e0830 100644 --- a/lib/TunnaClient.py +++ b/lib/TunnaClient.py @@ -250,11 +250,14 @@ def HTTPreq(self,url,data=None,headers=None): kargs['url']=url if data: kargs['data']=data #Will do a GET if no data else POST if headers: kargs['headers']=headers - else: kargs['headers']={'Content-Type':'application/octet-stream','Cookie':self.cookie} + else: kargs['headers']={'Content-Type':'application/octet-stream'} + + if self.options['cookie']: + kargs['headers'].update({'Cookie':self.cookie}) if self.options['bauth']: kargs['headers'].update({'Authorization': "Basic %s" % self.bauth}) - + #Make Request f=opener.open(urllib2.Request(**kargs)) diff --git a/proxy.py b/proxy.py index 9085923..89f1a85 100644 --- a/proxy.py +++ b/proxy.py @@ -62,7 +62,7 @@ def main(): advancedGroup.add_option('-q','--ping-interval', help='webshprx pinging thread interval (default = 0.5)', dest='ping_delay', action='store', type='float', default=Defaults['ping_delay']) advancedGroup.add_option('-s','--start-ping', help='Start the pinging thread first - some services send data first (eg. SSH)', dest='start_p_thread', action='store_true', default=Defaults['start_p_thread']) advancedGroup.add_option('-c','--verify-server-cert', help='Verify Server Certificate', dest='start_p_thread', action='store_false', default=Defaults['ignoreServerCert']) - advancedGroup.add_option('-C','--cookie', help='Request cookies', dest='cookie', action='store', default=Defaults['Cookie']) + advancedGroup.add_option('-C','--cookie', help='Request cookies', dest='cookie', action='store') advancedGroup.add_option('-t','--authentication', help='Basic authentication', dest='bauth', action='store_true') parser.add_option_group(advancedGroup) diff --git a/settings.pyc b/settings.pyc deleted file mode 100644 index 7cb8c5f..0000000 Binary files a/settings.pyc and /dev/null differ