OutFile "InternetGetCookie.exe"
Name "InternetGetCookie"
!macro InternetGetCookie URL CookieName
Push $0
Push $1
Push $2
Push $3
StrCpy $0 ""
StrCpy $1 ""
StrCpy $2 1020
StrCpy $3 0
System::Call "Wininet::InternetGetCookieEx(t, t, t, *i, i, i) i ('${URL}', '${CookieName}', r1r1, r2r2, 0, 0) .r3 ? u"
System::Free 0
StrCmp "$3" "1" 0 skip${CookieName}
StrLen $2 ${CookieName}
IntOp $2 $2 + 1
StrCpy $0 $1 "" $2
skip${CookieName}:
Pop $3
Pop $2
Pop $1
Exch $0
!macroend
Section
System::Call 'Wininet::InternetGetCookie(t "http://www.yhxs3344.net", t 0,t .r0,t 1024)'
MessageBox MB_OK|MB_SETFOREGROUND|MB_TOPMOST "全部Cookie$r$0"
!insertmacro InternetGetCookie "http://sina.com.cn" "ULV"
Pop $0
MessageBox MB_OK|MB_SETFOREGROUND|MB_TOPMOST "指定Cookie$r$0"
SectionEnd
THE END
暂无评论内容