<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Регистрация на mos.ru]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=18155&amp;type=atom" />
	<updated>2024-04-03T14:21:16Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=18155</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Регистрация на mos.ru]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160742#p160742" />
			<content type="html"><![CDATA[<p><strong>inseption86</strong>, сначала исправляем <a href="https://forum.script-coding.com/viewtopic.php?pid=160732#p160732">ошибки</a>, потом пользуемся форумом дальше.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2024-04-03T14:21:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160742#p160742</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Регистрация на mos.ru]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=160741#p160741" />
			<content type="html"><![CDATA[<p>Добрый день! Не могу залогиниться на mos.ru (ошибка на последнем Location), делаю пошагово, согласно запросам браузера (через Fiddler), может кто-нить сталкивался?</p><br /><div class="codebox"><pre><code>
username := &quot;&quot;
Pass_name :=  &quot;&quot;

head_url := &quot;https://gisogd.mos.ru&quot;
reg_url := &quot;https://login.mos.ru&quot;

ComObjError(false)
HTTP := ComObjCreate(&quot;WinHTTP.WinHTTPRequest.5.1&quot;)
HTTP.Open(&quot;GET&quot;, head_url &quot;/home&quot;)
HTTP.Send()
if (HTTP.ResponseText = &quot;&quot;)
{
   MsgBox, 262208, , % &quot;&quot;&quot;&quot; head_url &quot;&quot;&quot;&quot; &quot; не доступен!!!&quot;
   ExitApp
}
ComObjError(true)


HTTP.Open(&quot;GET&quot;, head_url &quot;/isogd/oauth2/authorization/sudir&quot;)
HTTP.SetRequestHeader(&quot;User-Agent&quot;, &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36&quot;)
HTTP.Option(6) := False 
HTTP.Send()
HTTP.WaitForResponse()	

HTTP.Open(&quot;GET&quot;, HTTP.GetResponseHeader(&quot;Location&quot;))
HTTP.SetRequestHeader(&quot;Content-Type&quot;, &quot;text/html; charset=utf-8&quot;)
HTTP.SetRequestHeader(&quot;User-Agent&quot;, &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36&quot;)
HTTP.Send()
HTTP.WaitForResponse()	
location := HTTP.GetResponseHeader(&quot;Location&quot;)


HTTP.Open(&quot;GET&quot;, reg_url . HTTP.GetResponseHeader(&quot;Location&quot;))
HTTP.SetRequestHeader(&quot;Content-Type&quot;, &quot;text/html; charset=UTF-8&quot;)
HTTP.SetRequestHeader(&quot;User-Agent&quot;, &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36&quot;)
HTTP.Send()
HTTP.WaitForResponse()

RegExMatch(HTTP.ResponseText, &quot;name=&quot;&quot;proofOfWork&quot;&quot; value=&#039;(\S+)&#039;&quot;, match)
proofOfWork := match1

HTTP.Open(&quot;POST&quot;, reg_url . location)
HTTP.SetRequestHeader(&quot;User-Agent&quot;, &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36&quot;)
data_send := % &quot;proofOfWork=&quot; proofOfWork &quot;&amp;isDelayed=false&amp;login=&quot; . username &quot;&amp;password=&quot; . Pass_name &quot;&amp;bfp=1a0211a3dfc2e9dc1678ad3def923436&quot;
HTTP.Send(data_send)
HTTP.WaitForResponse()

MsgBox % HTTP.GetResponseHeader(&quot;Location&quot;)
;~ MsgBox % HTTP.ResponseText

ExitApp

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2024-04-03T13:42:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=160741#p160741</id>
		</entry>
</feed>
