Skip to content

Commit

Permalink
Merge pull request #6 from maxco2/master
Browse files Browse the repository at this point in the history
Find hook point easily
  • Loading branch information
YiuChoi committed Apr 9, 2016
2 parents b3d5df0 + f099db5 commit 38257a3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions FindHookPoint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import os
def findHook(path):
for i in os.walk(path+os.sep+"smali"+os.sep+"com"+os.sep+"netease"+os.sep+"cloudmusic"):
if "utils" not in i[0]:
for j in i[2]:
def openread(path,name):
fi=open(path+os.sep+name)
lines=fi.readlines()
if "utils" in lines[1]:
nam=name[0:name.find(".")]
CONS=path.split(os.sep)
length=len(lines[1])
HOOK=lines[1][lines[1].find("utils/")+6:length]
print "HOOK_UTILS = ","com.netease.cloudmusic.utils."+HOOK+"\r"
print "HOOK_CONSTRUCTOR = ","com.netease.cloudmusic."+CONS[-2]+"."+CONS[-1]+"."+nam+"\n\n"
fi.close()
if j.find(".")<=2:
openread(i[0],j)
#print "version 3.3.1\r"
#findHook(r"D:\Android\output\c331")
#print "version 3.2.1\r"
#findHook(r"D:\Android\output\c321")
#print "version 3.1.4\r"
#findHook(r"D:\Android\output\c314")

0 comments on commit 38257a3

Please sign in to comment.