summaryrefslogtreecommitdiff
path: root/package/comgt/files/hsoauth.comgt
blob: ea81ee3caf85583cd6b4a026a196bb8e88829cb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
opengt
 set com 115200n81
 set senddelay 0.02
 waitquiet 1 0.2

:start
 flash 0.1

:getuser
 let $u=$env("USER")
 let a=len($u)
 if a=0 goto continue

:getpass
 let $p=$env("PASS")

:auth
 print "User: ",$u,"\n"
 print "Pass: ",$p,"\n"
 send "AT$QCPDPP=1,1,\""
 send $p
 send "\",\""
 send $u
 send "\"^m"
 waitfor 2 "OK"
 if % = -1 goto error
 if % = 0 goto continue

:error
 exit 1

:continue
 exit 0