コード例 #1
0
    def get_caller_name(self):
        export = os.environ['USERPROFILE'] + '\\Desktop\\db'
        run_command(adb_commands['db'] +
                    'content://com.android.contacts/data/phones/filter/' +
                    self.get_caller_number() + ' --projection sort_key' +
                    ' > ' + export)

        return open(export).read().split('sort_key=')[1].replace('\r',
                                                                 '').replace(
                                                                     '\n', '')
コード例 #2
0
def loc():
	a = run_command(adb_commands['get-location'])
	a = a.split("Location[network")[1].split("acc")[0]
	latitude = a.split(",")[0]
	longitude = a.split(",")[1]
	#print "latitude:", latitude
	#print "longitude:", longitude

	results = Geocoder.reverse_geocode(float(latitude),float(longitude))
	return str(results).split(',')[0].decode('unicode_escape').encode('ascii','ignore')
コード例 #3
0
def get_city():
	a = run_command(adb_commands['get-location'])
	a = a.split("Location[network")[1].split("acc")[0]
	latitude = a.split(",")[0]
	longitude = a.split(",")[1]
	#print "latitude:", latitude
	#print "longitude:", longitude

	results = Geocoder.reverse_geocode(float(latitude),float(longitude))
	c = results.city
	return c
コード例 #4
0
def respond_to_sms(receiver, msg):
	print adb.run_command(adb_commands['send-sms'].format(receiver,msg[:-1]))
	global win
	win.destroy()
コード例 #5
0
ファイル: callinfo.py プロジェクト: gigobyte/hacktogetherrep
	def get_caller_number(self):
		out = run_command(adb_commands['check-callnumber'])
		return out.split('=')[1].replace('\n', '')
コード例 #6
0
ファイル: callinfo.py プロジェクト: gigobyte/hacktogetherrep
	def check_if_calling(self):
		out = run_command(adb_commands['check-callstate'])
		return out[-2] == '1'
コード例 #7
0
ファイル: callinfo.py プロジェクト: gigobyte/hacktogetherrep
	def get_caller_name(self):
		export = os.environ['USERPROFILE'] + '\\Desktop\\db'
		run_command(adb_commands['db'] + 'content://com.android.contacts/data/phones/filter/' + self.get_caller_number() + ' --projection sort_key' + ' > ' + export)
		
		return open(export).read().split('sort_key=')[1].replace('\r', '').replace('\n', '')
コード例 #8
0
ファイル: callinfo.py プロジェクト: gigobyte/hacktogetherrep
	def decline_call(self):
		run_command(adb_commands['decline-call'])
コード例 #9
0
ファイル: callinfo.py プロジェクト: gigobyte/hacktogetherrep
	def accept_call(self):
		run_command(adb_commands['accept-call'])
コード例 #10
0
 def check_if_calling(self):
     out = run_command(adb_commands['check-callstate'])
     return out[-2] == '1'
コード例 #11
0
 def decline_call(self):
     run_command(adb_commands['decline-call'])
コード例 #12
0
 def accept_call(self):
     run_command(adb_commands['accept-call'])
コード例 #13
0
 def get_caller_number(self):
     out = run_command(adb_commands['check-callnumber'])
     return out.split('=')[1].replace('\n', '')