ie11采用了unicode的api.
import win.ui; /*DSG{{*/ var winform = ..win.form(text="Web Form";right=599;bottom=399) winform.add() /*}}*/ import console; import raw.apiHook import web.form; var host; hookHttpOpenRequest = function(hConnect,lpszVerb,lpszObjectName,lpszVersion,lpszReferrer,lplpszAcceptTypes,dwFlags,dwContext){ console.log(host ++ string.fromUnicode(lpszObjectName,0,true)) return owner.callApi( hConnect,(lpszVerb),(lpszObjectName),(lpszVersion),(lpszReferrer),lplpszAcceptTypes,dwFlags,dwContext ) } hookInternetConnect = function(hInet,serverName, serverPort, userName, password, service, flags, context){ host = string.fromUnicode(serverName,0,true) return owner.callApi(hInet,(serverName), serverPort, userName, password, service, flags, context); } hook = raw.apiHook("Wininet.dll", "HttpOpenRequestW", "pointer(pointer hConnect,pointer lpszVerb,pointer lpszObjectName,pointer lpszVersion,pointer lpszReferrer,pointer lplpszAcceptTypes,INT dwFlags,INT dwContext)", hookHttpOpenRequest).install() hook2 = raw.apiHook("Wininet.dll", "InternetConnectW","pointer(pointer hInet,pointer serverName,INT serverPort,pointer userName,pointer password,INT service,INT flags,INT context)",hookInternetConnect).install(); var wb = web.form( winform ); wb.noScriptErr = true; winform.show(); //显示窗体 //打开目标网站 wb.go("https://www.baidu.com/") wb.wait(""); //等待指定网址,可以使用模式匹配语法 /* hook.unInstall() hook2.unInstall() */ //启动消息循环 win.loopMessage();
- 本文固定链接: http://ninecmd.com/archives/897
- 转载请注明: NINE 于 NINE的博客 发表