import os
import time
file = "data.txt"
text = os.popen("adb shell ps | findstr com.tencent")
fw = open(file,'w')
for line in text.readlines():
#print line
fw.write(line+'
')
num = line.split(" ")[0]
back = os.popen("adb shell dumpsys netpolicy | findstr " + num[4:])
fw.write(back.read())
fw.close()