Framework update

This commit is contained in:
stephb9959
2021-12-20 21:33:24 -08:00
parent ced05a23a3
commit b1cdccc6b0
14 changed files with 84 additions and 46 deletions

View File

@@ -35,7 +35,7 @@ fi
token=""
result_file=result.json
username="tip@ucentral.com"
password="openwifi"
password="Ninja650!!!"
browser_list=(firefox sensible-browser xdg-open w3m links links2 lynx youtube-dl)
browser=""
@@ -43,7 +43,7 @@ login() {
payload="{ \"userId\" : \"$username\" , \"password\" : \"$password\" }"
token=$(curl ${FLAGS} -X POST -H "Content-Type: application/json" -d "$payload" "https://${OWSEC}/api/v1/oauth2" | jq -r '.access_token')
if [[ "${token}" == "" ]]
if [[ "${token}" == "null" ]]
then
echo "Could not login. Please verify the host and username/password."
exit 13
@@ -459,7 +459,7 @@ affecteddevices() {
shopt -s nocasematch
case "$1" in
"login") login; help ; logout ;;
"login") login; echo "You are logged in..." ; logout ;;
"getroot") login; getroot; logout;;
"setroot") login; setroot; logout;;
"addentity") login; addentity "$2" ; logout;;