hello Michael, need some help,
is posible set 1 password to 1 device, diferetn to another device? like
device1 = password 1
device2 = password 2. ?
here is my script
#!/bin/sh
# Example script for performing basic user authorization for virtualhere
# Also includes a simple password protection mechanism for accessing a device
# Return 2 if the user needs to provide a password (or the password is incorrect) to use the device
# Return 1 if the user is allowed to access this device
# Return 0 if the user is not allowed to access this device
# Parameters are passed in as:
# $1 = VENDOR_ID
# $2 = PRODUCT_ID
# $3 = CLIENT_ID
# $4 = CLIENT_IP
# $5 = PRODUCT_SERIAL
# $6 = PASSWORD
# $7 = DEVPATH
# $8 = NICKNAME
# $9 = NUM_BINDINGS
logger "Authorizing -> '$1' '$2' '$3' '$4' '$5' '$6' '$7' '$8' '$9'"
# "mypassword" = "34819d7beeabb9260a5c854bc85b3e44" as an MD5 hash
if [ "$6" = "34819d7beeabb9260a5c854bc85b3e44" ]; then
echo "Password ok"
else
exit 2
fi
#if [[ "$3" = *"(ANUBIS)"* ]]; then
logger "Authorized!"
exit 1
else
logger "NOT authorized"
exit 0
fi
.
Yes you need to use another
if
or&&
operator statement and use the$DEVPATH$
and/or$PRODUCT_ID$
and$VENDOR_ID$
to test if its the password for the device you want. If not just return0
can help with some example?
can help with some example?
here are mi Hw info
Dongle 1,058f,9540,114131
Dongle 2,058f,9540,1131
.
Have a look at "Example 3" here https://www.virtualhere.com/authorization