Bobi
Bobi

Reputation: 11

Make a HTTP request without a browser or curl

I got this on a jobs interview :

Make a HTTP request to https://spnagios.storpool.com/confupd/meow.php with parameter "hi" to equal two_unique from the previous task, without a browser or curl and you'll get an email address.

The answer to the previous task was 487 .

Now you might say : Well if you can't figure this out you are probably not fit for the job . Well you are probably right but I still want to know how it is done and what is the answer so I can get the email :)

Upvotes: 0

Views: 3750

Answers (3)

Drame
Drame

Reputation: 1

[root@alma 2_http]# openssl s_client -connect spnagios.storpool.com:443

GET https://spnagios.storpool.com/localweb/meow.php?hi=5 HTTP/1.0

HTTP/1.1 200 OK Server: nginx/1.18.0 Date: Sun, 24 Sep 2023 10:46:30 GMT Content-Type: text/html; charset=UTF-8 Connection: close

Secret email address ****@storpool.com closed

Upvotes: 0

kofrasa
kofrasa

Reputation: 2140

Perhaps the interviewer intended to test your knowledge of TCP networking and application level protocols. In this scenario, you can typically use any tool that allows you to establish a raw TCP socket, and then send the application protocol messages manually.

See some eaxamples below.

Using telnet

➜  ~ telnet spnagios.storpool.com 80
Trying 185.117.80.38...
Connected to https-sof.storpool.com.
Escape character is '^]'.
GET /confupd/meow.php HTTP/1.0

HTTP/1.1 404 Not Found
Server: nginx/1.10.3
Date: Wed, 29 Apr 2020 10:33:28 GMT
Content-Type: text/html
Content-Length: 169
Connection: close

<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.10.3</center>
</body>
</html>
Connection closed by foreign host.

Using netcat

➜  ~ nc spnagios.storpool.com 80
GET /confupd/meow.php HTTP/1.0

HTTP/1.1 404 Not Found
Server: nginx/1.10.3
Date: Wed, 29 Apr 2020 10:39:54 GMT
Content-Type: text/html
Content-Length: 169
Connection: close

<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.10.3</center>
</body>
</html>

Upvotes: 3

Samim Hakimi
Samim Hakimi

Reputation: 725

You can try Postman or any other rest api development tools to make http requests.

For example you can make http request in Postman like below:

https://spnagios.storpool.com/confupd/meow.php/hi=487

Upvotes: 2

Related Questions