Generalised the Twitter auth token detection
[pwnitter] / pwnitter.py
index 5d84701..3efd967 100755 (executable)
@@ -119,7 +119,7 @@ class Pwnitter(dbus.service.Object):
                         # Newtwitter and Oldtwitter have different formatting, so be lax
                         authToken = ''
 
-                        formMatches = re.search("<.*?authenticity_token.*?>", page, 0)
+                        formMatches = re.search("<.*?auth.*?_token.*?>", page, 0)
                         if formMatches:
                             authMatches = re.search("value=[\"'](.*?)[\"']", formMatches.group(0))