Jump to content

Chris86

Active Members
  • Posts

    181
  • Joined

  • Last visited

Everything posted by Chris86

  1. Hello, I'm in the making of a script that needs to post XML data through HTTPS to our ServiceDesk Plus MSP service. I'm running into trouble because I have never made any scripts using HTTP with POST and I cannot see what I'm doing wrong here. Can someone help me or should I find help somewhere else? $URLSDP="" ;REMOVED - cannot publish this. this is the HTTPS url to our ServiceDesk $TechnicianKey="" ;REMOVED $ID="" ; Request ID $sPostData = "OPERATION_NAME=ADD_NOTE&INPUT_DATA=<Operation><Details><Notes><Note><isPublic>false</isPublic><notesText>Text added to the note</notesText></Note></Notes></Details></Operation>&format=XML" $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("POST", $URLSDP & "/sdpapi/request/"& $ID & "/note?TECHNICIAN_KEY="& $TechnicianKey, False) $oHTTP.SetRequestHeader("Content-Type", "xml") $oHTTP.Send($sPostData) $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status ConsoleWrite($oStatusCode & @CRLF) ConsoleWrite($oReceived & @CRLF) If $oStatusCode = 200 Then ;Process the response $oReceived ;ConsoleWrite(@CRLF & "Response" & @CRLF & $oReceived & @CRLF) Else MsgBox(16, "Error " & $oStatusCode, $oReceived, 7) EndIf Response: <operation name="POST"><result><status>Failed</status><message>Invalid operation</message></result></operation>REST API guide. https://www.manageengine.com/products/service-desk-msp/help/adminguide/api/notes-operations.html#add
  2. Thanks But will it have any bad performance hit if i have two events registered?
  3. Hello I'm making a GUI that needs WM_Notify to work as I want to. Now my WM_Notify is enabling and disabling input and button in my GUI if there is enough characters in the string but I also want it to detect when the user clicks one of the rows in the ListView. Here is the working WM_Notify script im using (>Thanks to Martin is this topic) Func GUI_WM_COMMAND($hWnd, $imsg, $iwParam, $ilParam) Local $setHK = False $nNotifyCode = BitShift($iwParam, 16) $nID = BitAND($iwParam, 0x0000FFFF) $hCtrl = $ilParam If $nNotifyCode = $EN_CHANGE Then Select Case $hCtrl = GUICtrlGetHandle($InputDellOnSiteRepairID) If Stringlen(GUICtrlRead($InputDellOnSiteRepairID)) = 11 Then GUICtrlSetState($InputSak, $GUI_ENABLE) GUICtrlSetState($ButtonFindCase, $GUI_ENABLE) Else GUICtrlSetState($InputSak, $GUI_DISABLE) GUICtrlSetState($ButtonFindCase, $GUI_DISABLE) EndIf ;------------------ Case $hCtrl = GUICtrlGetHandle($InputSak) If Stringlen(GUICtrlRead($InputSak)) = 5 Then GUICtrlSetState($ButtonAdd, $GUI_ENABLE) Else GUICtrlSetState($ButtonAdd, $GUI_DISABLE) EndIf EndSelect EndIf Return $GUI_RUNDEFMSG EndFunc Is there any way i can merge my script with this? Func WM_Notify_Events($hWndGUI, $MsgID, $wParam, $lParam) #forceref $hWndGUI, $MsgID, $wParam Local $tagNMHDR, $event, $hwndFrom, $code $tagNMHDR = DllStructCreate("int;int;int", $lParam);NMHDR (hwndFrom, idFrom, code) If @error Then Return $event = DllStructGetData($tagNMHDR, 3) Select Case $wParam = $ListView Select ; Case $event = $NM_CLICK ; ConsoleWrite("SingleClick" & @LF) Case $event = $NM_DBLCLK $editsqlquery = 1 ;Setup GLOBAL variables rather than calling functions this part need to exit as fast as possible EndSelect EndSelect $tagNMHDR = 0 $event = 0 $lParam = 0 EndFunc ;==>WM_Notify_Events >Source
  4. Since i cannot do what i planed i will try this thanks
  5. I have a script that needs to be controlled with only two commandline parameters that is ran by a IP-phone software. So i have to be able to control this script with two commandline parameters; the first command gives the script a phone number and the second tells the script that the phone call was hung up. And im going to have some other functions in this script that is controlled by traymenu. Is this possible to have in one script or do i need to have two?
  6. I have searched the forums but I only found for Win XP, so is this possible for Win7 and how? this needs to work from windows login screen
  7. It worked but I need to remove all html tags etc. Im not really good at this but for stringregexpreplace pattern, if someone could give me a little hint how to replace a string and everything between those two strings ex: <head> CODE </head> and can I replace serveral strings with only one stringregexpreplace? EX: <head> CODE </head> and <th> CODE </th> and ... and ...
  8. I got Linksys WRT610N, with DD-WRT installed on it, I have tested this in firefox too, seems to work great there. but in IE its kinda funky.. some times it cant find the address because of the login credentials in the url and sometimes it will but then asks me for username and password(popup)
  9. Hello, I've been trying to use login credentials in urls with IECreate and IENavigate, but I couldn't get it to work Test 1: #include <IE.au3> $oIE = _IECreate ("http://username:password@192.168.1.1/",0,0,1) _IENavigate($oIE, ) $sText = _IEBodyReadText ($oIE) ConsoleWrite($sText) Result: Windows Login pops up and asks me for username and password Test 2: #include <IE.au3> $oIE = _IECreate ("",0,0,1) _IENavigate($oIE, "http://username:password@192.168.1.1/") $sText = _IEBodyReadText($oIE) ConsoleWrite($sText) Result: Same as first test.. Test 3: #include <INet.au3> _INetGetSource("http://username:password@192.168.1.1/Status_Conntrack.asp") $sText = _IEBodyReadText ($oIE) ConsoleWrite($sText) Same results.. How can I login without needing to have the user to enter the credentials and without interfering the user?
  10. Do you still have that script working? mind sharing ? Im trying to record from my mic and send it over udp or tcp
  11. Hello, Could anyone guide me over give me some hints how I can record/stream sounds from Stereomix in Windows 7/Vista and send it right away using RTSP protocol? NEVER MIND, BASS I WHAT I NEED
  12. Hello, Does Koda FD support Vista aero etc?
  13. Ok, Im trying to find a way to check if a url match any of the blocked urls All the blocked urls are in an array, but how can I compare them with wildcards etc? $URL = "http://something.something.com/something" $BlockedURLS = "http://*.something.com/*|http://something2.com/ads*" $array = StringSplit($BlockedURLS, "|") For $array = 1 to $array[0] Step 1 If ;COMPARE $URL with $Array MsgBox(0,"", "URL match, cutting connection") else MsgBox(0,"", "No match, let it pass") endif Next
  14. Hello, Does anyone know an easy way to check string if its match with another string, that works with wildcards? $URL = "http://something.something.com/something" $BlockedURLS = "http://*.something.com/*|http://something2.com/ads*"
  15. Wow This works perfect I tested this from a computer in southern norway and used my computer as proxy(nothern norway) Speed: Ping - 185ms (Often 50-130ms) Down: 1.6 Mb/s Up: 0.3 Mb/s My internet is 16 Mb/s down and 3-4 Mb/s up http://www.speedtest.net/result/770901399.png
  16. Well thanks bogQ for taking your time anyway.. @Martin; Im not a f***ing hacker, its totally illegal in my country and I have no interests in ruining things for people, as I said, I was making this for HELPING people..
  17. This doesnt have anything to do with hacking. lots of people ask me if I can help them with their comps, then I have to use lots of time guiding them trough the teamviewer installation. and I just want to automate it.. and yes, the windowinfo tool can see the ID and the Dynamic password Hacking is totally forbidden in my country, so if im that stupid to use this to get into anyones pc or company pc, I will be sent to jail for 1 year ++, im going to use this to help people, not doing anyhting malicious.. - Anyway, this is what the script is going to do: -Download TeamviewerQS -Send id and DYNAMIC password to an file on my company website -Wait till session is done, then delete TeamviewerQS -Delete the id/pw file on my server.
  18. I know, I changed it. Does anyone know how Windowinfo tool get all the text?
  19. Why isnt this working :S? Output: Line:1
  20. Still nothing $var = WinGetText("TeamViewer", "") $array = StringSplit($var, @CRLF, 1) ConsoleWrite($array)
  21. $var = ControlGetText("TeamViewer", "", "[CLASS:Edit; INSTANCE:1]") _ClipBoard_SetData ($var) Do you know how AU3 Window Info Tool is getting all the text?
×
×
  • Create New...