<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=13904</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13904&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)».]]></description>
		<lastBuildDate>Fri, 04 Dec 2020 16:57:43 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=143901#p143901</link>
			<description><![CDATA[<p>У вас сложности на ровном месте.<br /></p><div class="codebox"><pre><code>mail := &quot;mailmailmailmail@gmail.com&quot;
pass := &quot;passpasspasspasspasspass&quot;


HTTP := ComObjCreate(&quot;WinHTTP.WinHTTPRequest.5.1&quot;)
HTTP.Open(&quot;POST&quot;, &quot;https://archive.org/account/login&quot;, true)
HTTP.SetRequestHeader(&quot;User-Agent&quot;, &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36&quot;)
HTTP.SetRequestHeader(&quot;Pragma&quot;, &quot;no-cache&quot;)
HTTP.SetRequestHeader(&quot;Cache-Control&quot;, &quot;no-cache, no-store&quot;)
HTTP.SetRequestHeader(&quot;If-Modified-Since&quot;, &quot;Sat, 1 Jan 2000 00:00:00 GMT&quot;)
HTTP.SetRequestHeader(&quot;content-type&quot;, &quot;application/x-www-form-urlencoded&quot;)
HTTP.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.9&quot;)
HTTP.SetRequestHeader(&quot;origin&quot;, &quot;https://archive.org&quot;)
HTTP.SetRequestHeader(&quot;referer&quot;, &quot;https://archive.org/account/login&quot;)
HTTP.SetRequestHeader(&quot;sec-fetch-dest&quot;, &quot;document&quot;)
HTTP.SetRequestHeader(&quot;sec-fetch-mode&quot;, &quot;navigate&quot;)
HTTP.SetRequestHeader(&quot;sec-fetch-site&quot;, &quot;same-origin&quot;)
HTTP.SetRequestHeader(&quot;sec-fetch-user&quot;, &quot;?1&quot;)
HTTP.SetRequestHeader(&quot;upgrade-insecure-requests&quot;, &quot;1&quot;)
HTTP.SetRequestHeader(&quot;cookie&quot;, &quot;test-cookie=1&quot;)
HTTP.Send(&quot;login=true&amp;username=&quot; URIEncode(email) &quot;&amp;password=&quot; URIEncode(password) &quot;&amp;referer=https%3A%2F%2Farchive.org%2F&amp;submit-to-login=Log+in&quot;)
HTTP.WaitForResponse()
msgbox % clipboard := HTTP.ResponseText



URIEncode(str, encoding := &quot;UTF-8&quot;)
{
   VarSetCapacity(var, StrPut(str, encoding))
   StrPut(str, &amp;var, encoding)
   While code := NumGet(Var, A_Index - 1, &quot;UChar&quot;)
   {
      bool := (code &gt; 0x7F || code &lt; 0x30 || code = 0x3D)
      UrlStr .= bool ? &quot;%&quot; . Format(&quot;{:02X}&quot;, code) : Chr(code)
   }
   Return UrlStr
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 04 Dec 2020 16:57:43 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=143901#p143901</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=143900#p143900</link>
			<description><![CDATA[<p><strong>wladkokopops</strong><br />Надо бы на archive.org. Вот вроде воспроизвел все, но не работает:<br /></p><div class="codebox"><pre><code>mail := &quot;mailmailmailmail@gmail.com&quot;
pass := &quot;passpasspasspasspasspass&quot;

   GoSub, Boundary
   GoSub, login

Boundary:


Boundary := RandomBoundary()
data =
(
-----------------------------%Boundary%
Content-Disposition: form-data; name=&quot;username&quot;

%mail%
-----------------------------%Boundary%
Content-Disposition: form-data; name=&quot;password&quot;

%pass%
-----------------------------%Boundary%
Content-Disposition: form-data; name=&quot;remember&quot;

true
-----------------------------%Boundary%
Content-Disposition: form-data; name=&quot;referer&quot;

https://archive.org/details/%page_code%
-----------------------------%Boundary%
Content-Disposition: form-data; name=&quot;login&quot;

true
-----------------------------%Boundary%
Content-Disposition: form-data; name=&quot;submit_by_js&quot;

true
-----------------------------%Boundary%--

)
return

login:
HTTP := ComObjCreate(&quot;WinHTTP.WinHTTPRequest.5.1&quot;)
HTTP.Open(&quot;POST&quot;, &quot;https://archive.org/account/login&quot;, true)
HTTP.SetRequestHeader(&quot;User-Agent&quot;, User_Agent)
HTTP.SetRequestHeader(&quot;Cookie&quot;, &quot;test-cookie=1&quot;)
HTTP.SetRequestHeader(&quot;Accept&quot;, &quot;*/*&quot;)
HTTP.SetRequestHeader(&quot;Connection&quot;, &quot;Keep-Alive&quot;)
HTTP.SetRequestHeader(&quot;DNT&quot;, &quot;1&quot;)
HTTP.SetRequestHeader(&quot;Host&quot;, &quot;archive.org&quot;)
HTTP.SetRequestHeader(&quot;Accept-Language&quot;, &quot;ru-RU&quot;)
HTTP.SetRequestHeader(&quot;Referer&quot;, &quot;https://archive.org/account/login&quot;)
HTTP.SetRequestHeader(&quot;Accept-Encoding&quot;, &quot;gzip, deflate&quot;)
HTTP.SetRequestHeader(&quot;Pragma&quot;, &quot;no-cache&quot;)
HTTP.SetRequestHeader(&quot;Cache-Control&quot;, &quot;no-cache&quot;)
HTTP.SetRequestHeader(&quot;If-Modified-Since&quot;, &quot;Sat, 1 Jan 2000 00:00:00 GMT&quot;)
HTTP.SetRequestHeader(&quot;Content-Type&quot;, &quot;multipart/form-data; boundary=---------------------------&quot; Boundary)
HTTP.Send(data)
HTTP.WaitForResponse()
Return

RandomBoundary()
{
   str := &quot;0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z&quot;
   Sort, str, D| Random
   str := StrReplace(str, &quot;|&quot;)
   Return SubStr(str, 1, 14)
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Fri, 04 Dec 2020 16:00:58 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=143900#p143900</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=143898#p143898</link>
			<description><![CDATA[<p>Прочитал все 42 сбщ, и не понял, мы куда сейчас авторизуемся?<br />Могу помочь с примерами.</p>]]></description>
			<author><![CDATA[null@example.com (wladkokopops)]]></author>
			<pubDate>Fri, 04 Dec 2020 13:56:45 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=143898#p143898</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=143894#p143894</link>
			<description><![CDATA[<p>Без понятия.<br />Надо смотреть по ситуации.<br />Я IE куки использовал (копировал в winhttprequest) только для обхода обновленной защиты клаудфларе.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 04 Dec 2020 09:20:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=143894#p143894</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=143891#p143891</link>
			<description><![CDATA[<p>Проверка нужна именно на картинке. Это я пытаюсь скачать картинку с архив.орг через куки в IE.</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Fri, 04 Dec 2020 08:49:52 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=143891#p143891</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=143882#p143882</link>
			<description><![CDATA[<p>А что мешает самому это проверить?<br />Залогиньтесь на каком-нибудь сайте в IE, после чего откройте его через скрипт и посмотрите залогинены или нет.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 04 Dec 2020 05:31:50 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=143882#p143882</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=143878#p143878</link>
			<description><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>А Msxml2.XMLHTTP вообще использует куки с IE.</p></blockquote></div><p>Как использовать &quot;Msxml2.XMLHTTP&quot; при скачивании изображений? Вот такой фрагмент кода должен подхватывать куки из IE? —<br /></p><div class="codebox"><pre><code>
   HTTP := ComObjCreate(&quot;Msxml2.XMLHTTP.6.0&quot;)
   HTTP.Open(&quot;GET&quot;, URL, 0)
   HTTP.SetRequestHeader(&quot;User-Agent&quot;, User_Agent)
   HTTP.SetRequestHeader(&quot;Pragma&quot;, &quot;no-cache&quot;)
   HTTP.SetRequestHeader(&quot;If-Modified-Since&quot;, &quot;Sat, 1 Jan 2000 00:00:00 GMT&quot;)
   HTTP.Send()
   ;HTTP.WaitForResponse()
   Body := HTTP.ResponseBody
   pData := NumGet(ComObjValue(Body), A_PtrSize = 8? 16:12, &quot;ptr&quot;)
   File := FileOpen(A_ScriptDir &quot;\&quot; a_now &quot;.jpg&quot;, &quot;w&quot;)
   File.RawWrite(pData + 0, Body.MaxIndex() + 1)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Thu, 03 Dec 2020 21:14:45 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=143878#p143878</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=138063#p138063</link>
			<description><![CDATA[<p>Не получалось, потому что я <a href="https://vivaldi.dspl.ru/bx0001746/page/21/image/24/base64">ссылку</a> как обычно через браузер открывал, видел ошибку и думал, что через скрипт будет то же самое).</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Wed, 26 Feb 2020 16:09:57 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=138063#p138063</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=138062#p138062</link>
			<description><![CDATA[<p>Кстати, там есть сложность узнать точный размер картинки, потому что если вписывать любой — будут искажения в сравнении с размером того изо, которое можно открыть во вкладке браузера. Для этой книги по <a href="https://vivaldi.dspl.ru/bx0001746/page/sizes">ссылке</a> даны размеры, и если вписать значение &quot;Width&quot; до точки — то оно начинает примерно соответствовать реальному.</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Wed, 26 Feb 2020 15:50:02 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=138062#p138062</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=138061#p138061</link>
			<description><![CDATA[<p>Ага, точно.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Wed, 26 Feb 2020 15:01:00 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=138061#p138061</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=138060#p138060</link>
			<description><![CDATA[<p>Заменить&nbsp; 24 в https://vivaldi.dspl.ru/bx0001746/page/21/image/<strong>24</strong>/base64<br />на 96+- и будет нормальное. Джаваскрипт уменьшает.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 26 Feb 2020 14:58:43 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=138060#p138060</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=138059#p138059</link>
			<description><![CDATA[<div class="codebox"><pre><code>WinHTTP := ComObjCreate(&quot;Msxml2.XMLHTTP.6.0&quot;)

url := &quot;https://vivaldi.dspl.ru/bx0001746/page/21/image/24/base64&quot;
WinHTTP.Open(&quot;GET&quot;, url, 0)
WinHTTP.SetRequestHeader(&quot;X-Requested-With&quot;, &quot;XMLHttpRequest&quot;)
WinHTTP.Send()
base64 := WinHTTP.ResponseText

length := CryptStringToBinary(base64, data)

pToken := GdipStartup()
pBitmap := GetBitmapFromData(&amp;data, length, hBitmap)
VarSetCapacity(data, 0)
GdipGetImageDimensions(pBitmap, Width, Height)
DllCall(&quot;gdiplus\GdipDisposeImage&quot;, Ptr, pBitmap)
GdipShutdown(pToken)

Gui, -DPIScale +LastFound
Gui, Margin, 0, 0
Gui, Add, Pic, w%Width% h%Height%, HBITMAP:%hBitmap%
Gui, Show

DllCall(&quot;DeleteObject&quot;, Ptr, hBitmap)
Return

GuiClose:
   ExitApp

CryptStringToBinary(string, ByRef outData, formatName := &quot;CRYPT_STRING_BASE64&quot;)
{
   static formats := { CRYPT_STRING_BASE64: 0x1
                     , CRYPT_STRING_HEX:    0x4
                     , CRYPT_STRING_HEXRAW: 0xC }
   fmt := formats[formatName]
   DllCall( &quot;Crypt32\CryptStringToBinary&quot;, &quot;Ptr&quot;, &amp;string, &quot;UInt&quot;, StrLen(string), &quot;UInt&quot;, fmt
                                         , &quot;UInt&quot;, 0, &quot;UIntP&quot;, bytes, &quot;UIntP&quot;, 0, &quot;UIntP&quot;, 0 )
   VarSetCapacity(outData, bytes) 
   DllCall( &quot;Crypt32\CryptStringToBinary&quot;, &quot;Ptr&quot;, &amp;string, &quot;UInt&quot;, StrLen(string), &quot;UInt&quot;, fmt
                                         , &quot;Str&quot;, outData, &quot;UIntP&quot;, bytes, &quot;UIntP&quot;, 0, &quot;UIntP&quot;, 0 )
   Return bytes
}

GetBitmapFromData(pData, nSize, ByRef hBitmap)
{
   pIStream := DllCall(&quot;Shlwapi\SHCreateMemStream&quot;, &quot;Ptr&quot;, pData, &quot;UInt&quot;, nSize, &quot;Ptr&quot;)

   DllCall(&quot;gdiplus\GdipCreateBitmapFromStream&quot;, &quot;Ptr&quot;, pIStream, &quot;PtrP&quot;, pBitmap)
   ObjRelease(pIStream)

   DllCall(&quot;gdiplus\GdipCreateHBITMAPFromBitmap&quot;, &quot;Ptr&quot;, pBitmap, &quot;PtrP&quot;, hBitmap, &quot;UInt&quot;, 0xFFFFFFFF)
   Return pBitmap
}

GdipGetImageDimensions(pBitmap, ByRef Width, ByRef Height)
{
   DllCall(&quot;gdiplus\GdipGetImageWidth&quot;, &quot;Ptr&quot;, pBitmap, &quot;UIntP&quot;, Width)
   DllCall(&quot;gdiplus\GdipGetImageHeight&quot;, &quot;Ptr&quot;, pBitmap, &quot;UIntP&quot;, Height)
}

GdipStartup()
{
   if !DllCall(&quot;GetModuleHandle&quot;, &quot;Str&quot;, &quot;gdiplus&quot;, &quot;Ptr&quot;)
      DllCall(&quot;LoadLibrary&quot;, &quot;Str&quot;, &quot;gdiplus&quot;)
   VarSetCapacity(si, A_PtrSize = 8 ? 24 : 16, 0), si := Chr(1)
   DllCall(&quot;gdiplus\GdiplusStartup&quot;, &quot;PtrP&quot;, pToken, &quot;Ptr&quot;, &amp;si, &quot;Ptr&quot;, 0)
   return pToken
}

GdipShutdown(pToken)
{
   DllCall(&quot;gdiplus\GdiplusShutdown&quot;, &quot;Ptr&quot;, pToken)
   if hModule := DllCall(&quot;GetModuleHandle&quot;, &quot;Str&quot;, &quot;gdiplus&quot;, &quot;Ptr&quot;)
      DllCall(&quot;FreeLibrary&quot;, &quot;Ptr&quot;, hModule)
   return 0
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Wed, 26 Feb 2020 14:57:17 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=138059#p138059</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=138058#p138058</link>
			<description><![CDATA[<p>Это превьюшка.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Wed, 26 Feb 2020 14:53:14 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=138058#p138058</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=138057#p138057</link>
			<description><![CDATA[<p>А разве это ссылка на главную картинку?</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Wed, 26 Feb 2020 14:49:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=138057#p138057</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Логин на сайтах (в ЖЖ, Инстаграме и тд)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=138056#p138056</link>
			<description><![CDATA[<p>Можно и не отбрасывать, а генерировать и отправлять.<br />Это epoch time.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 26 Feb 2020 14:20:12 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=138056#p138056</guid>
		</item>
	</channel>
</rss>
