Extracting encrypted SFX

gora2
2013-05-08
2013-05-08
  • gora2
    gora2
    2013-05-08

    I created two encrypted SFX archive (https://dl.dropboxusercontent.com/u/35142695/test_sl2_130508_09-43.7z)
    1 with the original SFX module
    2 with the modified SFX module
    Run a batch file unpacking these SFX:

    @Echo Off
    7z x "%~1" -oTemp -y -r
    Echo %ErrorLevel%
    pause
    

    1 request a password, click OK, receive a return code 2 and no files in the folder unpack (Temp)
    2 request a password, click OK, receive a return code 0 and the resource files in the folder unpack (Temp)

    Questions:
    1 why is this happening?
    2 how to get rid of extracting resources, as I do not need?
    3 how to get a return code of 2 in the second case because it will be the right decision?

    Thank you

     
  • Igor Pavlov
    Igor Pavlov
    2013-05-08

    I didn't check your archives.
    Does 7z reside inside EXE file resources in second case?
    In that case 7-Zip opens PE and then tries to open 7z inside. In case of error, it shows PE sections.
    Only -t7z can help in that case.

     
  • gora2
    gora2
    2013-05-08

    Speaking about the resources, I mean it was PE sections.

    Switch -t7z helped, thank you.