trojan=@eval functioncheck_dir(){ for file in `ls $1` do f2=$1"/"$file if [ -d $f2 ];then check_dir $f2 # just check dll file elif [ "${file##*.}"x = "dll"x ];then strings $f2 |grep -q $trojan if [ $? == 0 ];then echo"==="$f2"====" strings $f2 |grep $trojan fi fi done } # . stand for current directory check_dir .
defgrep(lines,pattern): for line in lines: if pattern in line: yield line
defpcheck(filename): # trojan feature trojan='@eval' # just check dll file if filename.endswith('.dll'): lines=strings(filename) try: grep(lines,trojan).next() except: return print'=== {0} ==='.format(filename) for line in grep(lines,trojan): print line pass
deffoo(): # . stand for current directory for path, dirs, files in os.walk(".", topdown=False): for name in files: pcheck(os.path.join(path, name)) for name in dirs: pcheck(os.path.join(path, name)) pass
方式1.请访问本博主的B站【WeiyiGeek】首页关注UP主, 将自动随机获取解锁验证码。
Method 2.Please visit 【My Twitter】. There is an article verification code in the homepage.
方式3.扫一扫下方二维码,关注本站官方公众号
回复:验证码
将获取解锁(有效期7天)本站所有技术文章哟!