18 lines
561 B
Bash
Executable File
18 lines
561 B
Bash
Executable File
#!/bin/bash
|
|
|
|
sleep $(( ( RANDOM % 300 ) + 1 ))
|
|
|
|
pin=$1
|
|
typ=$2
|
|
date=$(date +"%d/%m/%Y+%H:%M:%S")
|
|
#dateenc=$(urlencode $date)
|
|
|
|
#login
|
|
token=$(curl --header "user: 4d805364-70d7-4608-bf2f-7bf7b3d32c04" --header "pass: $pin" https://timenet.gpisoftware.com/api/v1/cp/login --silent)
|
|
token="${token//\"}"
|
|
|
|
#checks
|
|
response=$(curl -X POST -H "Content-type: application/x-www-form-urlencoded" -H "token: $token" -d "typ=$typ&date=$date&geoLatitude=41.3908992&geoLognitude=2.154496&geoError=" https://timenet.gpisoftware.com/api/v1/cp/checks --silent)
|
|
|
|
echo $response
|