... or anyone who's interested. well i was too bored and decided to try making something to control vbplaza actions from mirc. was gonna add more functions like donating points and depositing points but i've had enough for today. really early version so don't expect anything near perfect(with repeated and hardcoded stuffs). testing has only been done based on my own account, hoping that the tokens would be the same no matter what account you log into. tell me if it doesnt work.
Storm: as requested, your pure mircscript version.
Usage: unzip vbux.zip and put the 2 files in your mirc folder.
open gzp.ini and fill in username and password after the = signs
run mirc press alt+r, load vbux.ini
!vb <user> for checking of user's points
->-eL- Storm has 3,832.50 vbBux. ( Bank: 0.00 , Hand: 3,832.50)
!vbank to check your next bank interest
->-eL- Next Bank Interest: 09-06-2008, 06:24 PM / 6 days, 23 hours, 4 minutes, 29 seconds until next payment of 2.50 Points vbBux
to prove there's no sneaky code that sends me your password, this is what's in vbux.ini
Code:
[script]
n0=var %cookie
n1=var %username, %password
n2=var %target, %chan, %result
n3=
n4=on *:INPUT:*: {
n5= if ($$1 == !vb) {
n6= %target = $2
n7= %chan = $chan
n8= /sockopen gzp www.gamerzplanet.net 80 ;points checker
n9= }
n10= if ($1 == !vbank) {
n11= %chan = $chan
n12= /sockopen vbank www.gamerzplanet.net 80 bank interest checker
n13= }
n14=}
n15=
n16=on *:START: { ;login to forums when you run mirc.
n17= .user_settings
n18= /sockopen gzplogin www.gamerzplanet.net 80
n19=}
n20=
n21=on *:EXIT: { ;clear cookies when you close mirc.
n22= .remini gzp.ini Cookies
n23=}
n24=
n25=on *:SOCKOPEN:vbank: { ;next bank interest
n26= sockwrite -n $sockname GET /forums/vbplaza.php?do=item&name=bank HTTP/1.1
n27= sockwrite -n $sockname Host: www.gamerzplanet.net
n28= sockwrite -n $sockname Cookie: %cookie
n29= sockwrite -n $sockname $crlf
n30=}
n31=
n32=on *:SOCKREAD:vbank: { ;next bank interest
n33= .sockread %temp
n34= if ($regex(%temp, Set-Cookie:)) {
n35= .writeini -n gzp.ini Cookies $gettok($gettok(%temp, 2, 32), 1, 61) $gettok($gettok(%temp, 2, 32), 2, 61)
n36= }
n37= if ($regex(%temp, Next Bank Interest:)) {
n38= %result = %result $+ $htmlfree(%temp)
n39= }
n40=}
n41=
n42=on *:SOCKCLOSE:vbank: { ;next bank interest
n43= %result = $deltok(%result, 1-11, 32)
n44= %result = $puttok(%result, /, 7, 32)
n45= %result = $deltok(%result, 8-16, 32)
n46= %result = $deltok(%result, 3, 47)
n47= .msg %chan %result
n48= .notice $me %result
n49= %result = $null
n50= .cookie_update
n51=}
n52=
n53=
n54=on *:SOCKOPEN:gzp: { ;points checker
n55= sockwrite -n $sockname GET /forums/members/ $+ %target $+ .html HTTP/1.1
n56= sockwrite -n $sockname Host: www.gamerzplanet.net
n57= sockwrite -n $sockname Cookie: %cookie
n58= sockwrite -n $sockname $crlf
n59=}
n60=
n61=on *:SOCKREAD:gzp: { ;points checker
n62= .sockread %temp
n63= if ($regex(%temp, Set-Cookie:)) {
n64= .writeini -n gzp.ini Cookies $gettok($gettok(%temp, 2, 32), 1, 61) $gettok($gettok(%temp, 2, 32), 2, 61)
n65= }
n66= if ($regex(%temp, Total Points:)) {
n67= %points = $htmlfree(%temp)
n68= %excess = 1- $+ $calc($numtok(%points, 32)-7)
n69= %points = $deltok(%points, %excess, 32)
n70= %result = %target has12 $gettok(%points, 7, 32) 1vbBux. ( Bank: $gettok(%points, 4, 32) $+ $chr(32) $+ , Hand: $gettok(%points, 2, 32) $+ $chr(32) $+ )
n71= }
n72=}
n73=
n74=on *:SOCKCLOSE:gzp: { ;points checker
n75= .msg %chan %result
n76= .notice $me %result
n77= %result = $null
n78= .cookie_update
n79=}
n80=
n81=on *:SOCKOPEN:gzplogin: { ;forum login
n82= sockwrite -n $sockname POST /forums/login.php?do=login HTTP/1.1
n83= sockwrite -n $sockname Host: www.gamerzplanet.net
n84= sockwrite -n $sockname Content-Type: application/x-www-form-urlencoded
n85= sockwrite -n $sockname Content-Length: $len(vb_login_username= $+ %username $+ &cookieuser=1&vb_login_password=&s=&securitytoken= $+ %securitytoken $+ &do=login&vb_login_md5password= $+ %password $+ &vb_login_md5password_utf= $+ %password)
n86= sockwrite -n $sockname $crlf
n87= sockwrite -n $sockname vb_login_username= $+ %username $+ &cookieuser=1&vb_login_password=&s=&securitytoken=9e754b49a502569bb144cd6021a14f748f38ce81&do=login&vb_login_md5password= $+ %password $+ &vb_login_md5password_utf= $+ %password
n88=}
n89=
n90=on *:SOCKREAD:gzplogin: { ;forum login
n91= .sockread %temp
n92= if ($regex(%temp, Set-Cookie:)) {
n93= .writeini -n gzp.ini Cookies $gettok($gettok(%temp, 2, 32), 1, 61) $gettok($gettok(%temp, 2, 32), 2, 61)
n94= }
n95=}
n96=
n97=on *:SOCKCLOSE:gzplogin: { ;forum login
n98= .cookie_update
n99=}
n100=
n101=alias -l user_settings { ;reads username and password from gzp.ini
n102= %username = $readini(gzp.ini, User, nick)
n103= %password = $md5($readini(gzp.ini, User, password))
n104=};use md5ed password in file if you remove the $md5()
n105=
n106=alias -l cookie_update { ;update cookie values
n107= var %count = 0
n108= %cookie = $null
n109= while (%count < $ini(gzp.ini, Cookies, 0)) {
n110= %temp = %count + 1
n111= %name = $ini(gzp.ini, Cookies, %temp)
n112= %value = $readini(gzp.ini, Cookies, %name)
n113= if (%count != 0) {
n114= %cookie = %cookie $+ $chr(32)
n115= }
n116= %cookie = %cookie $+ %name $+ $chr(61) $+ %value
n117= %count = %count + 1
n118= }
n119=}
n120=
n121=alias -l htmlfree { ;remove html code
n122= var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&,$chr(9))
n123= return %x
n124=}
may someone with relevant knowledge verify this for me.