【问题标题】:cobfusc generates unknown characterscobfusc 生成未知字符
【发布时间】:2022-07-02 05:54:15
【问题描述】:

我想获得一个模糊的输出(针对学生)。我用了这个例子:

$ cat hello.c
#include <stdio.h>

int main() {
    printf("Hello, World!\n");
}

$ cobfusc hello.c -o olleh.c
$ cat olleh.c
#include <stdio.h>

�my�U �my�U() {
    �my�U("Hello, World!\n");
}%  

$ gcc olleh.c
olleh.c:3:1: error: stray ‘\344’ in program
    3 | �my�U �my�U() {
      | ^
olleh.c:3:2: error: stray ‘\16’ in program
    3 | �my�U �my�U() {
      |  ^
olleh.c:3:5: error: stray ‘\333’ in program
    3 | �my�U �my�U() {
      |     ^
olleh.c:3:3: error: unknown type name ‘my’
    3 | �my�U �my�U() {

这是预期的行为吗?我认为输出应该是可编译的。

【问题讨论】:

  • 您是在问某个程序应该做什么,而不是真正的编程问题。说明是怎么说的?你检查过他们的 bugtracker 吗?
  • 你查看过“cobfusc”关于字符编码的文档吗?
  • @thebusybee 这里没有关于编码的内容:manpages.org/cobfusc
  • 是的,我发现手册页太简短了。您是否搜索过项目/网站,或查看源代码以了解不同模式的作用?

标签: c obfuscation


【解决方案1】:

README.compile 解释了“flex”的问题,并说您需要使用“lex”或使用“flex -l”。

最简单的解决方法是在运行 ./configure 后更新所有 Makefile 并将 LEX= 行更新为 flex -l,而不是 flex。

愉快的混淆!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-06-10
    • 1970-01-01
    • 2016-07-25
    • 2013-08-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多