Skip to content

Instantly share code, notes, and snippets.

@newaaz
Created March 31, 2022 17:29
Show Gist options
  • Save newaaz/b1b64306d3e01b44fdfca59e18132948 to your computer and use it in GitHub Desktop.
Save newaaz/b1b64306d3e01b44fdfca59e18132948 to your computer and use it in GitHub Desktop.
# GET запрос без параметров
~$ nc -C httpbin.org 80
GET /anything HTTP/1.1
Host: httpbin.org
Accept: application/json
HTTP/1.1 200 OK
Date: Thu, 31 Mar 2022 17:02:55 GMT
Content-Type: application/json
Content-Length: 321
Connection: keep-alive
Server: gunicorn/19.9.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
{
"args": {},
"data": "",
"files": {},
"form": {},
"headers": {
"Accept": "application/json",
"Host": "httpbin.org",
"X-Amzn-Trace-Id": "Root=1-6245debf-745ad26c18facfe9372c44ed"
},
"json": null,
"method": "GET",
"origin": "89.107.138.75",
"url": "http://httpbin.org/anything"
}
# GET запрос с любыми параметрами строки URL
~$ nc -C httpbin.org 80
GET /anything?username=serge&pass=mypass HTTP/1.1
Host: httpbin.org
Accept: application/json
HTTP/1.1 200 OK
Date: Thu, 31 Mar 2022 17:05:22 GMT
Content-Type: application/json
Content-Length: 398
Connection: keep-alive
Server: gunicorn/19.9.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
{
"args": {
"pass": "mypass",
"username": "serge"
},
"data": "",
"files": {},
"form": {},
"headers": {
"Accept": "application/json",
"Host": "httpbin.org",
"X-Amzn-Trace-Id": "Root=1-6245df52-6b3abf257f7b68ab0cfee30b"
},
"json": null,
"method": "GET",
"origin": "89.107.138.75",
"url": "http://httpbin.org/anything?username=serge&pass=mypass"
}
# POST запрос с любыми параметрами --> Попытка
~$ nc httpbin.org 80
POST /anything HTTP/1.1
Host: httpbin.org
Accept: application/json
Content-Length:22
login=serge
pass=mypass
HTTP/1.1 200 OK
Date: Thu, 31 Mar 2022 17:28:06 GMT
Content-Type: application/json
Content-Length: 374
Connection: keep-alive
Server: gunicorn/19.9.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
{
"args": {},
"data": "login=serge\npass=mypas",
"files": {},
"form": {},
"headers": {
"Accept": "application/json",
"Content-Length": "22",
"Host": "httpbin.org",
"X-Amzn-Trace-Id": "Root=1-6245e498-14c90bc67dd484d11b20677b"
},
"json": null,
"method": "POST",
"origin": "89.107.138.75",
"url": "http://httpbin.org/anything"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment