Advertisement
metalx1000

Use GTK and Python to get fake caller id number

Sep 9th, 2012
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.57 KB | None | 0 0
  1.  
  2. #!/usr/bin/env python
  3.  
  4. import gtk, urllib
  5.  
  6. mynumber="5555555555"
  7. callnum=0
  8. fakenum=0
  9.  
  10. def press(widget):
  11.     num = entry.get_text()
  12.     pnum = widget.get_label()
  13.     entry.set_text(num + pnum)
  14.  
  15. def send_press(widget):
  16.     print "Calling: " + callnum
  17.     print "Fake Number: " + fakenum
  18.     f = urllib.urlopen("http://calleridfaker.com/api/freecall/?my_phoneno=" + mynumber + "&phoneno=" + callnum + "&cid=" + fakenum + "&voicerad=woman&voice=normal&record=no-record&email=&terms=on")
  19.  
  20.     s = f.read()
  21.     s = s.split("+")
  22.     s = s[1]
  23.     s = s.split('"')
  24.     s = s[0]
  25.     print s
  26.     f.close()
  27.     dial_label.set_label(s)
  28.    
  29. def add_call(widget):
  30.     callnum=entry.get_text()
  31.     entry.set_text("")
  32.  
  33. def add_fake(widget):
  34.     fakenum=entry.get_text()
  35.     entry.set_text("")
  36.  
  37. win=gtk.Window()
  38. win.connect('destroy', lambda w: gtk.main_quit())
  39.  
  40. box = gtk.VBox()
  41. win.add(box)
  42.  
  43. dial_label=gtk.Label("")
  44. box.pack_start(dial_label, False)
  45.  
  46. entry=gtk.Entry()
  47. box.pack_start(entry, False)
  48.  
  49. table=gtk.Table(2, 2, gtk.TRUE)
  50.  
  51. a = [1,2,3,4,5,6,7,8,9,"#",0,"*"]
  52. x = 0
  53. y = 0
  54.  
  55. for i in a:
  56.     button=gtk.Button(str(i))
  57.     button.connect("clicked", press)
  58.     table.attach(button,x,x+1,y,y+1)
  59.     x+=1
  60.     if x > 2:
  61.         x = 0
  62.         y+=1
  63.  
  64.  
  65. box.pack_start(table)
  66.  
  67. box2=gtk.HBox()
  68. box.pack_start(box2)
  69.  
  70. call_button=gtk.Button("Add Call#")
  71. call_button.connect("clicked", add_call)
  72. box2.pack_start(call_button)
  73.  
  74. fakebutton=gtk.Button("Add Fake#")
  75. fakebutton.connect("clicked", add_fake)
  76. box2.pack_start(fakebutton)
  77.  
  78. send=gtk.Button("SEND")
  79. send.connect("clicked", send_press)
  80. box2.pack_start(send)
  81.  
  82. win.show_all()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement