Code Monkey home page Code Monkey logo

automating-directory-brute-forcing's Introduction

Directory Brute Forcing Script

A Python script used to brute-forcing a specific url with a wordlist in order to find a traversal vulnerability.

/!\ For educational purposes, do not use without authorisation.

Author

  • FullName : RANDRIAMANJATO Judicaël Voninahitrin'ny Avo Elise
  • Email: [email protected]
  • STD: STD21021

Overview

This Python script iterates through a list of directory or file names, typically referred to as a wordlist, and sends HTTP requests to a server for each entry in the list. When the server responds with specific HTTP status codes (200, 403, or 500), it signifies that the directory or file exists and is accessible. This process effectively identifies existing directories or files on the server.

How to use it

Dependencies

The script will work on python3. This script requires the requests, argparse, threading and time library, which is used respectively to: send HTTP requests to the server, get the parameters on the CLI, use multithreading and record the duration of treatment.

How to Test the Code

To test the script, follow these steps:

  1. Ensure you have Python installed on your system. If not, you can download it from python.org.

  2. Ensure all dependecies as mentionned are ready for use.

  3. Run the script with the following command:

python treatment.py http://example.com wordlist.txt

Replace http://example.com with the URL of the server you want to test against, and wordlist.txt with the filename of your wordlist.

In my case: I ran the pathtrav server and use it to test the code:

python .\treatment.py http://127.0.0.1:5000/ .\dir_list.txt
  1. When processing is complete, it prints a list of the directories found, along with the processing time, as shown in the screenshot below.

Brute-forcing-result

automating-directory-brute-forcing's People

Contributors

jrmanjato avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.