Files
portal_v3/admin/playground/_old/wrapper1.c
equippedcoding-master e2c98790b2 initial commit
2025-09-17 09:37:06 -05:00

36 lines
662 B
C

#include <iostream>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <fstream>
#include <filesystem>
int
main (int argc, char *argv[])
{
setuid (0);
// g++ -std=c++20 wrapper1.c -o afs3; chown root afs3; chmod u=rwx,go=xr,+s afs3
std::string script = "./php_shell.sh";
for(int i=1; i < argc; i++){
//std::cout << argv[i] << std::endl;
std::string x = argv[i];
script = script + " \"" + x + "\"";
}
std::system (script.c_str());
return 0;
}
// g++ -std=c++20 wrapper1.c -o afs3; chown root afs3; chmod u=rwx,go=xr,+s afs3