-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathGPSBackUP.py
27 lines (20 loc) · 887 Bytes
/
GPSBackUP.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import os
print('x')
cmd = "grep rootPassword SystemInformation.txt |awk '{print $2}'"
SysPasswd = str(os.popen(cmd).readlines())[2:-4]
#22.304217 113.912238
def FindBackUpGPSBin(GPSX,GPSY):
try:
SearchFileName = str(GPSX)+'a'+str(GPSY).replace('.','d')
record = os.popen('ls -1 GpsBinSave/ |grep ' + SearchFileName + '|tail -1').readlines()[0][:-1]
return record
except:
pass
#print(FindBackUpGPSBin(22.304217,113.912238))
def HackRFOneReset():
for res in os.popen("lsusb |grep Linux"):
reset = res.split(' ')
#os.system('cd usbResetTools/;echo '+SuPasswd+' |sudo -S ./usbreset /dev/bus/usb/' + str(reset[1]) +'/' + str(reset[3][:-1]) + '')
SuPasswd = 'q'
print('cd usbResetTools/;echo '+SuPasswd+' |sudo -S ./usbreset /dev/bus/usb/' + str(reset[1]) +'/' + str(reset[3][:-1]) + '')
HackRFOneReset()