Advertisement
metalx1000

Fake Caller ID Dialer for the N900

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