Thanks to visit codestin.com
Credit goes to github.com

Skip to content

tpcybersec/TP-Requests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TP-Requests - PyPI

Send the HTTP/ MQTT/ WEBSOCKET Request



🛠️ Installation

From PyPI:

pip install tp-requests

From Source:

git clone https://github.com/TPCyberSec/TP-Requests.git --branch <Branch/Tag>
cd TP-Requests
python -m build
python -m pip install dist/tp_requests-<version>-py3-none-any.whl

📘 Basic Usage

from tp_requests.http import TP_HTTP_REQUEST

rawRequest = """GET /v1/promo/extension HTTP/2
Host: d2y7f743exec8w.cloudfront.net
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en-US;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.97 Safari/537.36
Connection: close
Cache-Control: max-age=0

"""

httpRequest = TP_HTTP_REQUEST(rawRequest)

httpRequest.RequestParser.request_method = "POST"

sendRequest_result = httpRequest.sendRequest(Host="d2y7f743exec8w.cloudfront.net", Port=443, Scheme="https", proxy_server={"type":"http","host":"127.0.0.1","port":8080})

print(sendRequest_result)

👥 Contributors


📝 CHANGELOG