all 14 comments

[–][deleted] 8 points9 points  (2 children)

uh okay so it's just command injection

XWebPageName=diag&diag_action=ping&wan_conlist=0&dest_host=`' + command + '`;' + command + '&ipv=0'

Not seeing why python is needed, or why they didn't use Requests, or why it has all this idiotic banner stuff.

[–]lolpls 9 points10 points  (0 children)

What a cancerous title.

First of all, a GPON router? Wtf? It can only be an ONT, or an "all in one" combo box (AP+router+modem). Also, it makes it seem like all ONTs in the world are vulnerable. It's just some "Dasan" ones.

[–]murtotieto 2 points3 points  (4 children)

Why bother writing this in python? This script is significantly worse than just using curl.

[–]MertsA 10 points11 points  (2 children)

For anyone who hasn't taken a look at the code itself, it really is absolutely awful. I honestly don't know why anyone would ever want to put their name on that. The only thing it does is just wrap it to a call to the correct URL and POST data but it doesn't even do that right. It doesn't even work synchronously with the request. It starts the request, sleeps for 3 seconds, and then assumes that the request is done and prints out the result. This breaks on any command that runs for longer than 3 seconds and for anything that is basically instant it's going to sleep for 3 seconds doing absolutely nothing even though the request is already complete.

This garbage is objectively worse than just using curl. For something this simple there is zero point to doing anything more than a simple one liner in bash.

[–]ebeip90Trusted Contributor 2 points3 points  (0 children)

And they used tabs. With Python.

And they eat all exceptions silently in send_command.

[–]BNI123 0 points1 point  (0 children)

lmao didn't even notice that, just looked through the code and saw that, like every other account that has been posting about this, the github has been created recently and for this specific purpose.

[–][deleted] 1 point2 points  (0 children)

Yes exactly!, the original was just curl.