Exploit database

GH-de2318f62d43bced52bf249576e6dec9

hoangrealer/cve-2023-27216

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2023-27216

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files86Next files →

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

_DSL-3782_A1_EU_1.01_07282016.bin.extracted/squashfs-root/usr/script/alpha_wifi_schedule_5g.sh

Shell · 2,026 bytes
#!/bin/sh

while [ 1 = 1 ]
do
	sleep 30
	
	/userfs/bin/tcapi set WLan11ac_Common ReadFlag 0
	SCH_NAME=`/userfs/bin/tcapi get WLan11ac_Entry0 SCH`
	/userfs/bin/tcapi set WLan11ac_Common ReadFlag 1
	SCH_RULE_NAME=`/userfs/bin/tcapi get Schedule_Entry0 Name`
	/userfs/bin/tcapi set WLan11ac_Common ReadFlag 0
	ENABLED=`/userfs/bin/tcapi get WLan11ac_Entry0 EnableSSID`
	/userfs/bin/tcapi set WLan11ac_Common ReadFlag 1
	
	if [ -z "$SCH_NAME" ] || [ "$SCH_NAME" = "-" ] || [ "$SCH_NAME" = "connection error" ] || [ "$SCH_NAME" = "no attribute information" ]; then
		continue
	fi

	i=0
	while [ "$SCH_NAME" != "$SCH_RULE_NAME" ]
	do
		i=`expr $i + 1`	
		SCH_RULE_NAME=`/userfs/bin/tcapi get Schedule_Entry$i Name`
		if [ "$i" -gt "9" ]; then
			/userfs/bin/tcapi set WLan11ac_Entry0 SCH -
			continue 2
		fi
	done
	
	RULE=`/userfs/bin/tcapi get Schedule_Entry$i Time`

	if [ -z "$RULE" ] || [ "$RULE" = "-" ] || [ "$RULE" = "connection error" ] || [ "$RULE" = "no attribute information" ]; then
		continue
	fi

	CUR_TIME=`date`
	WEEKDAY=${CUR_TIME%%' '*}

	case "$WEEKDAY" in
		"Mon")
			day=0
		;;
		"Tue")
			day=1
		;;
		"Wed")
			day=2
		;;
		"Thu")
			day=3
		;;
		"Fri")
			day=4
		;;	
		"Sat")
			day=5
		;;	
		"Sun")
			day=6
		;;
		*)
			day=0
		;;							
	esac

	hour=${CUR_TIME%%\:*}
	hour=${hour##*' '}
	hour=`expr $hour + 0`
	
	CUR_SCH=`expr $day \* 24`
	CUR_SCH=`expr $CUR_SCH + $hour`

	FLAG=0
	i=1
	SCH_TIME=`echo "$RULE" | awk -F"[-]" '{print $1}'`
	while [ -n "$SCH_TIME" ]
	do
		if [ "$CUR_SCH" = "$SCH_TIME" ]; then
			FLAG=1
			break
		fi
		i=`expr $i + 1`
		SCH_TIME=`echo "$RULE" | awk -F"[-]" '{print $'$i'}'`
	done

	if [ "$FLAG" = "1" ]; then
		if [ "$ENABLED" = "0" ]; then
			/userfs/bin/tcapi set WLan11ac_Entry0 EnableSSID 1
			/userfs/bin/tcapi commit WLan11ac_Entry0
			echo "WiFi 5G start by scheduled!"
		fi
	else
		if [ "$ENABLED" = "1" ]; then
			/userfs/bin/tcapi set WLan11ac_Entry0 EnableSSID 0
			/userfs/bin/tcapi commit WLan11ac_Entry0
			echo "WiFi 5G stop by scheduled!"
		fi
	fi

done