Giter VIP home page Giter VIP logo

burpee's Introduction

Burpee

About

A python module to extract headers and POST data from a file containing intercepted HTTP request.

Let's say we have a file named request.txt that contains following HTTP request:

POST /user/follow HTTP/1.1
Host: www.website.com
User-Agent: some user agent
Accept: application/json, text/plain, */*
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Referer: https://www.website.com/users/12345/profile
Content-Type: application/json;charset=utf-8
X-CSRF-TOKEN: Ab1/2cde3fGH
Content-Length: 27
Cookie: some-cookie=;
DNT: 1
Connection: close

{"targetUser":"12345"}

To send the above request using inbuilt functions of python like requests.get(), we need to explicitely specify each of the headers and values manually.

Here Burpee comes to save the day. It simply accepts name of the file containing the HTTP request as parameter and returns two things:

  • Dictionary: Headers and their respective values
  • String: Supplied Post data

Screenshot:

Demonstration:

As demonstrated in the above proofs, once we get dictionary of headers and post data, we can simply pass these headers and post data to functions like requests.get() , requests.post() etc.

Request can be directly requested by using the request() function in the module.
Burpee.burpee.request(file_name , https = [True/False]) takes two arguments:

  • Name of the file containing request
  • Whether to request HTTP or HTTPS

Since this function uses requests.get() and requests.post() from inside, hence it also returns the requests.models.Response object.

[NOTE]:

The request() function only supports two methods i.e. GET and POST

Creator:

Twitter: @xscorp7
Github: xscorp(GITHUB)

burpee's People

Contributors

xscorp avatar

Watchers

James Cloos 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.