Jump to content

Kyan

Active Members
  • Posts

    543
  • Joined

  • Last visited

Everything posted by Kyan

  1. Hi, this problem is driving me nuts. Every time I select more than one file>Context Menu>Select my context entry, it opens one instance for each file selected How do I pass all the select files as parameters? This guy had the same problem (see the given example 2) I think it is somehow related to this https://msdn.microsoft.com/en-us/library/windows/desktop/hh127436(v=vs.85).aspxbut I can't find a way to make it work =========== My registry keys: to add them: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\TESTING] @="TESTING" [HKEY_CLASSES_ROOT\*\shell\TESTING\command] @="cmd /c echo %1 %*&pause" to remove it: Windows Registry Editor Version 5.00 [-HKEY_CLASSES_ROOT\*\shell\TESTING] == If you select multiple files, right click and click in "TESTING" you will see it opens one instance for each file :s EDIT: I also tried this Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\TESTING] @="TESTING" "Position"="Top" "MultiSelectModel"="Player" [HKEY_CLASSES_ROOT\*\shell\TESTING\command] @="cmd /c echo %L&pause"
  2. It needs to be added at the top of your script. You can use RegWrite with autoit if it isn't a big reg file
  3. Are you trying to write to HKLM? if so, you need admin rights, that's maybe your issue
  4. Is this code related? You get the acct/cardholder through those card readers...not much I can tell about it, but those companies may hand their sdk for this kind of receipt softwares.. CashDrawer ID are internal IDs just for the "manager" know from who it came from
  5. OP, is kind of hard to us guess what is happening, clean ram's contact pins with alcohol or a eraser and place them to see if everything is running ok. Go to eventvwr.msc and check for system critical errors
  6. Should do the job $aArray = StringRegExp("AVAIL:13:20","(\d{1,2}:\d{2})",3) consoleWrite($aArray[0]&@lf)
  7. why don't you use local ip addr? those hosts names are specified in your DNS? Or you used hosts file?
  8. Audit: Software puts itself for autorun in the next windows boot Checks the bios version and HDD info ?WHY?? are you scared of VM? Code injected in the process...encrypted code present is injected in the process to hide from normal scans. Files %localappdata%TempCrypter.INI %localappdata%Crypter.exe ->Weird place to place it, unless you want to run it in the next windows start... %localappdata%TempB4EB3A926BCD5286.TMP %localappdata%TempB4EB3A92.RRef %localappdata%Tempaut1.tmp %localappdata%TempBin1.exe %localappdata%Tempaut2.tmp %localappdata%TempBin2.exe what is Boost? http://www.boost.org/users/history/version_1_47_0.html And http://www.woodmann.com/forum/archive/index.php/t-4697.html ---- This program doesn't request for encryption keys, so, it must be very special
  9. you need to refresh the explorer's tray cache in order to that list refresh its contents... maybe there's a special hook you can use, IDK
  10. I don't know if I'm understanding your problem right, but if you want to display text, your need to create a label or edit and use GUICtrlSetData to set the text GUICtrlCreateEdit() GUICtrlCreateLabel()
  11. ConsoleWrite(_RandomPassword()&@LF) Exit Func _RandomPassword($__PWlength = 8) Local $__pwd = '' For $x = 1 To $__PWlength While 1 $_rnd = Random(65,122,1) If $_rnd < 91 Or $_rnd > 96 Then ExitLoop WEnd $__pwd &= Chr($_rnd) Next Return $__pwd EndFunc Cyborg5000, wouldn't be easier if you gen them? If they are random, why bother getting them from that site?
  12. @ViciousXUSMC, glad it helped somehow SNMP to quickly get router's information (connected ip's/mac's/external ip/connection status/etc) WEB config page to change router's setting Telnet to get router's information/change You just search for your device and you will find out what interfaces it has
  13. I was trying to get the all the ipAdEntAddr using bulk but it only returned the first one...to fix this, you need to first GetRequest (A0) and then repeat GetNext (A1) Took me a bit to understand how this works but here is an example #include "snmp_UDF-v1.7.4.au3" Global $Port = 161 ; UDP 161 = SNMP port Global $SNMP_Version = 2 ; SNMP v2c (1 for SNMP v1) Global $SNMP_Community = "public" ; SNMPString(Community) (change it) Global $SNMP_ReqID = 1 Global $SNMP_Command Global $result Global $Timeout_msec = 900 Global $oid = "1.3.6.1.2.1.4.20.1.1" Global $oidLength = StringLen($oid) Global $_first = $oid&'.0.0.0.0' UDPStartup() $Socket = UDPOpen('192.168.1.1', $Port) While 1 If $SNMP_ReqID > 0 Then $_first = $result[1][0] $SNMP_ReqID +=1 $SNMP_Command = _SNMPBuildPacket($_first, $SNMP_Community, $SNMP_Version, $SNMP_ReqID, "A1") UDPSend($Socket, $SNMP_Command) _StartListener() If StringMid($result[1][0],1,$oidLength) <> $oid Then ExitLoop ;checkin if you're out of your desired MIB SubTree ConsoleWrite("Iteration:"&$SNMP_ReqID&@TAB&$result[1][0] &@TAB&$result[1][1]&@LF) WEnd UDPCloseSocket($Socket) UDPShutdown() Exit Func _StartListener() $Timeout = TimerInit() While 1 $srcv = UDPRecv($Socket, 100) If $srcv <> "" Then $result = _ShowSNMPReceived($srcv) If @error Or TimerDiff($Timeout) > $Timeout_msec Then ExitLoop Sleep(50) WEnd EndFunc ;==>_StartListener EDIT: Speed boost. EDIT2: Need to find a way to read this value, avoiding the last unnecessary query (it would speedup 170ms this function) EDIT3: Can somebody help me interpret the outputs? There're some strings I don't know what they mean nvm EDIT4: Still didn't decode those hex values, RFC docs are a mess... Found another problem, it cannot retrieve mac addresses properly, output: Row|Col 0|Col 1 [0]|| [1]|1.3.6.1.2.1.4.22.1.2.1.192.168.1.4| [2]|1.3.6.1.2.1.4.22.1.2.1.192.168.1.255|ÿÿÿÿÿÿ
  14. I done almost the same, 1regex for which parameter (product and release) and then with a for loop done the same, is not as time consuming as I expected Thank you jguinch
  15. Thank you UEZ Didn't knew about the _GDIPlus_BitmapCreateFromMemory
  16. Hey, I don't know what is happening but It doesn't displays the PNG inside the button ctrl #include <GDIPlus.au3> #include <Memory.au3> #include <WindowsConstants.au3> #NoTrayIcon Global Const $STM_SETIMAGE = 0x0172, $BM_SETIMAGE = 0xF7, $BS_BITMAP = 0x0080 Global $bico = "0x89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF61000000017352474200AECE1CE" & _ "90000000467414D410000B18F0BFC6105000000E249444154384F9D93B11183300C45198559E8E92929188B9E31684241E58" & _ "CC0064E1A5AC74F67F9841B82B9D321E4AF6759C84D533CE7798ED1D668A1306263A9CFDF71B18DE634E9388ED0759D18BE81" & _ "A1692FA094EC976509FBBE8B185F01F33C4B8C35E2D1F717083BDB84699A42DFF719804F4C8109E2A48A7466A1ABE0EEAD554" & _ "A4F6CC3741776DC5E5BF8F8AF18BE5684C6F46305204DE29C2AD264E7DE01530895A141AB8D1540593209246A5C21A58EDC47" & _ "8061182E9B6500E5D0D97F8F80D61E214F5D6D1319DDFADF9866A17E9012807B503FCA06527799ECCD7A7A9D7F919E81F9F48" & _ "210970000000049454E44AE426082" _GDIPlus_Startup() $Form1 = GUICreate("Example", 300, 200, -1, -1, BitOR($WS_THICKFRAME,$WS_SYSMENU)) $btn = GUICtrlCreateButton("",130,70,32,32,$BS_BITMAP) $hButton = GUICtrlGetHandle($btn) $hHBITMAP = Load_BMP_From_Mem($bico, True) _WinAPI_DeleteObject(_SendMessage($hButton, $BM_SETIMAGE, 0, $hHBITMAP)) _WinAPI_UpdateWindow($hButton) _GDIPlus_Shutdown() GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 GUIDelete() _WinAPI_DeleteObject($hHBITMAP) Exit EndSwitch WEnd ;====================================================================================== ; Function Name: Load_BMP_From_Mem ; Description: Loads a image which is saved as a binary string and converts it to a bitmap or hbitmap ; ; Parameters: $mem_image: the binary string which contains any valid image which is supported by GDI+ ; Optional: $hHBITMAP: if false a bitmap will be created, if true a hbitmap will be created ; ; Remark: hbitmap format is used generally for GUI internal images ; ; Requirement(s): GDIPlus.au3, Memory.au3 ; Return Value(s): Success: handle to bitmap or hbitmap, Error: 0 ; Error codes: 1: $mem_image is not a binary string ; ; Author(s): UEZ ; Additional Code: thanks to progandy for the MemGlobalAlloc and tVARIANT lines ; Version: v0.95 Build 2011-06-11 Beta ;======================================================================================= Func Load_BMP_From_Mem($mem_image, $hHBITMAP = False) If Not IsBinary($mem_image) Then Return SetError(1, 0, 0) Local $declared = True If Not $__g_hGDIPDll Then _GDIPlus_Startup() $declared = False EndIf Local Const $memBitmap = Binary($mem_image) ;load image saved in variable (memory) and convert it to binary Local Const $len = BinaryLen($memBitmap) ;get length of image Local Const $hData = _MemGlobalAlloc($len, $GMEM_MOVEABLE) ;allocates movable memory ($GMEM_MOVEABLE = 0x0002) Local Const $pData = _MemGlobalLock($hData) ;translate the handle into a pointer Local $tMem = DllStructCreate("byte[" & $len & "]", $pData) ;create struct DllStructSetData($tMem, 1, $memBitmap) ;fill struct with image data _MemGlobalUnlock($hData) ;decrements the lock count associated with a memory object that was allocated with GMEM_MOVEABLE Local $hStream = DllCall("ole32.dll", "int", "CreateStreamOnHGlobal", "handle", $pData, "int", True, "ptr*", 0) $hStream = $hStream[3] Local $hBitmap = DllCall($__g_hGDIPDll, "uint", "GdipCreateBitmapFromStream", "ptr", $hStream, "int*", 0) ;Creates a Bitmap object based on an IStream COM interface $hBitmap = $hBitmap[2] Local Const $tVARIANT = DllStructCreate("word vt;word r1;word r2;word r3;ptr data; ptr") DllCall("oleaut32.dll", "long", "DispCallFunc", "ptr", $hStream, "dword", 8 + 8 * @AutoItX64, _ "dword", 4, "dword", 23, "dword", 0, "ptr", 0, "ptr", 0, "ptr", DllStructGetPtr($tVARIANT)) ;release memory from $hStream to avoid memory leak $tMem = 0 If $hHBITMAP Then Local Const $hHBmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) _GDIPlus_BitmapDispose($hBitmap) If Not $declared Then _GDIPlus_Shutdown() Return $hHBmp EndIf If Not $declared Then _GDIPlus_Shutdown() Return $hBitmap EndFunc ;==>Load_BMP_From_MemI guess this worked before :s
  17. UPS nope, it picks the last return from the inside SRER and uses it for all of them #include <Array.au3> $t='<tr><td rowspan="1" colspan="1" data-title="Product">Windows 8</td><td rowspan="1" colspan="1" data-title="Description">Country variant</td><td rowspan="1" colspan="1" data-title="Release">RTM</td></tr><tr><td rowspan="1" colspan="1" data-title="Product">windows 8.1</td><td rowspan="1" colspan="1" data-title="Description">Country variant</td><td rowspan="1" colspan="1" data-title="Release">Technical Preview</td></tr>' $r = StringRegExpReplace($t, 'Product">[^<]+\K', ' [' & StringRegExpReplace($t, '(?s).+Release">([^<]+).+', '$1' ) & ']') $os = StringRegExp($r,'(?ims)<td .+? data-title="Product">(.+?)</td>',3) _ArrayDisplay($os) Exit Returns Row|Col 0 [0]|Windows 8 [Technical Preview] [1]|windows 8.1 [Technical Preview]
  18. it's working, didn't knew I could intercalate SRER commands thought it would run first StringRegExpReplace($t, '(?s).+Release">([^<]+).+', '$1' ) and then the main SRER Thank you jquinch!
  19. GUICtrlCreatePic("c:\....\image.jpg",0,0,268,80) Set it to your gui size
  20. boththouse, ObjGet is not returning an object for me, I'm using my username and $system = "LOCALHOST" EDIT: Changed to $system = "LOCALHOST" $user = @ComputerName & "\\" & @UserName And keeps not returning an object EDIT2: Change to this and is working $system = @ComputerName $user = @UserName EDIT3: Now I'm curious about this objects thing I discover that using "WinNT://" & ComputerName & "/" & @UserName does the same as "WinNT://" & ComputerName & "/" & @UserName & ",user" This is a bit off topic but how do I get the Processor propriety? https://msdn.microsoft.com/en-us/library/aa746539(v=vs.85).aspx Tried with: Local $adsPath = "WinNT://" & $system & "/" & $user $P = ObjGet($adsPath,"Computer") ConsoleWrite($p.Processor&@LF) but didn't return an object variable
  21. I'm having a bit of trouble using StringRegExpReplace, I wanted to merge Product column to Description column but StringRegExpReplace replaces all to the first match. $t='<tr><td rowspan="1" colspan="1" data-title="Product">Windows 8</td><td rowspan="1" colspan="1" data-title="Description">Country variant</td><td rowspan="1" colspan="1" data-title="Release">RTM</td></tr><tr><td rowspan="1" colspan="1" data-title="Product">windows 8.1</td><td rowspan="1" colspan="1" data-title="Description">Country variant</td><td rowspan="1" colspan="1" data-title="Release">RTM</td></tr>' $r = StringRegExpReplace($t,'(?ims)<td .+? data-title="Product">(.+?)</td><td .+? data-title="Release">(.+?)</td>','\1 \[\2\]') ConsoleWrite(@error&@LF&$r&@LF) Exit Output (Red color=Bad replacement): <tr>Windows 8 [RTM]windows 8.1 [RTM]<td rowspan="1" colspan="1" data-title="Release">RTM</td></tr> Expected (Green color=Good replacement): <tr><td rowspan="1" colspan="1" data-title="Product">Windows 8 [RTM]</td><td rowspan="1" colspan="1" data-title="Description">Country variant</td><td rowspan="1" colspan="1" data-title="Release">RTM</td></tr><tr><td rowspan="1" colspan="1" data-title="Product">windows 8.1 [RTM]</td><td rowspan="1" colspan="1" data-title="Description">Country variant</td><td rowspan="1" colspan="1" data-title="Release">RTM</td></tr> I'm doing like this to after use StringRegExp($rTable,'(?ims)<td .+? data-title="Product">(.+?)</td>',3) and capture everything already on Product [Release] format
  22. You need to control your modem (router) via SNMP/telnet/web and restart the connection...
  23. @SmOke_N, took it from a old snippet but somehow was working @UEZ, neat work UEZ, awesome! (You gave me a idea of doing other loading animations using autoit ^^) @spudw2k, indeed, hex workshop doing again his bad job of putting selected data in clipboard :s, works fine if I add the last line, thank you
  24. I don't know why this is happening but the gif plays smoothly on chrome (link for this gif) I'm using >GIFAnimation UDF from trancexx #include <WindowsConstants.au3> #include <GIFAnimation.au3> Global $bLoading = "0x4749463839612B000B00F10000FFFFFF07A3F685D1FA07A3F621FF0B4E45545343415045322E300301000000" & _ "21FE1A43726561746564207769746820616A61786C6F61642E696E666F0021F904090A0000002C000000002B000B00000232848E0" & _ "8CB96D9D883F3C50A1BDE56F3CB85E036865859A166277DDE9ABEA70C672D49D787CA2EFAC4B3F93EB8A020324C15000021F90409" & _ "0A0000002C000000002B000B0000023DC48E08CB200F6163B19A84C7AC7CF39861DEF78C6498989FCAA14A434A702CB8076BCDB1A" & _ "DE9240EB20165141A6F58F27D8ECA4ED3E29A2C6252C7AF000021F904090A0000002C000000002B000B0000023D848E08CB300F6163A9" $Form1 = GUICreate("Example", 300, 300, -1, -1, BitOR($WS_THICKFRAME,$WS_SYSMENU)) GUISetBkColor(0xFFFFFF) $hGIF = _GUICtrlCreateGIF($bLoading, "", 125, 120,Default,Default,Default,0xFFFFFFFF) GUIRegisterMsg(133, "_Refresh") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit EndSwitch WEnd Func _Refresh($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam, $lParam _GIF_RefreshGIF($hGIF) EndFunc ;==>_Refresh Using this udf it plays faster and blinks when is beginning the animation again. Hope I'm doing something wrong, its hard to find cool looking loading gifs with less than 1kb :
  25. Some people say thar SRE in html is madness, but I still use it xD SRE: $rex = StringRegExp($htmlPage,'(?ims)<div class="item">(.+?)</div>',3) ;returns an array Matching where the string beggins and where the </div> is used $Start = StringInStr($htmlPage,'class="item">') ;matches the beginning of class="... $end = StringInStr($htmlPage,'</div>',0,1,$Start) ;matches the char count of </div> (began matching it from $Start) $match = StringMid($htmlPage,$Start+13,$end-$Start-12)
×
×
  • Create New...