Thread
:
using exec() and getting output
View Single Post
01-20-2003, 04:26 PM
#
24
(
permalink
)
Ilya020
Techno Rat
Join Date: Jan 2003
Location: San Diego
Posts: 559
Quote:
Originally posted by Vlad902
SUCCESS!
after doing chmod 777 /www/htdocs and alot of cat /www/logs/error_log I executed:
<?php
system("mkdir BLAHWORK;ls;rm -rf BLAHWORK;echo '<br />';ls");
?>
and it worked!
I was getting alot of "cannot unlink" errors....
just for fun I did:
Code:
#include<stdio.h> void main(void) { setuid(0); setgid(0); system("rm -rf /home/vlad/lll"); }
Then su'ed, compiled it, and named it as /bin/lll
when I executed lll it worked
*for those who do not know C, playing around with that may be hazardous to your health*
EDIT: Also if you want the output of a command AND the output redirected to a file RTFM on the command "tee".
how so?
Ilya
__________________
> SELECT * FROM users WHERE clue > 0
0 rows returned
Ilya020
View Public Profile
Visit Ilya020's homepage!
Find More Posts by Ilya020