projects
/
pwnitter
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a436c4c
)
Used urllib2 to read initial page from twitter
author
Tobias Mueller
<tobiasmue@gnome.org>
Thu, 13 Jan 2011 17:23:13 +0000
(18:23 +0100)
committer
Tobias Mueller
<tobiasmue@gnome.org>
Thu, 13 Jan 2011 17:23:13 +0000
(18:23 +0100)
pwnitter.py
patch
|
blob
|
history
diff --git
a/pwnitter.py
b/pwnitter.py
index
551a2f7
..
e8404c2
100755
(executable)
--- a/
pwnitter.py
+++ b/
pwnitter.py
@@
-14,6
+14,7
@@
import time
import gobject
import select
import subprocess
import gobject
import select
import subprocess
+import urllib2
status = 'I browsed twitter insecurely, got #pwned and all I got was this lousy tweet.'
status = 'I browsed twitter insecurely, got #pwned and all I got was this lousy tweet.'
@@
-130,14
+131,12
@@
class Pwnitter(dbus.service.Object):
"Cookie": cookie,
}
"Cookie": cookie,
}
- conn = httplib.HTTPSConnection(host)
try:
try:
- conn.request("GET", "/", None, headers)
+ page = urllib2.urlopen("https://%s/" % host).read()
except socket.error, e:
log.error(e)
else:
except socket.error, e:
log.error(e)
else:
- response = conn.getresponse()
- page = response.read()
+ log.debug('Connected to host %s', host)
# Newtwitter and Oldtwitter have different formatting, so be lax
authToken = ''
# Newtwitter and Oldtwitter have different formatting, so be lax
authToken = ''