You need elevated permissions. Use sudo
when editing the file.
-onthesauce
I entered the cmd below, but I can’t download the file named download.php
curl -0 46.101.52.69:31273/download.php
That IP address and the port number is what the question ask to use. Can someone help me here.
you have to submit the key inside the file that you downloaded from server
so the syntax will be :
curl -O ipaddress:port/download.php
then
cat download.php
then you will get key inside the file , that key you have to submit as an answer.
The problem is, that cmd is not downloading the file. I have tried this on multiple days on different IPs. Could you try it.
[★]$ pwd
/home/htb-ac538885
─[us-academy-2]─[10.10.14.28]─[htb-ac538885@pwnbox-base]─[~]
└──╼ [★]$ ls
Desktop Documents Downloads Templates
─[us-academy-2]─[10.10.14.28]─[htb-ac538885@pwnbox-base]─[~]
└──╼ [★]$ curl -0 209.97.142.95:30707/download.php
HTB{64$!c_cURL_u$3r}─[us-academy-2]─[10.10.14.28]─[htb-ac538885@pwnbox-base]─[~]
└──╼ [★]$ ls
Desktop Documents Downloads Templates
─[us-academy-2]─[10.10.14.28]─[htb-ac538885@pwnbox-base]─[~]
└──╼ [★]$
inside the question you will see swap with target system
option. first click on that then you will get
the ip with port then use that ip and port for download.
for instance : syntax will look like this
curl -O 10.30.29.39:8080/download.php
// here -O means --remote-name Write output to a file named as the remote file
then cat download.php
or you can also use text editor because the purpose is only to get the key from download.php
Worked for me here on the photo attached
here is the sample solution curl IP:port/download.php inlanefreight.com
i can’t start my instance
pls i need assist and directions
Thank you.
curl -O 94.237.59.206:48181/download.php
after ls to see file and open it there is your flag!
How long should it take to download the .php file? I have run this command and it never seems to return anything. Am I missing something?
For those who have problems with this task, here is the solution.
First of all, don’t search for the ip address “inlanefreight.com” with the command “nslookup” because you have to first below the HTB screen there is a “target” button once you turn it on it will show you the ip address with the destination port.
Once you have the address and port you need to type the following command.
sudo curl -O {ADDRESS IP}:{PORT}/download.php inlanefreight.com
This command will download the file. download.php and after accessing it you will see a flag on your desktop. Use with sudo , because it may not work.
Greetings mr.None
Someone send the flag, idk why my connection to the server is being blocked which never happened and I cant complete the module
It seems like you encountered a 301 Moved Permanently status code, which indicates that the requested resource has been permanently moved to a new location. The provided response is simply informing you that the document you were looking for has been relocated to a different URL.
Regarding your search for the flag, it appears that the file you downloaded is not the intended location for finding it. You’ll need to navigate to the new URL mentioned in the response to see if the flag is available there.
If you’re still unable to locate the flag after visiting the new URL, it’s possible that it may be located elsewhere or embedded within another file or resource. Make sure to thoroughly explore the website and its contents to find it.
Also, I understand flag-related issues can be frustrating. Interestingly, I encountered similar flag-related issues on my website’s HTML, and I resolved them through careful examination and debugging. Persistence and attention to detail are key when dealing with such challenges.
did u try using vim to read the download.php file, when downloaded?
Thanks, this gave me the solution.