xyuanmu / hack-iqiyi

Windows 下使用 chrome 获取爱奇艺 enc_key
35 stars 23 forks source link

下载flash老是失败是为什么 ? #2

Open jackey99 opened 8 years ago

jackey99 commented 8 years ago

image

xyuanmu commented 8 years ago

不是下载失败,是打补丁失败了。

用记事本打开 hack-iqiyi.py,用下面的代码替换 patch_swf() 看哪里出错了

def patch_swf():
    abc_path = '%s-0' % SWF_NAME.split('.')[0]
    remove_files(abc_path)

    subprocess.check_call(['tool/abcexport.exe', '%s' % SWF_NAME])
    subprocess.check_call(['tool/rabcdasm.exe', '%s.abc' % abc_path])
    subprocess.Popen(['tool/patch.exe', '-p0', '-bi', '../tool/asasm.patch'], cwd=abc_path).wait()
    subprocess.check_call(['tool/rabcasm.exe', '%s/%s.main.asasm' % (abc_path, abc_path)])
    subprocess.check_call(['tool/abcreplace.exe', '%s' % SWF_NAME, '0', '%s/%s.main.abc' % (abc_path, abc_path)])
    if os.path.isfile('%s/Zombie.class.asasm.orig' % abc_path):
        print 'Patch succeeded!'
        remove_files(abc_path)
        return True
    else:
        print 'Patch failed!'
        return False
jackey99 commented 8 years ago

image

xyuanmu commented 8 years ago

替换掉patch_swf()函数,不是单单替换patch_swf(): 原代码:( :confused: 抱歉,刚才放错代码了)

def patch_swf():
    abc_path = '%s-0' % SWF_NAME.split('.')[0]
    remove_files(abc_path)

    try:
        subprocess.check_call(['tool/abcexport.exe', '%s' % SWF_NAME])
        subprocess.check_call(['tool/rabcdasm.exe', '%s.abc' % abc_path])
        subprocess.Popen(['tool/patch.exe', '-p0', '-bi', '../tool/asasm.patch'], cwd=abc_path).wait()
        subprocess.check_call(['tool/rabcasm.exe', '%s/%s.main.asasm' % (abc_path, abc_path)])
        subprocess.check_call(['tool/abcreplace.exe', '%s' % SWF_NAME, '0', '%s/%s.main.abc' % (abc_path, abc_path)])
    except:
        print 'Patch failed!'
        return False
    if os.path.isfile('%s/Zombie.class.asasm.orig' % abc_path):
        print 'Patch succeeded!'
        remove_files(abc_path)
        return True
    else:
        print 'Patch failed!'
        return False

新代码:

def patch_swf():
    abc_path = '%s-0' % SWF_NAME.split('.')[0]
    remove_files(abc_path)

    subprocess.check_call(['tool/abcexport.exe', '%s' % SWF_NAME])
    subprocess.check_call(['tool/rabcdasm.exe', '%s.abc' % abc_path])
    subprocess.Popen(['tool/patch.exe', '-p0', '-bi', '../tool/asasm.patch'], cwd=abc_path).wait()
    subprocess.check_call(['tool/rabcasm.exe', '%s/%s.main.asasm' % (abc_path, abc_path)])
    subprocess.check_call(['tool/abcreplace.exe', '%s' % SWF_NAME, '0', '%s/%s.main.abc' % (abc_path, abc_path)])
    if os.path.isfile('%s/Zombie.class.asasm.orig' % abc_path):
        print 'Patch succeeded!'
        remove_files(abc_path)
        return True
    else:
        print 'Patch failed!'
        return False
jackey99 commented 8 years ago

Downloading the page http://www.iqiyi.com/v_19rroonq48.html, please wait... swf url is http://www.iqiyi.com/common/flashplayer/20160307/1335f98c2359.swf Traceback (most recent call last): File "python27.py", line 95, in File "C:\Users\owner\Desktop\hack-iqiyi-master\hack-iqiyi-master\hack-iqiyi.py", line 115, in patch = patch_swf() if swf else False File "C:\Users\owner\Desktop\hack-iqiyi-master\hack-iqiyi-master\hack-iqiyi.py", line 47, in patch_swf subprocess.Popen(['tool/patch.exe', '-p0', '-bi', '../tool/asasm.patch'], cwd=abc_path).wait() File "C:\Users\owner\Desktop\hack-iqiyi-master\hack-iqiyi-master\tool\python27.zip\subprocess.py", line 710, in init File "C:\Users\owner\Desktop\hack-iqiyi-master\hack-iqiyi-master\tool\python27.zip\subprocess.py", line 958, in _execute_child WindowsError: [Error 740] 请按任意键继续. . .

xyuanmu commented 8 years ago

@jackey99 试试右键点击 hack-iqiyi.bat 以管理员身份运行。另外如果开启了UAC暂时关闭下。

jackey99 commented 8 years ago

@xyuanmu 都试过了,还是不行,是不是因为Windows10的原因 ?

xyuanmu commented 8 years ago

这个就不清楚了,还没有在win10上用过。你打开tool文件夹,按住Shift + 右键点击空白的地方 > 在此处打开命令窗口,输入 patch --help 看有没有反应

sunyue1380 commented 8 years ago

@xyuanmu 我的也是这样的情况,win7,patch fail 然后你说的patch --help是有反应的,cmd输出内容一闪而过。