Compilation error: stray ‘\302’ in program etc

后端 未结 13 2178
眼角桃花
眼角桃花 2020-12-01 14:03

I am having problem compiling the followed exploit code:

http://downloads.securityfocus.com/vulnerabilities/exploits/59846-1.c

I am using: \"gcc file.c\" and

13条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-01 14:20

    You have invalid chars in your source. If you don't have any valid non ascii chars in your source, maybe in a double quoted string literal, you can simply convert your file back to ascii with:

    tr -cd '\11\12\15\40-\176' < old.c > new.c
    

    Edit: method with iconv will stop at wrong chars which makes no sense. The above command line is working with the example file. Good luck :-)

提交回复
热议问题