]> git.parisson.com Git - deefuzzer.git/commitdiff
fix twitter class for new API, add deefuzzer's keys
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 9 Sep 2010 14:03:12 +0000 (14:03 +0000)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 9 Sep 2010 14:03:12 +0000 (14:03 +0000)
tools/twitt.py

index a0e212d2a2b1d1f466d78215280d20c12b24901a..eec76e71cdb7e9034f6b8d42c6f987a4d0222689 100644 (file)
 
 # Author: Guillaume Pellerin <yomguy@parisson.com>
 
+# Twitter DeeFuzzer keys
+TWITTER_CONSUMER_KEY = 'ozs9cPS2ci6eYQzzMSTb4g'
+TWITTER_CONSUMER_SECRET = '1kNEffHgGSXO2gMNTr8HRum5s2ofx3VQnJyfd0es'
+
+
 class Twitter:
 
-    def __init__(self, username, password):
+    def __init__(self, access_token_key, access_token_secret):
         import twitter
-        self.username = username
-        self.password = password
-        self.api = twitter.Api(username=self.username, password=self.password)
+        self.username = TWITTER_CONSUMER_KEY
+        self.password = TWITTER_CONSUMER_SECRET
+        self.access_token_key = access_token_key
+        self.access_token_secret = access_token_secret
+        self.api = twitter.Api(username=self.username,
+                               password=self.password,
+                               access_token_key=self.access_token_key,
+                               access_token_secret=self.access_token_secret)
 
     def post(self, message):
         try:
@@ -50,4 +60,3 @@ class Twitter:
         except:
             pass
 
-