Jump to content
Dhilip89

NetFlare Web Server (Version 0.3)

Recommended Posts

Dhilip89

Updated to version 0.2


[u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote]

Share this post


Link to post
Share on other sites
xzhat

Great work. How do you retrieve GET and POST data into the autoit-code?

Share this post


Link to post
Share on other sites
guinness

Very nice. Just had a quick browse over the code and it was very interesting to read. At first I thought I was stumped at how it worked as the code is spread out, but eventually I found the parsing function.


UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Share this post


Link to post
Share on other sites
Dhilip89

Great work. How do you retrieve GET and POST data into the autoit-code?

 

Thanks, starting from version 0.3 both GET and POST data is supported.


[u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote]

Share this post


Link to post
Share on other sites
Dhilip89

Very nice. Just had a quick browse over the code and it was very interesting to read. At first I thought I was stumped at how it worked as the code is spread out, but eventually I found the parsing function.

 

Thank you, it was my random idea then I made this to practice my rusted AutoIt coding skill  :oops:


[u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote]

Share this post


Link to post
Share on other sites
Dhilip89

Check out version 0.3

Added stress test animation (in GIF)

Edited by Dhilip89

[u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote]

Share this post


Link to post
Share on other sites
topten

Hi. Thank you very much for such a great UDF. For me it is magic :)

I wonder If I set the port to say

HttpServer_SetPort(8080)

Then I have to access to my local website from http://127.0.0.1:8080 address. The same would happen with external ips http.xx.xx.xx.xx:8080

How should I configure the port so that I could have a direct access to http://127.0.0.1?

Great thanx in advance!

Share this post


Link to post
Share on other sites
BrewManNH

 

How should I configure the port so that I could have a direct access to http://127.0.0.1?

Great thanx in advance!

Are you asking if you could connect to 127.0.0.1 from the internet? If you are, the answer is, you can't it is impossible. 127.0.0.1 is a local loopback address only.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
topten

BrewManNH

 I know that 127.0.0.1 is a localhost. The thing is- when I am trying to open the website localy - shows only blank page. If I set the port to 8080 then I get the access only if I navigate it this way: 127.0.0.1:8080 - then the web page opens normally. The same happens when I navigate it somewhere from internet. Say I would have an Ip something like 123.123.123.123 Then when I navigate it directly 123.123.123.123- nothing happens. But when I navigate it 123.123.123.123:8080 The website opens ok from Internet.

 

Share this post


Link to post
Share on other sites
BrewManNH

80 is the default HTTP port, so I would guess you'd set it to that instead of 8080.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
argumentum

 I know that 127.0.0.1 is a localhost. ... when I navigate it 123.123.123.123:8080 The website opens ok from Internet.

instead of 127.0.0.1, use 0.0.0.0 in your code, see if that helps.

Share this post


Link to post
Share on other sites
topten

Dear coders

I  really like this UDF, because it is opening really huge possibilities: We are not dependant on php and other "officialy" accepted scripts and languages for web.

Important thing, what about security? I mean, is it secure for injections and other things, which hackers use against websites?

Great thanx in advance

Share this post


Link to post
Share on other sites
argumentum

Dear coders

I  really like this UDF, because it is opening really huge possibilities: We are not dependant on php and other "officialy" accepted scripts and languages for web.

Important thing, what about security? I mean, is it secure for injections and other things, which hackers use against websites?

Great thanx in advance

I hope the IP change I suggested worked for your setup

As far as hackers ... I don't know how to say it. This script will not give you SSL, so, all you have is plain text , anyone logging packets can see the conversation between server and client. As far as SQL injections, that has to do with SQL

I run a web server written in autoit that I use as a log dumper of sorts. My programs send an encrypted string and I process that. If I was to write it now, I'd use an Apache server and PHP.

Play around, hack yourself your script and have fun learning everything you can about anything that can be done in that arena. I know of no other way.

exploits_of_a_mom.png

 

Edited by argumentum
added the pic.

Share this post


Link to post
Share on other sites
topten

Argumentum, thank you very much for your comment. The picture is quite descriptive :)

@IP 0.0.0.0 didnt work for me at least on my pc, but I am going to test in other pc to see the final result

@hacking etc. I would like to clearfy my question: Is the server secure for calculations which autoit is doing on the server? For example from the client side I send some post request  to server. The server receives it and then it makes some calculations on the side of autoit $a+$b=$c and many other autoit functions and then it sends to client ok, $c=2345. The question is: Can client interfere into those calculations which autoit is doing on the server. For example by navigating to website using some code like "www.website.com: msgbox (0, "", "hacked")" (I am using a pseudocode of course, but I think you get the idea)?

Great thanx in advance!

Share this post


Link to post
Share on other sites
argumentum

Argumentum, thank you very much for your comment. The picture is quite descriptive :)

@IP 0.0.0.0 didnt work for me at least on my pc, but I am going to test in other pc to see the final result

@hacking etc. I would like to clearfy my question: Is the server secure for calculations which autoit is doing on the server? For example from the client side I send some post request  to server. The server receives it and then it makes some calculations on the side of autoit $a+$b=$c and many other autoit functions and then it sends to client ok, $c=2345. The question is: Can client interfere into those calculations which autoit is doing on the server. For example by navigating to website using some code like "www.website.com: msgbox (0, "", "hacked")" (I am using a pseudocode of course, but I think you get the idea)?

Great thanx in advance!

the answer to A+B=C question is no. No one can run stuff on your PC that you don't code for, ..then again if you use something like $c = execute($a+$b) then you are coding with the possibility of malicious code run, now if you do like $c = Int($a) + Int($b) is known that can not bring harm. So getting hacked is relative to how you code and nothing more.

Share this post


Link to post
Share on other sites
Chimp

...From a quick glance to the source, it seems that the autoit code embedded in the web page is executed on the server one line at a time. See the Aup_Execute() function within the Lib\WebAupProcessor.au3 script. Don't know if this is a good way to embed code within the source web page . Maybe it would be better to be able to execute entire snippets instead of single lines at a time. Executing only single lines of code will limit your programming possibilities.
You will be bound not to use constructs like "for ... next" for example, and other similar restrictions.
Have also a look to this other embrional example on how to embed AutoIt code in web pages and execute it on the server using this other Web Server

Edited by Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites
topten

Thanx Argumentum!

Thanx Chimp!

Share this post


Link to post
Share on other sites
argumentum

tell you what. Try some this. a php file 

<?php
    foreach($_SERVER as $key => $value) {
    //putenv('php_SERVER__'.$key.'='. bin2hex($value) );
        if(strpos($key, 'HTTP') === 0) {
            putenv('php_SERVER__'.$key.'='. bin2hex($value) ); // or just these
        }
    }
    foreach($_POST as $key => $value) {
        putenv('php_POST__'.$key.'='. bin2hex($value) );
    }
    foreach($_GET as $key => $value) {
        putenv('php_GET__'.$key.'='. bin2hex($value) );
    }
    foreach($_COOKIE as $key => $value) {
        putenv('php_COOKIE__'.$key.'='. bin2hex($value) );
    }
    $time_start = microtime(true);
    passthru('C:\xampp\cgi-bin\test1.exe');
    $time_end = microtime(true);
    print "<b>PHP Execution Time:</b> ". number_format(($time_end - $time_start) * 1000) ." mSec.<br>\r\n" ;
?>

and a CUI compiled AutoIt, like:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Change2CUI=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <WinAPI.au3>
#include <WinAPIMisc.au3>

Local $t = TimerInit()

ConsoleWrite("<b>AutoIt Macros:</b><br>" & @CRLF)
fShowAvailableMacros()

ConsoleWrite("<br><b>Environment Strings:</b><br>" & @CRLF)
_WinApi_GetEnvironmentStringsA()

ConsoleWrite('<br>AutoIt Execution Time: ' & Round(TimerDiff($t)) & ' mSec.<br>' & @CRLF)

Func fShowAvailableMacros()
    Local $aMacros[111 - 6] = [110 - 6, _
            "@AppDataCommonDir", _
            "@AppDataDir", _
            "@AutoItExe", _
            "@AutoItPID", _
            "@AutoItVersion", _
            "@AutoItX64", _
            "@COM_EventObj", _
            "@CommonFilesDir", _
            "@Compiled", _
            "@ComputerName", _
            "@ComSpec", _
            "@CPUArch", _
            "@DesktopCommonDir", _
            "@DesktopDepth", _
            "@DesktopDir", _
            "@DesktopHeight", _
            "@DesktopRefresh", _
            "@DesktopWidth", _
            "@DocumentsCommonDir", _
            "@error", _
            "@exitCode", _
            "@exitMethod", _
            "@extended", _
            "@FavoritesCommonDir", _
            "@FavoritesDir", _
            "@GUI_CtrlHandle", _
            "@GUI_CtrlId", _
            "@GUI_DragFile", _
            "@GUI_DragId", _
            "@GUI_DropId", _
            "@GUI_WinHandle", _
            "@HomeDrive", _
            "@HomePath", _
            "@HomeDrive.", _
            "@HomeShare", _
            "@HotKeyPressed", _
            "@HOUR", _
            "@IPAddress1", _
            "@IPAddress2", _
            "@IPAddress3", _
            "@IPAddress4", _
            "@KBLayout", _
            "@LocalAppDataDir", _
            "@LogonDNSDomain", _
            "@LogonDomain", _
            "@LogonServer", _
            "@MDAY", _
            "@MIN", _
            "@MON", _
            "@MSEC", _
            "@MUILang", _
            "@MyDocumentsDir", _
            "@NumParams", _
            "@OSArch", _
            "@OSBuild", _
            "@OSLang", _
            "@OSServicePack", _
            "@OSType", _
            "@OSVersion", _
            "@ProgramFilesDir", _
            "@ProgramsCommonDir", _
            "@ProgramsDir", _
            "@ScriptDir", _
            "@ScriptFullPath", _
            "@ScriptDir", _
            "@ScriptName", _
            "@ScriptLineNumber", _
            "@ScriptName", _
            "@SEC", _
            "@StartMenuCommonDir", _
            "@StartMenuDir", _
            "@StartupCommonDir", _
            "@StartupDir", _
            "@SW_DISABLE", _
            "@SW_ENABLE", _
            "@SW_HIDE", _
            "@SW_LOCK", _
            "@SW_MAXIMIZE", _
            "@SW_MINIMIZE", _
            "@SW_RESTORE", _
            "@SW_SHOW", _
            "@SW_SHOWDEFAULT", _
            "@SW_SHOWMAXIMIZED", _
            "@SW_SHOWMINIMIZED", _
            "@SW_SHOWMINNOACTIVE", _
            "@SW_SHOWMINIMIZED,", _
            "@SW_SHOWNA", _
            "@SW_SHOW,", _
            "@SW_SHOWNOACTIVATE", _
            "@SW_SHOWNORMAL,", _
            "@SW_SHOWNORMAL", _
            "@SW_UNLOCK", _
            "@SystemDir", _
            "@TempDir", _
            "@TRAY_ID", _
            "@TrayIconFlashing", _
            "@TrayIconVisible", _
            "@UserName", _
            "@UserProfileDir", _
            "@WDAY", _
            "@WindowsDir", _
            "@WorkingDir", _
            "@YDAY", _
            "@YEAR"]

    For $n = 1 To 5 ; $aMacros[0]
        ConsoleWrite($aMacros[$n] & '&nbsp;=&nbsp;&gt;' & Execute($aMacros[$n]) & '&lt;<BR>' & @CRLF)
    Next
    ConsoleWrite('.. etc.<BR>' & @CRLF)
EndFunc   ;==>fShowAvailableMacros

Func _WinApi_GetEnvironmentStringsA() ; https://msdn.microsoft.com/en-us/library/windows/desktop/ms683187(v=vs.85).aspx
    ; https://www.autoitscript.com/forum/topic/178400-windows-environment-variables-viewer/
    Local $pEnvBlock, $iPtrStringLen, $tEnvString, $aSplit, $aRet, $sEnvString, $aEnvString[0][2]
    $aRet = DllCall('kernel32.dll', 'ptr', 'GetEnvironmentStringsA') ; GetEnvironmentStringsA returns OEM characters.
    If @error Then Return SetError(@error, @extended, '')
    $pEnvBlock = $aRet[0] ; pointer to a block of memory that contains the environment variables.
    If Not IsPtr($pEnvBlock) Then Return SetError(-1, 0, '')
    While 1
        $iPtrStringLen = _WinAPI_StringLenA($pEnvBlock)
        If $iPtrStringLen > 0 Then
            $tEnvString = DllStructCreate('char[' & $iPtrStringLen + 1 & ']', $pEnvBlock)
            $sEnvString = _WinAPI_OemToChar(DllStructGetData($tEnvString, 1)) ; Convert Oem to Ansi.
            If StringLeft($sEnvString, 1) <> '=' Then
                $aSplit = StringSplit($sEnvString, '=', 1 + 2)
                If Not @error Then
                    ReDim $aEnvString[UBound($aEnvString) + 1][2]
                    $aEnvString[UBound($aEnvString) - 1][0] = $aSplit[0] ; name
                    $aEnvString[UBound($aEnvString) - 1][1] = $aSplit[1] ; value
                    If StringInStr( $aSplit[0] , "php_") == 1 Then
                        ConsoleWrite($aSplit[0] & '&nbsp;=&nbsp;&gt;' & BinaryToString('0x'&$aSplit[1]) & '&lt;<BR>' & @CRLF) ; <----- added just to show the PHP thing
                    Else
                        ;ConsoleWrite($aSplit[0] & ' = ' & $aSplit[1] & '<BR>' & @CRLF) ; <----- added just to show the PHP thing
                    EndIf
                EndIf
            EndIf
            $pEnvBlock += $iPtrStringLen + 1
        Else
            _WinApi_FreeEnvironmentStringsA($pEnvBlock) ; Free memory block.
            $tEnvString = 0
            Return SetError(0, 0, $aEnvString)
        EndIf
    WEnd
EndFunc   ;==>_WinApi_GetEnvironmentStringsA

Func _WinApi_FreeEnvironmentStringsA($pEnv) ; https://msdn.microsoft.com/en-us/library/windows/desktop/ms683151(v=vs.85).aspx
    Local $aRet = DllCall('kernel32.dll', 'int', 'FreeEnvironmentStringsA', 'ptr', $pEnv)
    If Not @error And $aRet[1] <> 0 Then Return SetError(0, @extended, $aRet[1])
    Return SetError(@error, 0, 0)
EndFunc   ;==>_WinApi_FreeEnvironmentStringsA

and see if that's good for you. It worked just fine on my PC and I can have SSL from whatever Apache uses for SSL

Edit: tweaked the code to have the server pass info. that you'll use in your script via environment variables, so you can do:
http://localhost/test1.php?val1=this1&val2=this Other Thing
as GET or make a form and use POST
 

Edited by argumentum
tweaked the code

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • BogdanNicolescu
      By BogdanNicolescu
      While 1 / / / A whole bunch of codes found in help and here: https://www.autoitscript.com/autoit3/docs/ / / / WEnd OR:

       
      HotKeySet("{ESC}", "Terminate") While 1 MouseClick("Right",674,422) MouseClick("Left",673,447) Sleep(2000) / / / A whole bunch of codes found in help and here: https://www.autoitscript.com/autoit3/docs/ / / / MouseClick("Left",675,339) SLeep(3000) WEnd Func Terminate()     Exit 0 EndFunc  
      Sorry if i should't let this here to be found by newbies like me -.-'
    • Seminko
      By Seminko
      I'm trying to get data from http://poe.trade/ - disclaimer, although this site is about a game, my script will not in any way interact directly with the game in any way. The script is just to get data from the site.
      To explain how it works - you submit a POST request and a custom URL is returned, then you do a GET request on that URL and you get the final URL you want.
       
      First issue:
      Now, I've tried doing so by using https://apitester.com/ and the first phase works. Here's how it looks like at APITester:
      Request Headers POST /search HTTP/1.1 Host: poe.trade Accept: */* User-Agent: Rigor API Tester Content-Length: 43 Content-Type: application/x-www-form-urlencoded Request Body online=x&name=kaom%27s%20heart&league=incursion When I submit this, the response I get is this:
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>Redirecting...</title> <h1>Redirecting...</h1> <p>You should be redirected automatically to target URL: <a href="http://poe.trade/search/ioritewoteteme">http://poe.trade/search/ioritewoteteme</a>. If not click the link. So I then do a GET request for 'http://poe.trade/search/ioritewoteteme', which results in this response:
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>Redirecting...</title> <h1>Redirecting...</h1> <p>You should be redirected automatically to target URL: <a href="http://poe.trade/search/inamotezuakito">http://poe.trade/search/inamotezuakito</a>. If not click the link. Great, this link (http://poe.trade/search/inamotezuakito) is exactly what we want.
      However, when I try to do the same in autoit, the result is quite different:
      Global Const $HTTP_STATUS_OK = 200 $test = HttpPost("http://poe.trade/search", "/online=x&name=kaom%27s%20heart&league=incursion") ClipPut($test) MsgBox(1, "", $test) Func HttpPost($sURL, $sData = "") Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") $oHTTP.Open("POST", $sURL, False) If (@error) Then Return SetError(1, 0, 0) $oHTTP.SetRequestHeader("Host", "poe.trade") $oHTTP.SetRequestHeader("User-Agent", "Rigor API Tester") $oHTTP.SetRequestHeader("Accept", "*/*") $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send($sData) If (@error) Then Return SetError(2, 0, 0) If ($oHTTP.Status <> $HTTP_STATUS_OK) Then Return SetError(3, 0, 0) Return SetError(0, 0, $oHTTP.ResponseText) EndFunc The code above returns: ' 謟 '
      Any ideas as to what I am doing incorrectly?
       
      Second issue:
      Once I get the final link using APITester and do a GET on that i get a bunch of hieroglyphs. A friend of mine advised that the data is GZiped, which is a pain in the butt to be honest. However, apparently curl can uncompres that.
      How would I go about it?
       
      Thanks
    • Spartan117
      By Spartan117
      Hi everyone,
      I wonder if there is a cloud service that can offer a physical server so that AutoIT can turn as it is in a physical machine.
      Thank you
    • nacerbaaziz
      By nacerbaaziz
      Hello all
      I found this function in the Internet
      It is to play audio files from  the compiled script
      I did not understand just one thing on this function
      func play($name, $wait = 0) local Const $SND_RESOURCE = 0x00040004 local Const $SND_ASYNC = 1 ; Play the file - the script will pause as it sounds if $wait = 0 then DllCall("winmm.dll", "int", "PlaySound", "str", $name, "hwnd", 0, "int", BitOR($SND_RESOURCE, $SND_ASYNC)) else DllCall("winmm.dll", "int", "PlaySound", "str", $name, "hwnd", 0, "int", $SND_RESOURCE) endIf return 1 endFunc What I did not understand was this variable
      local Const $SND_RESOURCE = 0x00040004 I know that this variable is contains the resource name
      But what if I want to change the name of the resource what i'll do?
      can i do that?
      Thanks in advance
       
    • krasnoshtan
      By krasnoshtan
      Hello forum users!
      At some point I had a need to restart my script. Is it possible to do this with autoit or do I need to connect additional scripts like .cmd or .bat?
      For example: i have only script.au3 and it's running. Wich code shoud i use to exit from the script and start it again?
×