VodkaDiva Posted January 9, 2021 Share Posted January 9, 2021 Hi everybody . I am working to change the ip of the 911. API 911 tells me to call a piece of software and it returns a message. But I don't know how to take it. My English is not good so I have not found a solution yet. The problem of retrieving the message, and retrieving the hwnd of the software calling 911. Thank you . 911 API say here: With using -hwnd= parameter, Autoproxytool.exe will send WM_COPYDATA message to your soft which launches Autoproxytool.exe, so that your soft is able to get postcheck and more info of the proxy, you also need to pass the Window Handle of your soft which launches Autoproxytool.exe and Autoproxytool.exe will send you WM_COPYDATA message with the following format and info: 1. if the proxy successful get by api: success|ip|Ping|ProxyCountry|ProxyState|ProxyCity|911s5 account balance 2. if the proxy failed to get by api: failed|reason for failure Some examples of how to use it:Autoproxytool.exe -changeproxy/US -zip=92626 -proxyport=5000 -hwnd=YOUR SOFT'S WINDOW HANDLE Thank you for reading. xxxxxxxxxxx Link to comment Share on other sites More sharing options...
Nine Posted January 9, 2021 Share Posted January 9, 2021 I made an IPC based on that message (WM_COPYDATA). You can refer to the code in my signature. It is not very complicated. You will need to create a GUI (showed or hidden as you wish), pass its handle to your tool as you described, and register the WM_COPYDATA message. You should get message with the appropriate format into the string part of the message. Refer mostly to the client part of the UDF to create your own project. Put something together and come back with your code if you need help... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
VodkaDiva Posted January 9, 2021 Author Share Posted January 9, 2021 1 hour ago, Nine said: I made an IPC based on that message (WM_COPYDATA). You can refer to the code in my signature. It is not very complicated. You will need to create a GUI (showed or hidden as you wish), pass its handle to your tool as you described, and register the WM_COPYDATA message. You should get message with the appropriate format into the string part of the message. Refer mostly to the client part of the UDF to create your own project. Put something together and come back with your code if you need help... Hi Nine . Thank you so much . i have read A simple fast IPC based on Windows Messaging . But when i code it notworking . my code when change . Global $hWnd = WinGetHandle("[title:Ver 1.0]") ; Get my gui hwnd and i have change $WCD_SERVER_WINDOW_NAME = "AutoProxyTool" to get hwnd of 911 $_WCD_Verbose = True ; as for the server, you can decide to make client verbose or not Global $hWndServer = _WCD_GetServerHandle () _WCD_Send($hWnd, $hWndServer, "ProxyAPI.exe -changeproxy / US -zip = 92626 -proxyport = 5000 -hwnd ="&$hWnd) ; Test 1 ;WCD_Send($hWnd, $hWndServer, "ProxyTool.exe -changeproxy / US -zip = 92626 -proxyport = 5000 -hwnd ="&$hWnd) ; Test 1 ;WCD_Send($hWnd, $hWndServer, "-changeproxy / US -zip = 92626 -proxyport = 5000 -hwnd ="&$hWnd) ; Test 1 Local $sString = WaitForResponse () ConsoleWrite ($sString & @CRLF) _WCD_Send($hWnd, $hWndServer, 2, "5") ; adding text to a more complex request $sString = WaitForResponse () ConsoleWrite ($sString & @CRLF) Thank you again for your help. Wish you a lucky day xxxxxxxxxxx Link to comment Share on other sites More sharing options...
VodkaDiva Posted January 9, 2021 Author Share Posted January 9, 2021 In the software's root folder, there's a sub folder: "proxytool" and there's a file "Autoproxytool.exe" in it Using your soft/script which want to implement the api to launch "Autoproxytool.exe" with the following parameters, then you are able to change proxy automatically: 😇😢😇 $WCD_SERVER_WINDOW_NAME = "AutoProxyTool" xxxxxxxxxxx Link to comment Share on other sites More sharing options...
Nine Posted January 9, 2021 Share Posted January 9, 2021 The WCD server is useless in your case. You only need the client part as I told you. Here, I put something up to help you out. Study it, put more error handling if required. It is untested. I cannot run it since I do not have that tool. So you will need to figure out the missing pieces... expandcollapse popup#include <WindowsConstants.au3> Global Const $tagCOPYDATA = "dword data;dword len;ptr str" Global Const $_WCD_LOGFILE = "WCD_Logfile.log" HotKeySet("{ESC}", _Exit) Global $_WCD_ClientResponse[3] Global $_WCD_Verbose = True Example() Func Example() Local $hWnd = _WCD_CreateClient("Test 911") Local $iPID = Run("Autoproxytool.exe -changeproxy/US -zip=92626 -proxyport=5000 -hwnd=" & $hWnd) If $_WCD_Verbose Then __WCD_Verbose("Run = " & @error & "/" & $iPID) Local $sString = WaitForResponse() ConsoleWrite($sString & @CRLF) While Sleep(100) WEnd EndFunc ;==>Example Func WaitForResponse() Local $sResp While Sleep(100) $sResp = _WCD_Client_GetResponse() If $sResp <> "" Then Return $sResp ConsoleWrite(".") WEnd EndFunc ;==>WaitForResponse Func _WCD_Client_GetResponse() If Not $_WCD_ClientResponse[0] Then Return "" $_WCD_ClientResponse[0] = False If $_WCD_Verbose Then __WCD_Verbose("Client Response cleared with data " & $_WCD_ClientResponse[1] & " and string " & $_WCD_ClientResponse[2]) Return SetExtended($_WCD_ClientResponse[1], $_WCD_ClientResponse[2]) EndFunc ;==>_WCD_Client_GetResponse Func _WCD_CreateClient($sWindowTitle = "") If $_WCD_Verbose Then __WCD_Verbose("-------------- Client initiated --------------") Local $hWCD = GUICreate($sWindowTitle) If $_WCD_Verbose Then __WCD_Verbose("Client handle = " & $hWCD) GUIRegisterMsg($WM_COPYDATA, _WCD_WM_COPYDATA_CLIENT_HANDLER) Return $hWCD EndFunc ;==>_WCD_CreateClient Func _WCD_WM_COPYDATA_CLIENT_HANDLER($hWnd, $iMsg, $wParam, $lParam) Local $tData = DllStructCreate($tagCOPYDATA, $lParam), $sString = "" If $tData.len Then Local $tStr = DllStructCreate('char str[' & $tData.len - 1 & ']', $tData.str) $sString = $tStr.str EndIf $_WCD_ClientResponse[0] = True $_WCD_ClientResponse[1] = $tData.data $_WCD_ClientResponse[2] = $sString If $_WCD_Verbose Then __WCD_Verbose("Client Reception From " & $wParam & " To " & $hWnd & " with Data " & $tData.data & " and String " & $sString) Return 1 EndFunc ;==>_WCD_WM_COPYDATA_CLIENT_HANDLER Func __WCD_Verbose($sMessage) Local Const $sTime = "[" & @YEAR & "-" & @MON & "-" & @MDAY & " " & @HOUR & ":" & @MIN & ":" & @SEC & "] " FileWriteLine($_WCD_LOGFILE, $sTime & $sMessage) EndFunc ;==>__WCD_Verbose Func _Exit() Exit EndFunc ;==>_Exit “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
VodkaDiva Posted January 10, 2021 Author Share Posted January 10, 2021 Thank you very much. Although the command does not work, I have found a lighter alternative from your code. Thank you again. Good luck in your life and health. Love you xxxxxxxxxxx Link to comment Share on other sites More sharing options...
makemoneyonl Posted January 20, 2021 Share Posted January 20, 2021 (edited) I can help you get Proxy from ProxyList and TodayList. Country, State,City,IP, ISP (According to your needs). Not use mouse Edited January 20, 2021 by Melba23 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now