GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — AndroidSuperFuzzing/GetPid.py at master · heartbee/AndroidSuperFuzzing Expand file tree/ Copy pathGetPid.pyMore file actions 40 lines (37 loc) · 1.27 KB / Copy pathGetPid.pyFile metadata and controls40 lines (37 loc) · 1.27 KB 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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 import subprocess import DecodeManifestXml def get_result(apk_file): pid="" results=[] xml=DecodeManifestXml.get_androidmanifest(apk_file) package_name=DecodeManifestXml.get_package_name(xml) cmd=["adb","shell","ps","|","grep",package_name] p=subprocess.Popen(cmd,stdout=subprocess.PIPE) if p.stdout.readline!="": for line in iter(p.stdout.readline,b""): result=line.split(" ") results.append(result) for i in range(1,len(result)): if result[i]!="" and package_name==result[len(result)-1]: pid=result[i] break return results def get_pid(results,apk_file): pid="" xml=DecodeManifestXml.get_androidmanifest(apk_file) package_name = DecodeManifestXml.get_package_name(xml) for result in results: for i in range(1,len(result)): result_pac=result[-1] #print result_pac if result_pac.strip()==package_name: #print result_pac if result[i] != "" : pid = result[i] break return pid if __name__=="__main__": apk_file=r"C:\Users\yixianglin\Desktop\ofo.apk" results=get_result(apk_file) pid=get_pid(results,apk_file) print pid |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |