Advertisement
Guest User

omegle.py

a guest
Mar 14th, 2012
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.15 KB | None | 0 0
  1. # feel free to use, edit, distribute
  2. # pycurl is the only non-standard library
  3.  
  4. import pycurl
  5. import urllib
  6. import StringIO
  7. import time
  8.  
  9. c = pycurl.Curl()
  10. ses = []
  11. res = []
  12.  
  13. def req(url, get, data):
  14.     r = StringIO.StringIO()
  15.     form = urllib.urlencode(data)
  16.     if get:
  17.         url += "?%s" % (form)
  18.     else:
  19.         c.setopt(c.POSTFIELDS, form)
  20.     c.setopt(c.URL, url)
  21.     c.setopt(c.WRITEFUNCTION, r.write)
  22.     c.setopt(c.CONNECTTIMEOUT, 5)
  23.     c.setopt(c.TIMEOUT, 8)
  24.     c.perform()
  25.     return r.getvalue()
  26.  
  27. print "What is your question?"
  28. ask = raw_input('>> ')
  29.  
  30. print "How many concurrent sessions?"
  31. i = raw_input('>> ')
  32.  
  33. for x in range(0,int(i)):
  34.     print x
  35.     id = req("http://quarks.omegle.com/start", 1, {"savequestion":1, "spid":"", "rcs":1, "ask":ask}).strip('"')
  36.     ses.append(id)
  37.  
  38. time.sleep(30)
  39.  
  40. for id in ses:
  41.     rep = req("http://quarks.omegle.com/events", 0, {"id":id})
  42.     res.append(rep)
  43.     print rep
  44.  
  45. # The logs are all stored in the "res" list: this is not really exploitable as it is, so either parse it in python, or feed it to a web page as JSON. A javascript seems better though... Working on it
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement