pwnlandia / mhn

Modern Honey Network
GNU Lesser General Public License v2.1
2.43k stars 630 forks source link

./registration.sh failed to resolve host address 'http' #762

Closed SuzukiCode closed 4 years ago

SuzukiCode commented 4 years ago

Greetings,

When I deploy Dionaea I get the following error in the deploy.sh script at the end of the install:

+wget http:192.168.1.134/static/registration.txt -O registration.sh --2020-03-24 14:30-- ftp://http/192.168.1.134/static/registration.txt => 'registration.sh' Resolving http (http)... failed: Name or service not known. wget: unable to resolve host address 'http'

Please help!

Thanks,

Suzuki

d1str0 commented 4 years ago

What is the deploy command you are given? You have a stray ftp:// in there

SuzukiCode commented 4 years ago

@d1str0 wget "http://192.168.1.134/api/script/?text=true&script_id=2" -O deploy.sh && sudo bash deploy.sh http://192.168.1.134 OgTvEvEi

SuzukiCode commented 4 years ago

@d1str0 this is what is generated in the deploy.sh file for that particular part:

wget $server_url/static/registration.txt -O registration.sh chmod 755 registration.sh

Note: this will export the HPF_* variables

. ./registration.sh $server_url $deploy_key "dionaea"

d1str0 commented 4 years ago

What OS and what shell are you trying to install on?

As you can see, your error stems from wget trying to fetch over ftp:// not http://

"wget http:192.168.1.134/static/registration.txt -O registration.sh"

For some reason your first post has this, which is missing // after http:

SuzukiCode commented 4 years ago

@d1str0 So I replaced "wget $server_url" with 192.168.1.134 and it went all the way to the end of the registration.sh file and ends at this line: } 'http:/192.168.1.134/api/sensor/ which is the line that curl updates. Then it exits instead of updating hpfeeds or updating supervisor.

I'm installing it on Ubuntu 14.04(x32)

d1str0 commented 4 years ago

So you can still see that it's putting http:/192 and not http://192

Something is screwing up the command because it's cutting out the slashes.

Also, Ubuntu14 is EOL and has been for a while. If you have the ability, please use 16 or 18. Tbh, 14 just isn't supported.

d1str0 commented 4 years ago

I'll keep helping you troubleshoot this a bit, but I have no plans to implement a fix if it's only applicable to Ubuntu 14. Closing this issue for now but if it persists in newer versions of Ubuntu we can reopen.

SuzukiCode commented 4 years ago

@d1str0 Installing on Ubuntu 18.04 worked. Thank you for your assistance