Go Back   Xisp.org Forums > Porn Password Cracking > Porn Password Cracking Help Section

need help or advice with <?php (file operations)

Reply
Views: 546 - Replies: 0  
Thread Tools Display Modes

need help or advice with <?php (file operations)
Old 02-17-2006, 02:54 PM   #1
daywalk3r
Guest
 
Posts: n/a
Threads: 5107
Question need help or advice with <?php (file operations)

I just had to realise that I suck@php so much that I can't write (or convert) a simple php script so I'm here seeking help or advice

I need to create a simple script that browses the folder structure and dumps all the specified file types into output. The perl source would look like this:

#!/usr/bin/perl
$val=shift;
while (<*/*/*.cgi */*/*.php */*/*.pl */*.cgi */*.php */*.pl *.cgi *.pl *.php>)
{
$filename= $_;
open (FILE, $filename);
while (<FILE>)
{
$line++;
print $filename.":$line: $_\n" if (/$val/);
}
$line=0;
close FILE;
}

Is there someone out there who could please give me an advice or help me convert it to php (if it's possible)? Thanks alot in advance! :)

daywalk3r


Edit: got it done myself, thanks anyway :)

But now got another problem.. can't get the file operation working on files outside the local www folder ;(

Fileexists check works fine but any other operation (like fread, fgets) returning zero data when I try it on files outside the "html" folder..

The site structure is like "/home/www/html/" and the passfile "/home/www/cgi-bin/inet/.htpasswd". I can read any file content within "/home/www/html/" but when I try to read anything outside "html" I get nothing (I know the directory structure and files on the server so I tried files outside the "cgi-bin" too but nothing..)

Anyone can give an advice on what am I doing wrong? Thanks :)

Last edited by daywalk3r; 02-17-2006 at 08:36 PM..
  Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -4. The time now is 01:12 PM.


vBulletin skin developed by: Xisp.org Crew
Powered by vBulletin®
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
2005 Copyright Xisp.org