Skip to content

Instantly share code, notes, and snippets.

@joaopedroaa
Last active January 12, 2021 14:07
Show Gist options
  • Select an option

  • Save joaopedroaa/69818f7be594d141d325efddd06f1750 to your computer and use it in GitHub Desktop.

Select an option

Save joaopedroaa/69818f7be594d141d325efddd06f1750 to your computer and use it in GitHub Desktop.
curl 'http://192.168.15.1/form2WiFiBasic.cgi' \
-H 'Connection: keep-alive' \
-H 'Cache-Control: max-age=0' \
-H 'Origin: http://192.168.15.1' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'DNT: 1' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Referer: http://192.168.15.1/settings-wireless-network.html' \
-H 'Accept-Language: en-US,en;q=0.9,pt-BR;q=0.8,pt;q=0.7' \
--data-raw 'wlanDisabled=0&hiddenSSID=0&ssid= NAME &pskValue=2F8A30DC91&method=4&disableWPS=1&input_wps_mode=0&submit.htm%3Fsettings-wireless-network.html=Send' \
--compressed \
--insecure
password="$2"
passwordLength=${#password}
if [ ${#password} -ge 8 ]; then
curl 'http://192.168.15.1/form2WiFiBasic.cgi' \
-H 'Connection: keep-alive' \
-H 'Cache-Control: max-age=0' \
-H 'Origin: http://192.168.15.1' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'DNT: 1' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Referer: http://192.168.15.1/settings-wireless-network.html' \
-H 'Accept-Language: en-US,en;q=0.9,pt-BR;q=0.8,pt;q=0.7' \
--data-raw 'wlanDisabled=0&hiddenSSID=0&ssid='$1'&pskValue='$2'&method=4&disableWPS=1&input_wps_mode=0&submit.htm%3Fsettings-wireless-network.html=Send' \
--compressed \
--insecure
echo "tudo certo"
else
echo "A senha deve ter entre 8 a 63 caracteres, ela possui somente $passwordLength caracteres"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment