You Are Here:

Community: Developer Discussion Boards

#1 Old [src] hack 0.2 - 2008-12-10, 02:04

Join Date: Oct 2008
Posts: 54
Anime
Offline
Regular Contributor
hack 0.2 src:
Code:
import socket
import e32
import appuifw


sock=socket.socket(socket.AF_BT,socket.SOCK_STREAM,socket.BTPROTO_RFCOMM)
addr,service=socket.bt_discover()
address=(addr,1)
sock.connect(address)


def exit_key_handler():
         app_lock.signal()
         appuifw.app.set_exit()
         
         
def cancel():
         appuifw.app.body=View
         appuifw.app.exit_key_handler=exit_key_handler
         

def res():
         
         line=[]
         ch=sock.recv(0x1000)
         line.append(ch)
         return ''.join(line)
         appuifw.app.body=appuifw.Text(unicode(line))
         line.pop()


def choise():
                 

 index = View.current()



 if index == 0:
           
              dat=appuifw.query(u"Hayes",'text')
              sock.send('"'+dat+'\r"')
              m=res()
              appuifw.app.body=appuifw.Text(unicode(m))
              appuifw.app.exit_key_handler=cancel

 if index == 1:

              str=[(u'?'),(u'=?'),(u'string')]

              index1 = appuifw.selection_list(choices=str , search_field=0)

              if index1 == 0:

                  sock.send('AT+CUSD?\r')
                  n=res()
                  appuifw.app.body=appuifw.Text(unicode(n))
                  appuifw.app.exit_key_handler=cancel

              if index1 == 1:

                  sock.send('AT+CUSD=?\r')
                  dcs=res()
                  appuifw.app.body=appuifw.Text(unicode(dcs))
                  appuifw.app.exit_key_handler=cancel

              if index1 == 2:
    
                  dat1=appuifw.query(u'USSD','text')
                  sock.send('AT+CUSD=1,'+'"'+dat1+'",15'+'\r')
                  m1=res()
                  appuifw.app.body=appuifw.Text(unicode(m1))
                  appuifw.app.exit_key_handler=cancel

 if index == 2:
              
              sock.send('AT+GCAP\r')
              m2=res()
              appuifw.app.body=appuifw.Text(unicode(m2))
              appuifw.app.exit_key_handler=cancel
        
 if index == 3:

              sock.send('AT+FCLASS=?\r')
              m3=res()
              appuifw.app.body=appuifw.Text(unicode(m3))
              appuifw.app.exit_key_handler=cancel

 if index == 4:
        
              str1=[(u'?'),(u'=?')]
        
              index2 = appuifw.selection_list(choices=str1 , search_field=0)

              if index2 == 0:
              
                  sock.send('AT+WS46?\r')
                  n1=res()
                  appuifw.app.body=appuifw.Text(unicode(n1))
                  appuifw.app.exit_key_handler=cancel

              if index2 == 1:
              
                  sock.send('AT+WS46=?\r')
                  dcs1=res()
                  appuifw.app.body=appuifw.Text(unicode(dcs1))
                  appuifw.app.exit_key_handler=cancel

 if index == 5:
           
              sock.send('AT+CGMI\r')
              m4=res()
              appuifw.app.body=appuifw.Text(unicode(m4))
              appuifw.app.exit_key_handler=cancel
          
 if index == 6:
           
              sock.send('AT+CGMM\r')
              m5=res()
              appuifw.app.body=appuifw.Text(unicode(m5))
              appuifw.app.exit_key_handler=cancel

 if index == 7:
           
              sock.send('AT+CGMR\r')
              m6=res()
              appuifw.app.body=appuifw.Text(unicode(m6))
              appuifw.app.exit_key_handler=cancel

 if index == 8:
           
              sock.send('AT+CGSN\r')
              m7=res()
              appuifw.app.body=appuifw.Text(unicode(m7))
              appuifw.app.exit_key_handler=cancel

 if index == 9:
           
              sock.send('AT+CIMI\r')
              m8=res()
              appuifw.app.body=appuifw.Text(unicode(m8))
              appuifw.app.exit_key_handler=cancel

 if index == 10:
           
              dat2=appuifw.query(u"Number",'text')
              sock.send('"ATD'+dat2+';\r"')
              res()  
              appuifw.app.body=appuifw.Text(u'Calling'+dat2)
              appuifw.app.exit_key_handler=cancel

 if index == 11:

              sock.send('AT+CHUP\r')
              res()
              appuifw.app.body=appuifw.Text(u'Call hangup')
              appuifw.app.exit_key_handler=cancel

 if index == 12:

              sock.send('AT+CHLD=2\r')
              res()
              appuifw.app.body=appuifw.Text(u'Call in hold')
              appuifw.app.exit_key_handler=cancel

 if index == 13:

              sock.send('AT+CSQ=?\r')
              m9=res()
              appuifw.app.body=appuifw.Text(unicode(m9))
              appuifw.app.exit_key_handler=cancel

 if index == 14:

              appuifw.app.body=appuifw.Text(unicode(addr))
              appuifw.app.exit_key_handler=cancel

 if index == 15:
             
              e32.start_exe('z:\\system\\programs\\apprun.exe','z:\\system\\apps\\browser\\browser.app "file://e:/system/apps/hack/help.html"')


 if index == 16:

              appuifw.app.body=appuifw.Text(u'hack 0.2/ http://code.google.com/p/hack/')
              appuifw.app.exit_key_handler=cancel


Menu = [(u'Hayes comm.'),(u'USSD comm.'),(u'TA cap.'),(u'Sel. mode'),(u'wireless net.'),(u'manufacter id.'),(u'model id.'),(u'revision id.'),(u'IMEI'),(u'IMSI'),(u'Dial call'),(u'Hangup call'),(u'Hold call'),(u'Signal qual.'),(u'MAC addr.'),(u'Help'),(u'About')]

View = appuifw.Listbox(Menu,choise)


appuifw.app.body=View
appuifw.app.screen = 'normal'
appuifw.app.title = u'hack' 
app_lock = e32.Ao_lock()

app_lock.wait()

appuifw.app.exit_key_handler = exit_key_handler
I post the code of the new release with the implement of a command ui; the script is an AT commands sender module that lets the remote control of a phone via Bluetooth.
If anyone have any idea how to solve the receive string bug on visualisation it will be helpful.
http://code.google.com/p/hack/
Reply With Quote

#2 Old Re: [src] hack 0.2 - 2008-12-10, 09:21

Join Date: Nov 2008
Posts: 73
xiaobu
Offline
Regular Contributor
what is that?what's the main arithmetic?
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
MIDP applicatyion accessing a servlet not working in series 60 emulator ferozekadamapuzha Mobile Java General 11 2008-05-07 19:04
[announce] hack v1.02 module with peek poke functions ! cyke64 Python 9 2006-12-23 21:40
Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working mattbee Mobile Java Tools & SDKs 1 2003-06-10 12:43
Series 60Series 60 MIDP Concept SDK Beta 0.2 Linux bug? kauppi Mobile Java Tools & SDKs 3 2003-04-07 10:05

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia