相关疑难解决方法(0)

如何将shell脚本转换为二进制可执行文件?

我想将我的 shell 脚本转换为二进制可执行文件,以便其他人无法编辑或阅读它。有没有办法将其转换为二进制可执行文件?

linux executable binary

44
推荐指数
1
解决办法
9万
查看次数

setuid root 不起作用

目标:以 root 身份运行程序(C++ 二进制文件)。同:SetUID 位在 Ubuntu 中不起作用?

并且:为什么 setuid 对可执行文件不起作用?

./a.out 输出:

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? psurana //output for "whoami" Look below for the code.

ls -l 输出:

-rwsrwxr-x 1 root root 46136 Jun 7 20:13 a.out

编码 :

#include <string>
#include <stdlib.h>
int main(int argc, char *argv[]){
        std::string input = "apt-get install " + std::string(argv[1]);
        system(input.c_str());
        system("whoami"); …
Run Code Online (Sandbox Code Playgroud)

linux setuid privileges

3
推荐指数
1
解决办法
2979
查看次数

标签 统计

linux ×2

binary ×1

executable ×1

privileges ×1

setuid ×1