; IRC에서 alt + r 로 스크립트 편집기를 열고, 아랫 글 내용을 전체 복사해서 붙여넣으십시요.
; IRC 6.x 버전이상 사용가능합니다. 이하 버전 기반의 zeroIRC 나 xIRC등에서는 여러 기능이 미비한 관계로 작동하지 않습니다.
; 최신버전 mIRC를 추천합니다.
; 메가패스(쿡QOOK) 인터넷 가입자에겐 매달 무료 100건의 sms가 주어집니다.
; http://internetzone.qook.co.kr/top/index.zone 에 로그인 가능한 아이디/비번을 가지신 분이 이용할 수 있는 스크립트입니다.
; 홈페이지에서 로그인하여 번호와 메시지를 입력하는 과정을 irc로 옮긴것입니다.
; 잘 사용하다가 어느날 갑자기 스크립트가 오작동하면 제작자한테 문의해주세요.랄까나..
; 제작일 2009.08.24 - 참진의 루나틱님 스크립트에서 qook 개편으로 인해 수정한것입니다.
; 사용법
; 먼저
; /sms.set
; 을 실행해서 기본 정보를 등록할것
; 이후 문자보내기는
;/sms 폰번호 메시지
; 로 실행하면됩니다.
; 공공장소에서는 이용하지 마십시요. 사용자 정보가 남습니다.
alias sms.set {
%sms.id = $$?"* 매가패스 아이디를 입력하세요"
%sms.pass = $$?"* 매가패스 비밀번호를 입력하세요"
%sms.rec = $$?"* 자신의 폰 번호를 입력하세요 (010-1234-****) 의 형식"
}
Alias sms { mega.send $1 $2- }
Alias mega.send {
if ($mega.sms.r($1)) {
if ($2-) {
set %mega.sms.rec $mega.sms.r($1)
;set %mega.sms.send $mega.sms.r($2)
set %mega.sms.key $urlencode($2-)
qook.index
}
else { echo -a 메세지를 입력하세여~ }
}
else { echo -a "sms 폰번호 메시지" 형식으로 입력하세요. }
}
Alias urlencode {
return $regsubex($1-,/\G(.)/g,$iif(\t !isalnum && !$prop,$chr(37) $+ $base($asc(\t),10,16),\t))
}
Alias encodeurl {
; Enchant님 감사합니다.
var %target $1- | var %target $replace(%target,$chr(32),$chr(43)) | %i = 1 | %l = 1 | unset %output
while %l <= $numtok(%target,32) {
while %i <= $len($gettok(%target,%l,32)) {
%output = $+(%output,%,$base($asc($mid($gettok(%target,%l,32),%i,1)),10,16))
inc %i
}
inc %l
}
return %output
}
Alias mega.sms.r {
var %p = $1, %i = 01(0|1|6|7|8)[\d]{7,8}
var %o = $regsub(%p,%i,,%n)
if (%o) {
if ($len(%p) == 11) { return $+($left(%p,3),-,$mid(%p,4,4),-,$mid(%p,8,4)) }
else if ($len(%p) == 10) { return $+($left(%p,3),-,$mid(%p,4,3),-,$mid(%p,7,4)) }
}
else return
}
Alias mega.sms.reg {
var %i = [\d]{3}-[\d]{3,4}-[\d]{4}
return $regex($1-,%i)
}
alias qook.index { sockclose qook.index | sockopen qook.index internetzone.qook.co.kr 80 }
on *:sockopen:qook.index: {
sockwrite -nt $sockname GET / HTTP/1.1
sockwrite -nt $sockname Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-silverlight, */*
sockwrite -nt $sockname Accept-Encoding: gzip, deflate
sockwrite -nt $sockname Accept-Language: ko
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -nt $sockname Host: internetzone.qook.co.kr
sockwrite -nt $sockname UA-CPU: x86
sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
sockwrite -nt $sockname $lf
}
var %ccguid, %ccsession
on *:sockread:qook.index: {
sockread %tmp
if ( %tmp && Set-Cookie isin %tmp ) {
if ( ccguid isin %tmp ) { %ccguid = $remove(%tmp, path=/; domain=.qook.co.kr;,Set-Cookie:, expires=) }
elseif ( ccsession isin %tmp ) { %ccsession = $remove(%tmp,path=/;, domain=.qook.co.kr,Set-Cookie:, expires=) | halt }
}
}
on *:sockclose:qook.index: {
if ( !%ccguid || !%ccsession ) { echo 3 -a 접속에 실패하였네요. 4http://internetzone.qook.co.kr/top/index.zone 3에 접속가능한 상태인지 확인해주세요. }
else { echo 3 -a qook 접속중... | megapass.loginauth }
}
alias megapass.loginauth { sockclose megapass.loginauth | sockopen megapass.loginauth login.megapass.net 80 }
on *:sockopen:megapass.loginauth: {
var %i = encryptedData&ktdid=10000015&ktfailurl=http://www.qook.co.kr/cz/jsp/ctosman_login.jsp?LOGIN_TYPE=&kturl=http://www.qook.co.kr/weblogic/cs100q_s02&orgdt=&loginid= $+ %sms.id $+ &password= $+ %sms.pass
sockwrite -nt $sockname POST /auth/loginauth.php HTTP/1.1
sockwrite -nt $sockname Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-silverlight, */*
sockwrite -nt $sockname Accept-Encoding: gzip, deflate
sockwrite -nt $sockname Accept-Language: ko
sockwrite -nt $sockname Cache-Control: no-cache
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -nt $sockname Content-Length: $len(%i)
sockwrite -nt $sockname Content-Type: application/x-www-form-urlencoded
sockwrite -nt $sockname Host: login.megapass.net
sockwrite -nt $sockname Referer: http://www.qook.co.kr/cs/jsp/login_sub.jsp
sockwrite -nt $sockname UA-CPU: x86
sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
sockwrite -nt $sockname $lf
sockwrite -nt $sockname $eval(%i)
if ( !$hget(mega.login.param) ) { hmake -s mega.login.param 10 } | else { hfree -s mega.login.param | hmake -s mega.login.param 10 }
}
on *:sockread:megapass.loginauth: {
sockread %tmp
if (%tmp && input isin %tmp ) {
$regex(%tmp,name="(.*?)" value="(.*?)">)
;echo -a $regml(1) $regml(2)
if ( $regml(1) ) { hadd -s mega.login.param $regml(1) $regml(2) | halt }
}
}
on *:sockclose:megapass.loginauth: {
if ( !$hget(mega.login.param,onetimepwd) ) {
echo 3 -a 로그인에 실패하였네요. 4http://internetzone.qook.co.kr/top/index.zone 3에 접속하셔서, 로그인 아이디와 비번을 확인해주세요.
echo 3 -a 확인 후 4/sms.set 3로 재설정해주십시요.
unset %ccguid
unset %ccsession
hfree -s mega.login.param
}
else { echo 3 -a qook 로그인 중... | qook.loginnew }
}
alias qook.loginnew { sockclose qook.loginnew | sockopen qook.loginnew withkt.qook.co.kr 80 }
on *:sockopen:qook.loginnew: {
var %i = ktuid= $+ $hget(mega.login.param,ktuid) $+ &onetimepwd= $+ $hget(mega.login.param,onetimepwd) $+ &kturl= $+ $hget(mega.login.param,kturl) $+ &repdomain= $+ $hget(mega.login.param,repdomain) $+ &saiduid= $+ $hget(mega.login.param,saiduid) $+ &uid= $+ $hget(mega.login.param,uid) $+ &idtype= $+ $hget(mega.login.param,idtype) $+ &pc= $+ $hget(mega.login.param,pc) $+ &ut= $+ $hget(mega.login.param,ut) $+ &sd= $+ $hget(mega.login.param,sd)
;hfree -s mega.login.param
sockwrite -nt $sockname POST /auth/loginnew.php HTTP/1.1
sockwrite -nt $sockname Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-silverlight, */*
sockwrite -nt $sockname Accept-Encoding: gzip, deflate
sockwrite -nt $sockname Accept-Language: ko
sockwrite -nt $sockname Cache-Control: no-cache
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -nt $sockname Content-Length: $len(%i)
sockwrite -nt $sockname Content-Type: application/x-www-form-urlencoded
sockwrite -nt $sockname Cookie: %ccsession $+ %ccguid
sockwrite -nt $sockname Host: withkt.qook.co.kr
sockwrite -nt $sockname UA-CPU: x86
sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
sockwrite -nt $sockname $lf
sockwrite -nt $sockname $eval(%i)
if ( !$hget(qook.loginnew.cookie) ) { hmake -s qook.loginnew.cookie 20 } | else { hfree -s qook.loginnew.cookie | hmake -s qook.loginnew.cookie 20 }
}
on *:sockread:qook.loginnew: {
sockread %tmp
if ( %tmp && Set-Cookie isin %tmp ) {
;echo 4 -a $gettok($remove(%tmp,Set-Cookie:),1,61) : $remove(%tmp,Set-Cookie: , path=/; domain=.qook.co.kr)
hadd -m qook.loginnew.cookie $gettok($remove(%tmp,Set-Cookie:),1,61) $remove(%tmp,Set-Cookie: , path=/; domain=.qook.co.kr)
}
}
on *:sockclose:qook.loginnew: {
if ( !$hget(qook.loginnew.cookie,checksum) ) {
echo 3 -a 로그인에 실패하였네요. 다시 시도해주시고, 계속 실패가 발생할시는 스크립트 수정이 필요합니다. 제작자에게 알려주세요.
unset %ccguid
unset %ccsession
hfree -s mega.login.param
}
else { echo 3 -a qook 로그인 처리 중... | qook.login_auth }
}
alias qook.login_auth { sockclose qook.login_auth | sockopen qook.login_auth internetzone.qook.co.kr 80 }
on *:sockopen:qook.login_auth: {
var %cookies %ccsession $+ %ccguid $+ $hget(qook.loginnew.cookie,idtype) $+ $hget(qook.loginnew.cookie,KTKEY) $+ $hget(qook.loginnew.cookie,KTSID) $+ $hget(qook.loginnew.cookie,KTSSOKEY) $+ $hget(qook.loginnew.cookie,KTSSOSID) $+ $hget(qook.loginnew.cookie,KTSSOUID) $+ $hget(qook.loginnew.cookie,KTUID) $+ $hget(qook.loginnew.cookie,ktuniq) $+ $hget(qook.loginnew.cookie,LOGINSITE) $+ $hget(qook.loginnew.cookie,pc) $+ $hget(qook.loginnew.cookie,sd) $+ $hget(qook.loginnew.cookie,uid) $+ $hget(qook.loginnew.cookie,userid) $+ $hget(qook.loginnew.cookie,ut)
sockwrite -nt $sockname GET /auth/login_auth.zone?wbSurl=http%3A//internetzone.qook.co.kr/top/index.zone&method=mzLogin&wbResult=Y&wbCoop=megazone&okurl=&kterrmsg= HTTP/1.1
sockwrite -nt $sockname Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-silverlight, */*
sockwrite -nt $sockname Accept-Encoding: gzip, deflate
sockwrite -nt $sockname Accept-Language: ko
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -nt $sockname Cookie: %cookies
sockwrite -nt $sockname Host: internetzone.qook.co.kr
sockwrite -nt $sockname UA-CPU: x86
sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
sockwrite -nt $sockname $lf
}
var %CP, %MZ
on *:sockread:qook.login_auth: {
sockread %tmp
if ( %tmp && Set-Cookie isin %tmp && CP isin %tmp && CP=; !isin %tmp ) {
%CP = $remove(%tmp,Set-Cookie: , path=/; domain=.qook.co.kr; )
}
elseif ( %tmp && Set-Cookie isin %tmp && MZ isin %tmp && MZ=; !isin %tmp ) {
%MZ = $remove(%tmp,Set-Cookie: , path=/; domain=.qook.co.kr; )
}
}
on *:sockclose:qook.login_auth: {
if ( !%CP || !%MZ ) {
echo 3 -a 로그인에 실패하였네요2. 다시 시도해주시고, 계속 실패가 발생할시는 스크립트 수정이 필요합니다. 제작자에게 알려주세요.
unset %ccguid
unset %ccsession
hfree -s mega.login.param
hfree -s qook.loginnew.cookie
}
else { echo 3 -a 메시지 발송 중... | megapass.sms }
}
alias megapass.sms { sockclose megapass.sms | sockopen megapass.sms mzsms.megapass.net 80 }
on *:sockopen:megapass.sms: {
var %i = &emotrowid=&message= $+ %mega.sms.key $+ &myphone= $+ %sms.rec $+ &phonenos= $+ %mega.sms.rec $+ &names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&reserveDate=
sockwrite -nt $sockname POST /MegaSms/mobile/sms/sms_mini_main.html HTTP/1.1
sockwrite -nt $sockname Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-silverlight, */*
sockwrite -nt $sockname Accept-Encoding: gzip, deflate
sockwrite -nt $sockname Accept-Language: ko
sockwrite -nt $sockname Cache-Control: no-cache
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -nt $sockname Content-Length: $len(%i)
sockwrite -nt $sockname Content-Type: application/x-www-form-urlencoded
sockwrite -nt $sockname Cookie: %ccsession $+ %ccguid $+ $hget(qook.loginnew.cookie,idtype) $+ $hget(qook.loginnew.cookie,KTSSOKEY) $+ $hget(qook.loginnew.cookie,KTSSOUID) $+ $hget(qook.loginnew.cookie,KTSSOSID) $+ $hget(qook.loginnew.cookie,ktuniq) $+ $hget(qook.loginnew.cookie,userid) $+ $hget(qook.loginnew.cookie,KTUID) $+ $hget(qook.loginnew.cookie,KTSID) $+ $hget(qook.loginnew.cookie,KTKEY) $+ $hget(qook.loginnew.cookie,uid) $+ $hget(qook.loginnew.cookie,checksum) $+ $hget(qook.loginnew.cookie,idtype) $+ $hget(qook.loginnew.cookie,pc) $+ $hget(qook.loginnew.cookie,ut) $+ $hget(qook.loginnew.cookie,sd) $+ $hget(qook.loginnew.cookie,LOGINSITE) $+ %CP $+ %MZ $+ evtCookie2866=not;
sockwrite -nt $sockname Host: sms.internetzone.qook.co.kr
sockwrite -nt $sockname Referer: http://sms.internetzone.qook.co.kr/MegaSms/mobile/sms/sms_main.html
sockwrite -nt $sockname UA-CPU: x86
sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
sockwrite -nt $sockname $lf
sockwrite -nt $sockname %i
}
var %tempUrl
on *:sockread:megapass.sms: {
sockread %tmp
if ( %tmp && document.location.href isin %tmp ) {
%tempUrl = $gettok(%tmp,2,$asc("))
}
}
on *:sockclose:megapass.sms: {
echo 3 -a 문자발송이 완료되었습니다.
unset %output
unset %mega.sms.key
hfree -s mega.login.param
qook.MegaSms
}
alias qook.MegaSms { sockclose qook.MegaSms | sockopen qook.MegaSms sms.internetzone.qook.co.kr 80 }
on *:sockopen:qook.MegaSms: {
sockwrite -nt $sockname GET / $+ $gettok(%tempUrl,3-,$asc(/)) HTTP/1.1
sockwrite -nt $sockname Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-silverlight, */*
sockwrite -nt $sockname Accept-Encoding: gzip, deflate
sockwrite -nt $sockname Accept-Language: ko
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -nt $sockname Cookie: %ccsession $+ %ccguid $+ $hget(qook.loginnew.cookie,idtype) $+ $hget(qook.loginnew.cookie,KTSSOKEY) $+ $hget(qook.loginnew.cookie,KTSSOUID) $+ $hget(qook.loginnew.cookie,KTSSOSID) $+ $hget(qook.loginnew.cookie,ktuniq) $+ $hget(qook.loginnew.cookie,userid) $+ $hget(qook.loginnew.cookie,KTUID) $+ $hget(qook.loginnew.cookie,KTSID) $+ $hget(qook.loginnew.cookie,KTKEY) $+ $hget(qook.loginnew.cookie,uid) $+ $hget(qook.loginnew.cookie,checksum) $+ $hget(qook.loginnew.cookie,idtype) $+ $hget(qook.loginnew.cookie,pc) $+ $hget(qook.loginnew.cookie,ut) $+ $hget(qook.loginnew.cookie,sd) $+ $hget(qook.loginnew.cookie,LOGINSITE) $+ %CP $+ %MZ $+ evtCookie2866=not; $+ RsvNumNew= $+ $remove(%mega.sms.rec,-) $+ ; SndNumNew= $+ $remove(%sms.rec,-) $+ ;
sockwrite -nt $sockname Host: sms.internetzone.qook.co.kr
sockwrite -nt $sockname UA-CPU: x86
sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
sockwrite -nt $sockname $lf
}
var %fSendingCount
on *:sockread:qook.MegaSms: {
sockread %tmp
if ( %tmp && var fSendingCount isin %tmp ) {
%fSendingCount = $remove($gettok(%tmp,2,$asc(=)),;)
}
if ( %tmp && alert isin %tmp ) {
set %mega.rslt $gettok(%tmp,2,$asc("))
}
}
on *:sockclose:qook.MegaSms: {
echo 4 -a %mega.rslt
if ( %fSendingCount ) {
echo 4 -a 문자발송 완료. 이 달의 문자는 %fSendingCount 건 남았습니다.
}
unset %ccguid
unset %ccsession
unset %CP
unset %MZ
unset %mega.sms.rec
hfree -s mega.login.param
hfree -s qook.loginnew.cookie
unset %tempUrl
}
; qook sms 스크립트 끝
; IRC 6.x 버전이상 사용가능합니다. 이하 버전 기반의 zeroIRC 나 xIRC등에서는 여러 기능이 미비한 관계로 작동하지 않습니다.
; 최신버전 mIRC를 추천합니다.
; 메가패스(쿡QOOK) 인터넷 가입자에겐 매달 무료 100건의 sms가 주어집니다.
; http://internetzone.qook.co.kr/top/index.zone 에 로그인 가능한 아이디/비번을 가지신 분이 이용할 수 있는 스크립트입니다.
; 홈페이지에서 로그인하여 번호와 메시지를 입력하는 과정을 irc로 옮긴것입니다.
; 잘 사용하다가 어느날 갑자기 스크립트가 오작동하면 제작자한테 문의해주세요.랄까나..
; 제작일 2009.08.24 - 참진의 루나틱님 스크립트에서 qook 개편으로 인해 수정한것입니다.
; 사용법
; 먼저
; /sms.set
; 을 실행해서 기본 정보를 등록할것
; 이후 문자보내기는
;/sms 폰번호 메시지
; 로 실행하면됩니다.
; 공공장소에서는 이용하지 마십시요. 사용자 정보가 남습니다.
alias sms.set {
%sms.id = $$?"* 매가패스 아이디를 입력하세요"
%sms.pass = $$?"* 매가패스 비밀번호를 입력하세요"
%sms.rec = $$?"* 자신의 폰 번호를 입력하세요 (010-1234-****) 의 형식"
}
Alias sms { mega.send $1 $2- }
Alias mega.send {
if ($mega.sms.r($1)) {
if ($2-) {
set %mega.sms.rec $mega.sms.r($1)
;set %mega.sms.send $mega.sms.r($2)
set %mega.sms.key $urlencode($2-)
qook.index
}
else { echo -a 메세지를 입력하세여~ }
}
else { echo -a "sms 폰번호 메시지" 형식으로 입력하세요. }
}
Alias urlencode {
return $regsubex($1-,/\G(.)/g,$iif(\t !isalnum && !$prop,$chr(37) $+ $base($asc(\t),10,16),\t))
}
Alias encodeurl {
; Enchant님 감사합니다.
var %target $1- | var %target $replace(%target,$chr(32),$chr(43)) | %i = 1 | %l = 1 | unset %output
while %l <= $numtok(%target,32) {
while %i <= $len($gettok(%target,%l,32)) {
%output = $+(%output,%,$base($asc($mid($gettok(%target,%l,32),%i,1)),10,16))
inc %i
}
inc %l
}
return %output
}
Alias mega.sms.r {
var %p = $1, %i = 01(0|1|6|7|8)[\d]{7,8}
var %o = $regsub(%p,%i,,%n)
if (%o) {
if ($len(%p) == 11) { return $+($left(%p,3),-,$mid(%p,4,4),-,$mid(%p,8,4)) }
else if ($len(%p) == 10) { return $+($left(%p,3),-,$mid(%p,4,3),-,$mid(%p,7,4)) }
}
else return
}
Alias mega.sms.reg {
var %i = [\d]{3}-[\d]{3,4}-[\d]{4}
return $regex($1-,%i)
}
alias qook.index { sockclose qook.index | sockopen qook.index internetzone.qook.co.kr 80 }
on *:sockopen:qook.index: {
sockwrite -nt $sockname GET / HTTP/1.1
sockwrite -nt $sockname Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-silverlight, */*
sockwrite -nt $sockname Accept-Encoding: gzip, deflate
sockwrite -nt $sockname Accept-Language: ko
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -nt $sockname Host: internetzone.qook.co.kr
sockwrite -nt $sockname UA-CPU: x86
sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
sockwrite -nt $sockname $lf
}
var %ccguid, %ccsession
on *:sockread:qook.index: {
sockread %tmp
if ( %tmp && Set-Cookie isin %tmp ) {
if ( ccguid isin %tmp ) { %ccguid = $remove(%tmp, path=/; domain=.qook.co.kr;,Set-Cookie:, expires=) }
elseif ( ccsession isin %tmp ) { %ccsession = $remove(%tmp,path=/;, domain=.qook.co.kr,Set-Cookie:, expires=) | halt }
}
}
on *:sockclose:qook.index: {
if ( !%ccguid || !%ccsession ) { echo 3 -a 접속에 실패하였네요. 4http://internetzone.qook.co.kr/top/index.zone 3에 접속가능한 상태인지 확인해주세요. }
else { echo 3 -a qook 접속중... | megapass.loginauth }
}
alias megapass.loginauth { sockclose megapass.loginauth | sockopen megapass.loginauth login.megapass.net 80 }
on *:sockopen:megapass.loginauth: {
var %i = encryptedData&ktdid=10000015&ktfailurl=http://www.qook.co.kr/cz/jsp/ctosman_login.jsp?LOGIN_TYPE=&kturl=http://www.qook.co.kr/weblogic/cs100q_s02&orgdt=&loginid= $+ %sms.id $+ &password= $+ %sms.pass
sockwrite -nt $sockname POST /auth/loginauth.php HTTP/1.1
sockwrite -nt $sockname Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-silverlight, */*
sockwrite -nt $sockname Accept-Encoding: gzip, deflate
sockwrite -nt $sockname Accept-Language: ko
sockwrite -nt $sockname Cache-Control: no-cache
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -nt $sockname Content-Length: $len(%i)
sockwrite -nt $sockname Content-Type: application/x-www-form-urlencoded
sockwrite -nt $sockname Host: login.megapass.net
sockwrite -nt $sockname Referer: http://www.qook.co.kr/cs/jsp/login_sub.jsp
sockwrite -nt $sockname UA-CPU: x86
sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
sockwrite -nt $sockname $lf
sockwrite -nt $sockname $eval(%i)
if ( !$hget(mega.login.param) ) { hmake -s mega.login.param 10 } | else { hfree -s mega.login.param | hmake -s mega.login.param 10 }
}
on *:sockread:megapass.loginauth: {
sockread %tmp
if (%tmp && input isin %tmp ) {
$regex(%tmp,name="(.*?)" value="(.*?)">)
;echo -a $regml(1) $regml(2)
if ( $regml(1) ) { hadd -s mega.login.param $regml(1) $regml(2) | halt }
}
}
on *:sockclose:megapass.loginauth: {
if ( !$hget(mega.login.param,onetimepwd) ) {
echo 3 -a 로그인에 실패하였네요. 4http://internetzone.qook.co.kr/top/index.zone 3에 접속하셔서, 로그인 아이디와 비번을 확인해주세요.
echo 3 -a 확인 후 4/sms.set 3로 재설정해주십시요.
unset %ccguid
unset %ccsession
hfree -s mega.login.param
}
else { echo 3 -a qook 로그인 중... | qook.loginnew }
}
alias qook.loginnew { sockclose qook.loginnew | sockopen qook.loginnew withkt.qook.co.kr 80 }
on *:sockopen:qook.loginnew: {
var %i = ktuid= $+ $hget(mega.login.param,ktuid) $+ &onetimepwd= $+ $hget(mega.login.param,onetimepwd) $+ &kturl= $+ $hget(mega.login.param,kturl) $+ &repdomain= $+ $hget(mega.login.param,repdomain) $+ &saiduid= $+ $hget(mega.login.param,saiduid) $+ &uid= $+ $hget(mega.login.param,uid) $+ &idtype= $+ $hget(mega.login.param,idtype) $+ &pc= $+ $hget(mega.login.param,pc) $+ &ut= $+ $hget(mega.login.param,ut) $+ &sd= $+ $hget(mega.login.param,sd)
;hfree -s mega.login.param
sockwrite -nt $sockname POST /auth/loginnew.php HTTP/1.1
sockwrite -nt $sockname Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-silverlight, */*
sockwrite -nt $sockname Accept-Encoding: gzip, deflate
sockwrite -nt $sockname Accept-Language: ko
sockwrite -nt $sockname Cache-Control: no-cache
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -nt $sockname Content-Length: $len(%i)
sockwrite -nt $sockname Content-Type: application/x-www-form-urlencoded
sockwrite -nt $sockname Cookie: %ccsession $+ %ccguid
sockwrite -nt $sockname Host: withkt.qook.co.kr
sockwrite -nt $sockname UA-CPU: x86
sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
sockwrite -nt $sockname $lf
sockwrite -nt $sockname $eval(%i)
if ( !$hget(qook.loginnew.cookie) ) { hmake -s qook.loginnew.cookie 20 } | else { hfree -s qook.loginnew.cookie | hmake -s qook.loginnew.cookie 20 }
}
on *:sockread:qook.loginnew: {
sockread %tmp
if ( %tmp && Set-Cookie isin %tmp ) {
;echo 4 -a $gettok($remove(%tmp,Set-Cookie:),1,61) : $remove(%tmp,Set-Cookie: , path=/; domain=.qook.co.kr)
hadd -m qook.loginnew.cookie $gettok($remove(%tmp,Set-Cookie:),1,61) $remove(%tmp,Set-Cookie: , path=/; domain=.qook.co.kr)
}
}
on *:sockclose:qook.loginnew: {
if ( !$hget(qook.loginnew.cookie,checksum) ) {
echo 3 -a 로그인에 실패하였네요. 다시 시도해주시고, 계속 실패가 발생할시는 스크립트 수정이 필요합니다. 제작자에게 알려주세요.
unset %ccguid
unset %ccsession
hfree -s mega.login.param
}
else { echo 3 -a qook 로그인 처리 중... | qook.login_auth }
}
alias qook.login_auth { sockclose qook.login_auth | sockopen qook.login_auth internetzone.qook.co.kr 80 }
on *:sockopen:qook.login_auth: {
var %cookies %ccsession $+ %ccguid $+ $hget(qook.loginnew.cookie,idtype) $+ $hget(qook.loginnew.cookie,KTKEY) $+ $hget(qook.loginnew.cookie,KTSID) $+ $hget(qook.loginnew.cookie,KTSSOKEY) $+ $hget(qook.loginnew.cookie,KTSSOSID) $+ $hget(qook.loginnew.cookie,KTSSOUID) $+ $hget(qook.loginnew.cookie,KTUID) $+ $hget(qook.loginnew.cookie,ktuniq) $+ $hget(qook.loginnew.cookie,LOGINSITE) $+ $hget(qook.loginnew.cookie,pc) $+ $hget(qook.loginnew.cookie,sd) $+ $hget(qook.loginnew.cookie,uid) $+ $hget(qook.loginnew.cookie,userid) $+ $hget(qook.loginnew.cookie,ut)
sockwrite -nt $sockname GET /auth/login_auth.zone?wbSurl=http%3A//internetzone.qook.co.kr/top/index.zone&method=mzLogin&wbResult=Y&wbCoop=megazone&okurl=&kterrmsg= HTTP/1.1
sockwrite -nt $sockname Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-silverlight, */*
sockwrite -nt $sockname Accept-Encoding: gzip, deflate
sockwrite -nt $sockname Accept-Language: ko
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -nt $sockname Cookie: %cookies
sockwrite -nt $sockname Host: internetzone.qook.co.kr
sockwrite -nt $sockname UA-CPU: x86
sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
sockwrite -nt $sockname $lf
}
var %CP, %MZ
on *:sockread:qook.login_auth: {
sockread %tmp
if ( %tmp && Set-Cookie isin %tmp && CP isin %tmp && CP=; !isin %tmp ) {
%CP = $remove(%tmp,Set-Cookie: , path=/; domain=.qook.co.kr; )
}
elseif ( %tmp && Set-Cookie isin %tmp && MZ isin %tmp && MZ=; !isin %tmp ) {
%MZ = $remove(%tmp,Set-Cookie: , path=/; domain=.qook.co.kr; )
}
}
on *:sockclose:qook.login_auth: {
if ( !%CP || !%MZ ) {
echo 3 -a 로그인에 실패하였네요2. 다시 시도해주시고, 계속 실패가 발생할시는 스크립트 수정이 필요합니다. 제작자에게 알려주세요.
unset %ccguid
unset %ccsession
hfree -s mega.login.param
hfree -s qook.loginnew.cookie
}
else { echo 3 -a 메시지 발송 중... | megapass.sms }
}
alias megapass.sms { sockclose megapass.sms | sockopen megapass.sms mzsms.megapass.net 80 }
on *:sockopen:megapass.sms: {
var %i = &emotrowid=&message= $+ %mega.sms.key $+ &myphone= $+ %sms.rec $+ &phonenos= $+ %mega.sms.rec $+ &names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&names=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&phonenos=&reserveDate=
sockwrite -nt $sockname POST /MegaSms/mobile/sms/sms_mini_main.html HTTP/1.1
sockwrite -nt $sockname Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-silverlight, */*
sockwrite -nt $sockname Accept-Encoding: gzip, deflate
sockwrite -nt $sockname Accept-Language: ko
sockwrite -nt $sockname Cache-Control: no-cache
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -nt $sockname Content-Length: $len(%i)
sockwrite -nt $sockname Content-Type: application/x-www-form-urlencoded
sockwrite -nt $sockname Cookie: %ccsession $+ %ccguid $+ $hget(qook.loginnew.cookie,idtype) $+ $hget(qook.loginnew.cookie,KTSSOKEY) $+ $hget(qook.loginnew.cookie,KTSSOUID) $+ $hget(qook.loginnew.cookie,KTSSOSID) $+ $hget(qook.loginnew.cookie,ktuniq) $+ $hget(qook.loginnew.cookie,userid) $+ $hget(qook.loginnew.cookie,KTUID) $+ $hget(qook.loginnew.cookie,KTSID) $+ $hget(qook.loginnew.cookie,KTKEY) $+ $hget(qook.loginnew.cookie,uid) $+ $hget(qook.loginnew.cookie,checksum) $+ $hget(qook.loginnew.cookie,idtype) $+ $hget(qook.loginnew.cookie,pc) $+ $hget(qook.loginnew.cookie,ut) $+ $hget(qook.loginnew.cookie,sd) $+ $hget(qook.loginnew.cookie,LOGINSITE) $+ %CP $+ %MZ $+ evtCookie2866=not;
sockwrite -nt $sockname Host: sms.internetzone.qook.co.kr
sockwrite -nt $sockname Referer: http://sms.internetzone.qook.co.kr/MegaSms/mobile/sms/sms_main.html
sockwrite -nt $sockname UA-CPU: x86
sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
sockwrite -nt $sockname $lf
sockwrite -nt $sockname %i
}
var %tempUrl
on *:sockread:megapass.sms: {
sockread %tmp
if ( %tmp && document.location.href isin %tmp ) {
%tempUrl = $gettok(%tmp,2,$asc("))
}
}
on *:sockclose:megapass.sms: {
echo 3 -a 문자발송이 완료되었습니다.
unset %output
unset %mega.sms.key
hfree -s mega.login.param
qook.MegaSms
}
alias qook.MegaSms { sockclose qook.MegaSms | sockopen qook.MegaSms sms.internetzone.qook.co.kr 80 }
on *:sockopen:qook.MegaSms: {
sockwrite -nt $sockname GET / $+ $gettok(%tempUrl,3-,$asc(/)) HTTP/1.1
sockwrite -nt $sockname Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-silverlight, */*
sockwrite -nt $sockname Accept-Encoding: gzip, deflate
sockwrite -nt $sockname Accept-Language: ko
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -nt $sockname Cookie: %ccsession $+ %ccguid $+ $hget(qook.loginnew.cookie,idtype) $+ $hget(qook.loginnew.cookie,KTSSOKEY) $+ $hget(qook.loginnew.cookie,KTSSOUID) $+ $hget(qook.loginnew.cookie,KTSSOSID) $+ $hget(qook.loginnew.cookie,ktuniq) $+ $hget(qook.loginnew.cookie,userid) $+ $hget(qook.loginnew.cookie,KTUID) $+ $hget(qook.loginnew.cookie,KTSID) $+ $hget(qook.loginnew.cookie,KTKEY) $+ $hget(qook.loginnew.cookie,uid) $+ $hget(qook.loginnew.cookie,checksum) $+ $hget(qook.loginnew.cookie,idtype) $+ $hget(qook.loginnew.cookie,pc) $+ $hget(qook.loginnew.cookie,ut) $+ $hget(qook.loginnew.cookie,sd) $+ $hget(qook.loginnew.cookie,LOGINSITE) $+ %CP $+ %MZ $+ evtCookie2866=not; $+ RsvNumNew= $+ $remove(%mega.sms.rec,-) $+ ; SndNumNew= $+ $remove(%sms.rec,-) $+ ;
sockwrite -nt $sockname Host: sms.internetzone.qook.co.kr
sockwrite -nt $sockname UA-CPU: x86
sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
sockwrite -nt $sockname $lf
}
var %fSendingCount
on *:sockread:qook.MegaSms: {
sockread %tmp
if ( %tmp && var fSendingCount isin %tmp ) {
%fSendingCount = $remove($gettok(%tmp,2,$asc(=)),;)
}
if ( %tmp && alert isin %tmp ) {
set %mega.rslt $gettok(%tmp,2,$asc("))
}
}
on *:sockclose:qook.MegaSms: {
echo 4 -a %mega.rslt
if ( %fSendingCount ) {
echo 4 -a 문자발송 완료. 이 달의 문자는 %fSendingCount 건 남았습니다.
}
unset %ccguid
unset %ccsession
unset %CP
unset %MZ
unset %mega.sms.rec
hfree -s mega.login.param
hfree -s qook.loginnew.cookie
unset %tempUrl
}
; qook sms 스크립트 끝