Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

[HELP] storing HTTP requests

So I have my own proxy server and I want to make my own python script to capture all the requests that are sent to my server. I looked into scapy but not sure if that's what I am looking for. Anyone know any modules or packages that could help with that? I'm been searching for a while but not sure I can find anything yet.
(Jan 12, 2019 07:56 AM)4ground_daemon Wrote:  So I have my own proxy server and I want to make my own python script to capture all the requests that are sent to my server. I looked into scapy but not sure if that's what I am looking for. Anyone know any modules or packages that could help with that? I'm been searching for a while but not sure I can find anything yet.

The Python module you're looking for is called Flask
(Jan 12, 2019 02:59 PM)cloudpool Wrote:  The Python module you're looking for is called Flask

I don't have an answer for the OP, but Flask is an HTTP server, not an packet monitor... OP already
has a proxy server and he wants to log all the HTTP requests which flow through it
Skype messages are NOT valid evidence, and here's why.
I think scrapy was what I was looking for, I was having a play around with it yesterday but couldn't get it to output the data I wanted.
(Jan 13, 2019 03:42 AM)Ensky Wrote:  I don't have an answer for the OP, but Flask is an HTTP server, not an packet monitor... OP already
has a proxy server and he wants to log all the HTTP requests which flow through it

Ah my bad, thanks for clarifying. @OP something like this? https://github.com/jacklam718/http-request-capture though, it's using a forked version of Scapy
(Jan 13, 2019 03:42 AM)Ensky Wrote:  I don't have an answer for the OP, but Flask is an HTTP server, not an packet monitor... OP already
has a proxy server and he wants to log all the HTTP requests which flow through it

(Jan 13, 2019 09:45 PM)cloudpool Wrote:  Ah my bad, thanks for clarifying. @OP something like this? https://github.com/jacklam718/http-request-capture though, it's using a forked version of Scapy

This is not true, you can do all of this in Flask, though a simple web application, that can sit there and accept every HTTP connection from the Proxy, neatly manipulates it and saves it on a database.

Flask is also not a web server, it's a framework ( or a collection of libraries and tools) that is primarily degined to create a web-application ( a program that runs everywhere). It comes with a pre-built server, but that's only to help for development.


Capturing the incoming HTTP request and neatly storing it in a database ; you can comfortably do that in Flask ( technically it will get you to load a seperate database module , unless you use SQLITE, and an ORM - normally SQLAlchamey , flask as extensions for both).

Flask comes with a DEVELOPMENT SERVER ; it's NOT ITSELF SERVER.

-----------------

That being said I would personally you can do that much simply in python alone without needing any additional frameworks or library.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Robert RougeSep 24, 2026 10:02 AM 4 219 Sep 24, 2026 10:02 AM
Last Post: Anonynuk
by siwaMar 14, 2024 11:14 AM 5 293 Mar 14, 2024 11:14 AM
Last Post: Hackers
[Python] by evilgnomeJan 11, 2022 05:39 AM 2 195 Jan 11, 2022 05:39 AM
Last Post: Charger