Login Register






There was a very particular style of DDOS attack just now, it was mitigated.
Thread Rating:
  • 0 Vote(s) - 0 Average


[AutoIt]String to Chr converter filter_list
Author
Message
[AutoIt]String to Chr converter #1
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#include <Array.au3>
;www.hackcommunity.com
$Main = GUICreate("AutoIt3 String Chr Encrypter by 1234hotmaster", 561, 230, -1, -1)
$Input = GUICtrlCreateInput("Hello World!", 16, 16, 353, 21)
$Conv = GUICtrlCreateButton("Convert", 160, 46, 59, 25)
GUICtrlSetCursor (-1, 0)
$Output = GUICtrlCreateInput("", 16, 80, 321, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY))
$Cpy = GUICtrlCreateButton("Copy", 336, 80, 35, 21)
GUICtrlSetFont(-1, 6, 400, 0, "MS Sans Serif")
GUICtrlSetCursor (-1, 0)
$Group1 = GUICtrlCreateGroup("String Encrypter", 8, 0, 369, 105)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Settings", 400, 0, 153, 65)
$RevHex = GUICtrlCreateCheckbox("Reverse Hex", 432, 20, 89, 17)
$Linebreak = GUICtrlCreateInput("5", 500, 42, 25, 18, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
GUICtrlSetFont(-1, 6, 400, 0, "Arial")
$Label1 = GUICtrlCreateLabel("Line break for every", 410, 45, 90, 16)
GUICtrlSetFont(-1, 7, 400, 0, "Arial")
$Label2 = GUICtrlCreateLabel("Chr", 530, 45, 19, 16)
GUICtrlSetFont(-1, 7, 400, 0, "Arial")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("AutoIt3 Script (*.au3) Encrypter", 8, 120, 369, 105)
$LoadNEncrypt = GUICtrlCreateButton("Encrypt", 139, 186, 99, 25)
GUICtrlSetCursor (-1, 0)
$FileEnc = GUICtrlCreateInput("", 16, 136, 321, 21,$ES_READONLY)
$seldialog = GUICtrlCreateButton("...", 336, 135, 35, 25)
GUICtrlSetCursor (-1, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)


Global $temps
Func _EncString($str,$linebrk)
    Local $op,$x
    For $i = 1 To StringLen($str)
        If Int($linebrk) <> 0 Then $x+=1
        If $x = Int($linebrk) And $linebrk <> 0 Then
            $op &= " _" & @CRLF
            $x=0
        EndIf
        $op &= "Chr(" &  Asc(StringMid($str,$i,1)) & ")&"
    Next
    $op = StringTrimRight($op,1)
    If BitAnd(GUICtrlRead($RevHex),$GUI_CHECKED) = $GUI_CHECKED Then
        $op = "_HexToString(_StringReverse(" & $op
        $op &= "))"
    EndIf
    Return $op
    $op = Chr(0)
EndFunc

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit



        Case $Conv
            If Int(GUICtrlRead($Linebreak)) <= 0 Then GUICtrlSetData($Linebreak,0)
            $temps = GUICtrlRead($Input)
            If GUICtrlRead($Input) <> "" Then
                Local $x = 0
                If BitAnd(GUICtrlRead($RevHex),$GUI_CHECKED) = $GUI_CHECKED Then
                    GUICtrlSetData($Input, _StringReverse(_StringToHex(GUICtrlRead($Input))))
                EndIf
                    GUICtrlSetData($Output, _EncString(GUICtrlRead($Input),GUICtrlRead($Linebreak)))
                EndIf
                GUICtrlSetData($Input,$temps)




        Case $Cpy
            ClipPut(GUICtrlRead($Output))
            WinSetTitle("","","AutoIt3 String Chr Encrypter by 1234hotmaster || Copied")
            Sleep(50)
            WinSetTitle("","","AutoIt3 String Chr Encrypter by 1234hotmaster // Copied")
            Sleep(50)
            WinSetTitle("","","AutoIt3 String Chr Encrypter by 1234hotmaster -- Copied")
            Sleep(50)
            WinSetTitle("","","AutoIt3 String Chr Encrypter by 1234hotmaster \\ Copied")
            Sleep(50)

        Case $seldialog
            $fd = FileOpenDialog("Select AutoIt3 Script",@WorkingDir,"AutoIt3 Script (*.au3)",1+2)
            If Not @error Then GUICtrlSetData($FileEnc, $fd)


        Case $LoadNEncrypt
            If FileExists(GUICtrlRead($FileEnc)) Then
                $filereaded = FileRead(GUICtrlRead($FileEnc))
                $arr1 = _StringBetween($filereaded,Chr(34),Chr(34),1)
                $filereaded = StringReplace($filereaded, Chr(39),Chr(34),1000,1)
                $filereaded = StringReplace($filereaded, Chr(34)&Chr(34),"Chr(0)",1000,1)
                For $i = 0 To UBound($arr1) - 1
                     $filereaded = StringReplace($filereaded, Chr(34) & $arr1[$i] & Chr(34),_EncString($arr1[$i],GUICtrlRead($Linebreak)),0)
                Next

                If BitAnd(GUICtrlRead($RevHex),$GUI_CHECKED) = $GUI_CHECKED Then
                        If Not StringInStr(StringLower($filereaded),"#include <string.au3>",1,1) Then $filereaded = "#include <String.au3>" & @CRLF & $filereaded
                EndIf

                $fs = FileOpen(GUICtrlRead($FileEnc),2)
                FileWrite($fs, $filereaded)
                FileClose($fs)

                $filereaded = Chr(0)
                MsgBox(64,"Done","Encryption of the file is complete.",1)
            EndIf

    EndSwitch
WEnd

you can use this to make your code harder to read, encryption, etc since au3 can be decompiled...

Edit: Added reverse hex method which needs #include <String.au3> on the top of your code.
(This post was last modified: 11-01-2011, 03:03 AM by Skullmeat.)
Pierce the life fibers with your drill.

Reply

RE: [AutoIt]String to Chr converter #2
Bump - Added replacement of blank strings like "" or '' with Chr(0) and made it show a msgbox after file encryption was done.
Pierce the life fibers with your drill.

Reply

RE: [AutoIt]String to Chr converter #3
works great very cool thanks Smile

Reply

RE: [AutoIt]String to Chr converter #4
Love this "encrypter". Its awesome but What Specifically did you Use to Get it To Read Each Line and Convert Each Line to Chr?
(This post was last modified: 11-26-2011, 01:27 AM by doojan.)

Reply

RE: [AutoIt]String to Chr converter #5
oh i just used _StringBetwen() to detect stuff between " and ' Smile
Pierce the life fibers with your drill.

Reply

RE: [AutoIt]String to Chr converter #6
Nice Code , Congratulations

Reply

RE: [AutoIt]String to Chr converter #7
Deleted #2 for you,

Nice share...



Reply

RE: [AutoIt]String to Chr converter #8
Thanks guys, i might work on making it better once i get more free time Biggrin
Pierce the life fibers with your drill.

Reply

RE: [AutoIt]String to Chr converter #9
I will follow this thread, the greatest autoit tool I have seen for along time
[Image: AQiSh.jpg]

Reply

RE: [AutoIt]String to Chr converter #10
Very Very nice.

Can i encrypt different code sources with this tool ie. python scripts etc. or .txt.

And can i use your code to an AutoIt project that i am after. credits to you of course .

thank you
it wasn't me nobody saw me you can't prove anything

Knowledge is free

Reply







Users browsing this thread:






This forum uses Lukasz Tkacz MyBB addons.