HEX
Server: Apache
System: Linux vpshost0650.publiccloud.com.br 4.4.79-grsec-1.lc.x86_64 #1 SMP Wed Aug 2 14:18:21 -03 2017 x86_64
User: bandeirantesbomb3 (10068)
PHP: 8.0.7
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //proc/thread-self/root/usr/share/doc/wpa_supplicant-2.6/examples/wps-ap-cli
#!/bin/sh

CLI=wpa_cli

pbc()
{
	echo "Starting PBC mode"
	echo "Push button on the station within two minutes"
	if ! $CLI wps_pbc | grep -q OK; then
		echo "Failed to enable PBC mode"
	fi
}

enter_pin()
{
	echo "Enter a PIN from a station to be enrolled to the network."
	echo -n "Enrollee PIN: "
	read pin
	cpin=`$CLI wps_check_pin "$pin" | tail -1`
	if [ "$cpin" = "FAIL-CHECKSUM" ]; then
		echo "Checksum digit is not valid"
		echo -n "Do you want to use this PIN (y/n)? "
		read resp
		case "$resp" in
			y*)
				cpin=`echo "$pin" | sed "s/[^1234567890]//g"`
				;;
			*)
				return 1
				;;
		esac
	fi
	if [ "$cpin" = "FAIL" ]; then
		echo "Invalid PIN: $pin"
		return 1
	fi
	echo "Enabling Enrollee PIN: $cpin"
	$CLI wps_pin any "$cpin"
}

show_config()
{
	$CLI status wps
}

main_menu()
{
	echo "WPS AP"
	echo "------"
	echo "1: Push button (activate PBC)"
	echo "2: Enter Enrollee PIN"
	echo "3: Show current configuration"
	echo "0: Exit wps-ap-cli"

	echo -n "Command: "
	read cmd

	case "$cmd" in
		1)
			pbc
			;;
		2)
			enter_pin
			;;
		3)
			show_config
			;;
		0)
			exit 0
			;;
		*)
			echo "Unknown command: $cmd"
			;;
	esac

	echo
	main_menu
}


main_menu