<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Выполнение javasсript через АХК]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13157&amp;type=atom" />
	<updated>2025-03-06T15:04:43Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13157</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выполнение javasсript через АХК]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=162057#p162057" />
			<content type="html"><![CDATA[<p>Это невозможно.<br />Там передаваемый хеш создается из свойств браузерного объекта window, который присутствует исключительно в браузере.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2025-03-06T15:04:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=162057#p162057</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выполнение javasсript через АХК]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=162056#p162056" />
			<content type="html"><![CDATA[<p>А удалось ли Вам найти &quot;алгоритм выполнения любых джава-скриптов на страницах&quot;, чтобы можно было применить к этому случаю?</p>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2025-03-06T14:47:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=162056#p162056</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выполнение javasсript через АХК]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=162052#p162052" />
			<content type="html"><![CDATA[<p>Ну если хочется самому, то вам надо понять, что делает данный скрипт и подменить аргументы посылаемые браузером.<br /><a href="https://nitter.space/cdn-cgi/challenge-platform/h/g/scripts/jsd/f3b948d8acb8/main.js?">https://nitter.space/cdn-cgi/challenge- … 8/main.js?</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2025-03-06T08:45:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=162052#p162052</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выполнение javasсript через АХК]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=162050#p162050" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Тут задействован такого типа <a href="https://github.com/C0nw0nk/Nginx-Lua-Anti-DDoS">Anti-DDoS</a>.</p>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2025-03-06T02:03:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=162050#p162050</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выполнение javasсript через АХК]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=162049#p162049" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />Мне бы хотелось самому попробовать, имитировав запуск js, как на той странице - то есть то, о чем Вы писали здесь:<br /></p><div class="quotebox"><blockquote><p><a href="http://forum.script-coding.com/viewtopic.php?pid=103622#p103622">В идеале хотелось бы получить алгоритм выполнения любых джава-скриптов на страницах, чтобы результат потом отправлять через WinHttpRequest.</a></p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2025-03-06T02:02:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=162049#p162049</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выполнение javasсript через АХК]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=162048#p162048" />
			<content type="html"><![CDATA[<p>А разве WinHTTP.WinHTTPRequest.5.1 автоматически куки не вставляет?<br />UPD: А, понял, имеешь в виду куки уже после проверки.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2025-03-06T00:43:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=162048#p162048</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выполнение javasсript через АХК]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=162046#p162046" />
			<content type="html"><![CDATA[<p>Cloudflare проще всего обходить запуская ie или любой другой броузер, получать нужные куки и вставлять их в свой скрипт.<br />Если хотите таки взломать его, то назовите бюджет.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2025-03-05T23:35:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=162046#p162046</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выполнение javasсript через АХК]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=162043#p162043" />
			<content type="html"><![CDATA[<p>В связи с выполнением JS на странице, попался такой <a href="https://nitter.space/romor_on/status/1830312179385712641#m">пример</a>, где реализована проверка, что запрос делается браузером, а не скриптом. При первом обращении к странице из браузера, после небольшой паузы, она перезагружается и в заголовках появляются куки, а в последующие разы перезагрузка страницы происходит уже сразу. Каким тут может быть алгоритм обхода защиты с выполнением JS, для получения куки? Попытка загрузки через скрипт дает ошибку -</p><div class="codebox"><pre><code>proxy := &quot;127.0.0.1:18080&quot;
url := &quot;https://nitter.space/romor_on/status/1830312179385712641#m&quot;

WinHTTP := ComObjCreate(&quot;WinHTTP.WinHTTPRequest.5.1&quot;)

WinHTTP.Open(&quot;GET&quot;, url, 1)
WinHTTP.SetProxy(2, proxy)
WinHTTP.SetRequestHeader(&quot;User-Agent&quot;, &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36&quot;)
WinHTTP.SetRequestHeader(&quot;accept&quot;, &quot;text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7&quot;)
WinHTTP.SetRequestHeader(&quot;accept-language&quot;, &quot;ru-RU,ru;q=0.9&quot;)
WinHTTP.SetRequestHeader(&quot;referer&quot;, url)
WinHTTP.SetRequestHeader(&quot;Cookie&quot;, &quot;; &quot;)
WinHTTP.Send()
WinHTTP.WaitForResponse()
ResponseText := WinHTTP.ResponseText
msgbox %ResponseText%</code></pre></div>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2025-03-05T17:30:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=162043#p162043</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выполнение javasсript через АХК]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=120838#p120838" />
			<content type="html"><![CDATA[<p>Спасибо за помощь, жаль что я в этом плохо разбираюсь, надеюсь как не будь найду способ как применить это для своих целей)</p>]]></content>
			<author>
				<name><![CDATA[anerevandrey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34113</uri>
			</author>
			<updated>2017-11-05T18:03:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=120838#p120838</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выполнение javasсript через АХК]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=120709#p120709" />
			<content type="html"><![CDATA[<p>А я и не знал раньше. У меня немного по-другому получилось:<br /></p><div class="codebox"><pre><code>#Persistent
oHttp := ComObjCreate(&quot;WinHttp.WinHttpRequest.5.1&quot;)
oHttp.Open(&quot;GET&quot;, &quot;https://code.jquery.com/jquery-3.2.1.min.js&quot;)
oHttp.Send()
jQuery := oHttp.responseText
oHttp := &quot;&quot;

wb := ComObjCreate(&quot;InternetExplorer.Application&quot;)
OnExit( Func(&quot;Exit&quot;).Bind(wb) )
wb.Visible := true

wb.Navigate(&quot;http://forum.script-coding.com/index.php&quot;)
Loop
   Sleep, 200
until !(wb.ReadyState != 4 || wb.Busy || wb.document.readyState != &quot;Complete&quot;)

S := ObjBindMethod(wb.document.parentWindow, &quot;execScript&quot;)
S.(JQuery)
S.(&quot;$(&#039;body&#039;).css(&#039;background-color&#039;, &#039;#144D80&#039;)&quot;)
S.(&quot;$(&#039;.gen-content&#039;).css(&#039;background-color&#039;, &#039;#FF7C40&#039;)&quot;)
S.(&quot;$(&#039;#brd-title&#039;).children().before(&#039;&lt;img src=&quot;&quot;https://api.jquery.com/favicon.ico&quot;&quot; height=&quot;&quot;22&quot;&quot; width=&quot;&quot;22&quot;&quot;&gt;&#039;)&quot;)
S.(&quot;$(&#039;#brd-title&#039;).children().text(&#039;  jQuery&#039;).css(&#039;color&#039;, &#039;#043D70&#039;)&quot;)
S.(&quot;$(&#039;#brd-title&#039;).next().remove()&quot;)
Return

Exit(ie)  {
   try ie.Quit()
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-11-03T05:39:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=120709#p120709</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выполнение javasсript через АХК]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=120705#p120705" />
			<content type="html"><![CDATA[<p>Почему же не поверим?<br />Я уже постил тут код выполнения джаваскрипта.<br /></p><div class="codebox"><pre><code>IID := &quot;{332C4427-26CB-11D0-B483-00C04FD90119}&quot;   ;// IID_IHTMLWindow2
 
oIE := ComObjCreate(&quot;InternetExplorer.Application&quot;)
oIE.navigate(&quot;http://help.dottoro.com/external/examples/ljwcseaq/onmousedown_4.htm&quot;)
oIE.visible := True, oIEHWND := oIE.HWND
WinMaximize ahk_id %oIEHWND%
While oIE.readyState != 4 || oIE.document.readyState != &quot;complete&quot; || oIE.busy
   Sleep, 10
 
window := ComObj(9,ComObjQuery(oIE,IID,IID),1)
 
window.OnButtonDown(button := oIE.document.getElementById(&quot;testButton&quot;))
sleep 200
window.OnButtonUp()</code></pre></div><p>Алгоритм такой же.<br />Пример с оф.форума:<br /></p><div class="codebox"><pre><code>; Set Vars
IID := &quot;{332C4427-26CB-11D0-B483-00C04FD90119}&quot;   ;// IID_IHTMLWindow2
Windows := ComObjCreate(&quot;Shell.Application&quot;).Windows()
ieCount := Windows.Count

; Launch IE
Run, iExplore.exe, , , pid
WinWait ahk_pid %pid%
WinGet, hwnd, ID, ahk_pid %pid%

; Wait for IE to get added to the Shell.Application.Windows collection
while ieCount = Windows.Count
    sleep 10

; Get IE
for ie in Windows
    if (ie.hwnd = hwnd)
        Break
    else
        ie := &quot;&quot;
if Not ie {
    MsgBox Error
    return
}

; Wait for IE to load
while ie.busy
    sleep 100

; Insert jQuery
jQscript := ie.document.createElement(&quot;script&quot;)
jQscript.src := &quot;https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js&quot;
ie.document.documentElement.appendChild(jQscript)

; Get Window object with proper permissions
window := ComObject(9,ComObjQuery(ie,IID,IID),1)

; Get jQuery body object
try body := window.eval(&quot;$(&#039;body&#039;)&quot;)
catch ; use execScript when eval (IE11+) fails
	body := window.execScript(&quot;$(&#039;body&#039;)&quot;)

; Call some jQuery
body.css(&quot;border&quot;, &quot;4px solid red&quot;)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-11-02T22:18:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=120705#p120705</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выполнение javasсript через АХК]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=120697#p120697" />
			<content type="html"><![CDATA[<p>Хотел ответить, что невозможно никак, однако всё же решил сначала попробовать. Оказалось — не поверите — можно запустить код на jQuery через AHK!!! Предлагаю желающим попытаться сначала самостоятельно.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-11-02T17:44:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=120697#p120697</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Выполнение javasсript через АХК]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=120693#p120693" />
			<content type="html"><![CDATA[<p>Доброго времени суток у меня возникла проблема есть javascript рабочий уже проверенно, но не знаю как его выполнить в Explorer через АХК прошу помочь, заранее благодарен.<br /></p><div class="codebox"><pre><code>ie := ComObjCreate(&quot;InternetExplorer.Application&quot;)
ie.Visible := true
ie.Navigate(&quot;URL&quot;)
	while ie.readystate &lt;&gt; 4
	continue</code></pre></div><div class="codebox"><pre><code>javascript:$(&quot;.like&quot;).each(function(){ $(this).click() });</code></pre></div>]]></content>
			<author>
				<name><![CDATA[anerevandrey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34113</uri>
			</author>
			<updated>2017-11-02T15:44:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=120693#p120693</id>
		</entry>
</feed>
