1

so I mounted an http server with python -m SimpleHTTPServer I get:

Serving HTTP on 0.0.0.0 port 8000 ... But when I try to download with

wget http://192.168.100.65:8000/tmp/postgres_default_pass.txt

I got:

    192.168.100.74 - - [09/Sep/2020 23:32:30] code 404, message File not found
192.168.100.74 - - [09/Sep/2020 23:32:30] "GET /tmp/postgres_default_pass.txt HTTP/1.1" 404 -

In the wget machine:

    Connecting to 192.168.100.65:8000... connected.
HTTP request sent, awaiting response... 404 File not found
2020-09-09 23:32:31 ERROR 404: File not found.

But the file exists, doing an ls I can find the file.

 ls
hsperfdata_kali
postgres_default_pass.txt
sqlmaprgl22hl623598

1 Answer 1

2

SimpleHTTPServer serves relative to its current directory. Try wget http://localhost:8000/postgres_default_pass.txt

That being said, please do note that in python3 it has been moved into http as http.server. python2.7 is officially unsupported so it's probably a good idea to move any systems over to python3.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, that solved my problem, and I will do that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.