36 lines
662 B
C
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
|