Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial commit

  • Loading branch information...
commit ee7885eaac3d49780b1df7905b15c022bc3456e5 0 parents
@vmirage authored
Showing with 26 additions and 0 deletions.
  1. 0  README
  2. +26 −0 suid-wrap.c
0  README
No changes.
26 suid-wrap.c
@@ -0,0 +1,26 @@
+#include <stdio.h>;
+#include <string.h>;
+
+int main (int argc, char *argv[]) {
+ char str[1024];
+ int i;
+
+ if (argc < 2) {
+ return 1;
+ }
+
+ for (i = 1; i < argc; i++) {
+ if (i == 1) {
+ strcpy(str, argv[i]);
+ } else {
+ strcat(str, argv[i]);
+ }
+ if (i < argc-1) {
+ strcat(str, " ");
+ }
+ }
+
+ setuid(0);
+ return system(str);
+}
+
Please sign in to comment.
Something went wrong with that request. Please try again.