Jump to content

TheDcoder

Active Members
  • Posts

    7,103
  • Joined

  • Days Won

    88

Everything posted by TheDcoder

  1. Hello Guys! . I have been busy with my exams... They are finished now, so summer holidays! I am been working very hard to bring back the reputation for AutoIt in IRC, I recently made a unofficial channel for AutoIt at freenode (freenode is a very popular IRC Network for FOSS [Free and Open Source Software]). You can check this topic if you want: Introduction This tutorial will guide you from start to finish covering each and every small step (no matter how small to make it more IRC newbie friendly) so that everyone can enjoy the benefits of IRC and the IRC Community. Please read the whole post for better understanding. Ok, lets begin our IRC adventure! Installing HexChat You might wonder why do you need HexChat, why not use the free and no installation needed online IRC client? Well, most online clients might be quick and easy to setup but don't offer much option and power, moreover they even show your IP in the public! For the above reason, we are using a neat desktop client called HexChat! (Its FOSS too!) Here are the steps you need to follow: 1. As you might have expected, you need to download the installer first. Here is the link to the download page: http://hexchat.github.io/downloads.html. You need to select the best option for you, here are some pointers: 2. After downloading the installer, install it... Here is a small video which I made to help you : Configuring HexChat This is the most important step in our journey, Configuration. After launching HexChat, it will prompt you to configure it, simply follow these steps: 1. This is the initial window, find "freenode" in the "Networks" List: 2. Select it and click "Favour" (optional but recommended). 3. Change the values in the input boxes as you wish (I have set mine in the screenshot). 4. Click edit and you will be prompted by a screen, click the "Autojoin channels" and add "##AutoIt" to it. 5. Click "Close" 6. Click "Connect" in the previous window and wait for it to automatically connect to ##AutoIt . 7. Vola! You are done! You can now chat like blah blah blah..... Some extra optional work 1. Type "/msg NickServ REGISTER <any password> <your email address>" 2. Verify your email 3. Open network manager by doing Ctrl + S 4. Find freenode in the network list and click edit 5. Enter your password and click "Close" 6. Click on the "freenode" tab and enter this command: "/stats p". You will get a list of active staff members: 7. Type "/query <nickname of the staff member> <message>" Replace <message> with a message asking for a "cloak", something like this would do the trick: "Hello, I want a cloak for account" 8. Wait for the staff member to give you the cloak. That's it! You are done! End comments by the author of this tutorial I am glad that you are still reading until the end , You have just made a BIG contribution to freenode ##AutoIt IRC Community! Thank you very much for that IF YOU HAVE ANY PROBLEMS, FEEL FREE TO PM ME HERE OR /msg TheDcoder <message> ON IRC.
  2. Ah, no, I would like create my own repo Thanks for the permission! TD
  3. @Jos Ummm... Must change my glasses . So that is what it was then... Thanks!
  4. @Jos ConsoleWrite(_Base64_Encode("jilles" & chr(0) & "jilles" & Chr(0) & "sesame") = 'amlsbGVzAGppbGxlcwBzZXNhbWU=')
  5. Its looks close but that is not what I wanted, I want it to be exactly "amlsbGVzAGppbGxlcwBzZXNhbWU="
  6. No, that is not what I want... What I want is: jilles<NULL>jilles<NULL>sesame encoded in Base64...
  7. No, all the characters are encoded in Base64. (expect the Null) I also changed the topic
  8. @Danyfirex Its "amlsbGVzAGppbGxlcwBzZXNhbWU=", that is not what I wanted... @Jos Thanks for locking the topic, still reading your previous posts.
  9. Sorry @czardas but I am a little confused, please refer to this topic:
  10. @Jos I am aware, but I was confused while deciding the Topic Title, will correct it... But this didn't work either: ConsoleWrite(_Base64_Encode("jilles" & Binary(Null) & "jilles" & Binary(Null) & "sesame"))
  11. I am really having a headache with this one... ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Base64_Encode ; Description ...: Encode the $vData in Base64 ; Syntax ........: _Base64_Encode($vData) ; Parameters ....: $vData - $vData to Encode. ; Return values .: Success: Base64 encoded $vData in the form of a string. ; Failure: False and @error set to: ; 1 - If "error calculating the length of the buffer needed" ; 2 - If "error encoding" ; Author ........: trancexx ; Modified ......: Damon Harris (TheDcoder) ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Base64_Encode($vData) $vData = Binary($vData) Local $tByteStruct = DllStructCreate("byte[" & BinaryLen($vData) & "]") DllStructSetData($tByteStruct, 1, $vData) Local $tIntStruct = DllStructCreate("int") Local $aDllCall = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _ "ptr", DllStructGetPtr($tByteStruct), _ "int", DllStructGetSize($tByteStruct), _ "int", 1, _ "ptr", 0, _ "ptr", DllStructGetPtr($tIntStruct)) If @error Or Not $aDllCall[0] Then Return SetError(1, 0, False) ; error calculating the length of the buffer needed EndIf Local $tCharStruct = DllStructCreate("char[" & DllStructGetData($tIntStruct, 1) & "]") $aDllCall = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _ "ptr", DllStructGetPtr($tByteStruct), _ "int", DllStructGetSize($tByteStruct), _ "int", 1, _ "ptr", DllStructGetPtr($tCharStruct), _ "ptr", DllStructGetPtr($tIntStruct)) If @error Or Not $aDllCall[0] Then Return SetError(2, 0, False) ; error encoding EndIf Return DllStructGetData($tCharStruct, 1) EndFunc ConsoleWrite(_Base64_Encode("jilles" & Null & "jilles" & Null & "sesame")) ; It should be "amlsbGVzAGppbGxlcwBzZXNhbWU=" Sleep(1000) Thanks in Advance, TD.
  12. @jchd Ah, no. I just tried it...
  13. @water I need to convert a string (with Nulls as delimiters) to Base64.
  14. Forgot about the helpfile, Thanks @water!
  15. Here is some code: ConsoleWrite("Test" == "Test" & Null) ; This should be False by theory, but it is True in AutoIt Sleep(1000) ; Sometime for you to read the result Is this a bug or expected behaviour? Thanks in Advance, TD
  16. Base64 Snippets: ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Base64_Encode ; Description ...: Encode the $vData in Base64 ; Syntax ........: _Base64_Encode($vData) ; Parameters ....: $vData - $vData to Encode. ; Return values .: Success: Base64 encoded $vData in the form of a string. ; Failure: False and @error set to: ; 1 - If "error calculating the length of the buffer needed" ; 2 - If "error encoding" ; Author ........: trancexx ; Modified ......: Damon Harris (TheDcoder) ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Base64_Encode($vData) $vData = Binary($vData) Local $tByteStruct = DllStructCreate("byte[" & BinaryLen($vData) & "]") DllStructSetData($tByteStruct, 1, $vData) Local $tIntStruct = DllStructCreate("int") Local $aDllCall = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _ "ptr", DllStructGetPtr($tByteStruct), _ "int", DllStructGetSize($tByteStruct), _ "int", 1, _ "ptr", 0, _ "ptr", DllStructGetPtr($tIntStruct)) If @error Or Not $aDllCall[0] Then Return SetError(1, 0, False) ; error calculating the length of the buffer needed EndIf Local $tCharStruct = DllStructCreate("char[" & DllStructGetData($tIntStruct, 1) & "]") $aDllCall = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _ "ptr", DllStructGetPtr($tByteStruct), _ "int", DllStructGetSize($tByteStruct), _ "int", 1, _ "ptr", DllStructGetPtr($tCharStruct), _ "ptr", DllStructGetPtr($tIntStruct)) If @error Or Not $aDllCall[0] Then Return SetError(2, 0, False) ; error encoding EndIf Return DllStructGetData($tCharStruct, 1) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Base64_Decode ; Description ...: Decode a base64 string ; Syntax ........: _Base64_Decode($sBase64) ; Parameters ....: $sBase64 - $sBase64 to decode. ; Return values .: Success: Decode data in the form of binary ; Failure: False & @error set to: ; 1 - If "error calculating the length of the buffer needed" ; 2 - If "error decoding" ; Author ........: trancexx ; Modified ......: Damon Harris (TheDcoder) ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Base64_Decode($sBase64) Local $tIntStruct = DllStructCreate("int") $aDllCall = DllCall("Crypt32.dll", "int", "CryptStringToBinary", _ "str", $sBase64, _ "int", 0, _ "int", 1, _ "ptr", 0, _ "ptr", DllStructGetPtr($tIntStruct, 1), _ "ptr", 0, _ "ptr", 0) If @error Or Not $aDllCall[0] Then Return SetError(1, 0, False) ; error calculating the length of the buffer needed EndIf Local $tByteStruct = DllStructCreate("byte[" & DllStructGetData($tIntStruct, 1) & "]") $aDllCall = DllCall("Crypt32.dll", "int", "CryptStringToBinary", _ "str", $sBase64, _ "int", 0, _ "int", 1, _ "ptr", DllStructGetPtr($tByteStruct), _ "ptr", DllStructGetPtr($tIntStruct, 1), _ "ptr", 0, _ "ptr", 0) If @error Or Not $aDllCall[0] Then Return SetError(2, 0, False); error decoding EndIf Return DllStructGetData($tByteStruct, 1) EndFunc I don't take credit, @trancexx made it, I just polished the functions, enjoy! TD
  17. I am forking this UDF, I hope you don't mind .
  18. I need some help with splitting again guys (Its a different syntax this time): {"responseData": {"results":[{"GsearchResultClass":"GwebSearch","unescapedUrl":"http://www.userbars.be/showroom/TheDcoder","url":"http://www.userbars.be/showroom/TheDcoder","visibleUrl":"www.userbars.be","cacheUrl":"http://www.google.com/search?q\u003dcache:TD31scizJEEJ:www.userbars.be","title":"Userbars | Userbar Showroom » \u003cb\u003eTheDcoder\u003c/b\u003e - Userbars.be","titleNoFormatting":"Userbars | Userbar Showroom » TheDcoder - Userbars.be","content":"Userbars Showroom \u003cb\u003eTheDcoder\u003c/b\u003e: firefox, keepass, password, manager, life, is, a, \ndonut, autoit, scripter, kongregate, pc, nerd."}],"cursor":{"resultCount":"555","pages":[{"start":"0","label":1},{"start":"1","label":2},{"start":"2","label":3},{"start":"3","label":4},{"start":"4","label":5},{"start":"5","label":6},{"start":"6","label":7},{"start":"7","label":8}],"estimatedResultCount":"555","currentPageIndex":0,"moreResultsUrl":"http://www.google.com/search?oe\u003dutf8\u0026ie\u003dutf8\u0026source\u003duds\u0026start\u003d0\u0026hl\u003den-GB\u0026q\u003dTheDcoder","searchResultTime":"0.10"}}, "responseDetails": null, "responseStatus": 200} (Source: Google AJAX Web Search API) I want to extract these two from that text: http://www.userbars.be/showroom/TheDcoder Userbars | Userbar Showroom » TheDcoder - Userbars.be (Use a text editor to find them.) Thanks in Advance, TD
  19. Nope, The spaces are always there
×
×
  • Create New...