Tired of translating HTTP Messages to Python requests by hand or doing a curl->requests translation everytime? Say no more! Here is HTTPToRequests, a tool that let you translate HTTP messages to python code ready to use!
- CLI/Module use
- Support for burpsuite
- Easy to use
- Support for OOP styled code or only functions.
Usage within code:
from httpconverter import HTTPConverter
file = "./examples/example.xml"
converter = HTTPConverter(file)
converter.extract() # Optional flags:
# use_oop - Write OOP styled code or just the functions. False by default
# force_dicts - Forces arguments to dictionary (i.e. form-data, params, etc.). False by default
CLI usage:
$ python -m httpconverter.cli --file ./examples/example.xml --output example.py
$ File converted and saved to example.py
You can install the script to access it anywhere.
python setup.py install
httpconverter --file FILE.xml --output OUTPUT.py
To run tests, run the following command
pytest .\tests\
Distributed under the GNU GPLv3 License. See LICENSE
for more information.
Want to contribute to the project? Great! Please follow the next steps in order to submit any feature or bug-fix :) You can also send me your ideas to my Telegram, any submit is greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request