[ale] C question

Jim Lynch ale_nospam at fayettedigital.com
Fri May 23 05:43:11 EDT 2014


Untested, but should work.
On 05/22/2014 10:56 PM, Robert L. Harris wrote:
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <sys/types.h>
> #include <unistd.h>
>
>
> int main(int argc, char **argv)
> {
>
>   char Target[5] = argv[1];
>   printf("%s\n", argv[1]);
>   printf("%s\n", Target);
>
>   setuid( 662705787 );
>   char Command[255]="/home/user/bin/Test.sh %s", Target;
char cmd;
sprintf(cmd,"ssh user at serverB -C /home/user/bin/Test.sh %s", Target);
system(cmd);
>
>   system( "ssh user at serverB -C %s", Command );
>
>   return 0;
> }
>



More information about the Ale mailing list