Router crashes while trying to run a looped script

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
wetechdose
DD-WRT Novice


Joined: 21 Nov 2021
Posts: 6

PostPosted: Tue Jan 18, 2022 5:25    Post subject: Router crashes while trying to run a looped script Reply with quote
Hi all! Thanks for your help in advance, this is my second time posting on here but for a different device Laughing

So this is the thing... I was using DD-WRT on my TP-Link Archer A7 with no issues, until the main reason I installed a custom firmware for caused me not to.

I play Smash Ultimate and it's known to have a really bad online experience, so after doing some Googling I found this Shell script that drops the connection based on the peer ping and other stuff.

The script requires anonymous pings and multicast to not be filtered, and to have curl and openssl installed (which the build for my device comes pre-installed with).

After making sure the file has 777 permissions, I run it and it looks like it starts but then the router restarts itself. I checked the system resources as I ran the script again and the CPU usage went up to a 100% instantly, causing the router to crash and reboot.

I wonder why would this happen, is there anything I can do to avoid that? Has anyone had a similar experience while using some script?

It's worth noting I'm currently using OpenWrt, the script works fine and does not use much CPU or RAM, sadly it was mainly designed for DD-WRT so I'm having some issues.

I appreciate any comments or help, see you around!
Sponsor
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 371

PostPosted: Wed Jan 19, 2022 5:35    Post subject: Reply with quote
The lagdrop.sh script is obfuscated twice but the unobfuscated version without arguments runs and gives the usage instructions. I commented out the first line to test because "Running LagDrop without argument will terminate all instances of the script" and you only see "Killed". I didn't try running the obfuscated version because I don't want to risk crashing my router.
wetechdose
DD-WRT Novice


Joined: 21 Nov 2021
Posts: 6

PostPosted: Wed Jan 19, 2022 6:21    Post subject: Reply with quote
yoyoma2 wrote:
The lagdrop.sh script is obfuscated twice but the unobfuscated version without arguments runs and gives the usage instructions. I commented out the first line to test because "Running LagDrop without argument will terminate all instances of the script" and you only see "Killed". I didn't try running the obfuscated version because I don't want to risk crashing my router.


Thanks for your reply! So basically running the script on its obfuscated version is what makes the router crash? Sorry if I'm not getting it Sad

Also, where did you find the unobfuscated version? I thought there was only an encrypted one lol
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 371

PostPosted: Wed Jan 19, 2022 15:26    Post subject: Reply with quote
The shell can only run non-obfuscated code so the script unobfuscates itself and feeds the output to the eval command. Just store the output into a file instead of feeding it to eval (do this twice). Did this on a linux PC.

I don't know that the obfuscated script crashes my router as I didn't try. I do know that the unobfuscated one partially runs (enough to show usage).
wetechdose
DD-WRT Novice


Joined: 21 Nov 2021
Posts: 6

PostPosted: Thu Jan 20, 2022 4:37    Post subject: Reply with quote
yoyoma2 wrote:
The shell can only run non-obfuscated code so the script unobfuscates itself and feeds the output to the eval command. Just store the output into a file instead of feeding it to eval (do this twice). Did this on a linux PC.

I don't know that the obfuscated script crashes my router as I didn't try. I do know that the unobfuscated one partially runs (enough to show usage).


Makes total sense, thank you so much! Will try once I'm back on DD-WRT, appreciate your help.
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 371

PostPosted: Thu Jan 20, 2022 15:49    Post subject: Reply with quote
Edit: My mistake, the attachment is still there when logged in. Why is easyddup's script there even when logged out? Leaving my question about GPL here anyways but disregard the deleted attachment part.

Some administrator secretly deleted the attachment. The script is GPL so my understanding is that downstream modifications must be shared publicly. I know nothing about legal stuff but releasing readable GPL code is somehow complicated. I never even understood dd-wrt's interpretation of an open source GPL project much less a fringe case like this.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum