theGuildHall / pwnbox

Instructions on how to create your very own Pwnbox, originally created by HTB
386 stars 74 forks source link

Ping not appearing properly #12

Closed Errorrist closed 4 years ago

Errorrist commented 4 years ago
Screen Shot 2020-08-19 at 8 14 53 PM Screen Shot 2020-08-19 at 8 14 59 PM

Nice instructions, Can you help me fix this?

output of the vpnpanel.sh script are correct.

Screen Shot 2020-08-19 at 8 17 04 PM
theGuildHall commented 4 years ago

Interesting issue.

Can you right click on the panel where your ping should be and select preferences? Might help to see what is there. Otherwise, if you haven't already, delete that panel and try it again.

Colenk commented 4 years ago

Same problem as that man. Tried deleting the panel it did nothing. And as for the preferences, they are just standard. image

I was messing around with the vpnpanel script and trying formatting it to see if it was an issue displaying the decimal number. I made it a float with a simple `printf "%.0f" and when using that as the echo instead I at least get the number 0 to show on the panel rather than nothing. image image

Is there anything else you could think of for why only that part is not showing? If you have any ideas for me to test, I'll gladly take them.

PS: My installation is stock from the guide other than a custom PS1 in my bashrc

Colenk commented 4 years ago

UPDATE: Found the fix for the problem from someones fork of the repo. Credit to @Flameeeeee for committing the fix in his fork.

@Errorrist You have to edit your vpnpanel.sh.

Change gwip=$(route -n | grep tun0 | grep UG | tr -s " " | cut -d " " -f 2) to gwip=$(ip route | grep tun0 | grep via | cut -d " " -f 3)

For some reason the "route -n" command doesnt return output properly, while "ip route" does.

@theGuildHall I suggest possibly updating the readme for others that have the issue, or possibly just changing the script within the repo. Big thanks.

theGuildHall commented 4 years ago

@Colenk glad you found the issue and how to fix it! I'll commit it now.

@Errorrist Please try it now! you can do a git pull or just copy the updated vpnpanel.sh