Jump to content
Sign in to follow this  
dnsi

File Encryption

Recommended Posts

this-is-me

Give us your passphrase and we will decompile it.


Who else would I be?

Share this post


Link to post
Share on other sites
jvanegmond

In that case. I have also written a virus.. I mean, a file encryption system. :lmao: I will post it shortly

Share this post


Link to post
Share on other sites
SmOke_N

Oh and sorry i can't give the code i deleted that after this was complete. :lmao::ph34r::geek::):ph34r::);)

Here you go:
#include <guiconstants.au3>
$FILE1 = FileOpenDialog("Choose Input Path", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "All Files(*.*)", 3)
$FILE2 = FileSaveDialog("Choose Output Path", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "All Files(*.*)", 18)
$INTERFACE = GUICreate("Electric Shield", 307, 170)
$out1 = GUICtrlCreateInput("", 104, 80, 193, 21)
GUICtrlSetData($out1,$FILE2)
GUICtrlCreateLabel("InputFile:", 16, 8)
$Decrypt1 = GUICtrlCreateButton("Decrypt", 232, 40, 65, 33, 0)
$Encrypt1 = GUICtrlCreateButton("Encrypt", 8, 40, 65, 33, 0)
$in1 = GUICtrlCreateInput("", 104, 8, 193, 21)
GUICtrlSetData($in1,$FILE1)
GUICtrlCreateLabel("Output File:", 8, 88)
$now=GUICtrlCreateLabel("0", 10, 145, 163, 17)
$outof=GUICtrlCreateLabel("0", 105, 145, 163, 17)
GUICtrlCreateLabel("/", 90, 145)
GUICtrlCreateLabel("Bytes Done", 180, 145)
GUICtrlCreateLabel("OFFSET:", 104, 32)
$offset = GUICtrlCreateInput("", 104, 48, 105, 21)
$message = GUICtrlCreateInput("", 8, 120, 209, 21)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    $textmsg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE then
        ExitLoop
    EndIf

    If $textmsg=$Encrypt1 Then
        $curcount=0
        $current111="neg"
        GUICtrlSetData($now,"0")
        GUICtrlSetData($outof,"0")
        GUISetState(@SW_DISABLE)
        doencrypt(GUICtrlRead($in1))
    EndIf
    If $textmsg=$Decrypt1 Then
        $current111="neg"
        $curcount=0
        GUICtrlSetData($now,"0")
        GUICtrlSetData($outof,"0")
        GUISetState(@SW_DISABLE)
        dodecrypt(GUICtrlRead($in1))
    EndIf
WEnd
func doencrypt($file)
    if FileExists($file) Then
        $open1=FileOpen(GUICtrlRead($out1),9)
        if $open1=-1 Then
            GUICtrlSetData($message,"Incorrect path")
            SetError(1)
        EndIf
        GUICtrlSetData($message,"Encrypting...")
        $totalrnd=""
        $lasttotalrnd=""
        $loadfile=fileopen($file,0)
        $reads=FileRead($loadfile)
        GUICtrlSetData($outof,StringLen($reads))
        fileclose($loadfile)
        $opened1=fileopen($file,0)
        $totaltext=""
        While $curcount <> StringLen($reads)
            $read=FileRead($opened1,3000)
            For $i=1 to StringLen($read)
            If $i=1 Then
                $current=StringMid($read,1,1)
            Else
                $current=StringMid($read,$i,1)
            EndIf
                        if $current111="neg" Then
            $encode=asc($current)
            $encode=$encode+GUICtrlRead($offset)
            $text=chr($encode)
            $totaltext=$totaltext & $text
            $curcount=GUICtrlRead($now)
            GUICtrlSetData($now,$curcount+1)
            $curcount=$curcount+1
        Else
                        $encode=asc($current)
            $encode=$encode-GUICtrlRead($offset)
            $text=chr($encode)
            $totaltext=$totaltext & $text
            $curcount=GUICtrlRead($now)
            GUICtrlSetData($now,$curcount+1)
            $curcount=$curcount+1
        EndIf
                    if $current111="neg" Then
                $current111="pos"
            Else
                $current111="neg"
            EndIf
        Next
        FileWrite($open1,$totaltext)
        $totaltext=""
    WEnd
    FileClose($open1)
        FileClose($opened1)
    FileClose($loadfile)
        GUICtrlSetData($message,"Encryption Complete!")
beep(500,200)
$totaltext=""
    Else
        GUICtrlSetData($message,"Incorrect path")
    SetError(1)
    $totaltext=""
EndIf
GUISetState(@SW_ENABLE)
EndFunc

func dodecrypt($file)
    $open1=FileOpen(GUICtrlRead($out1),9)
        if $open1=-1 Then
            GUICtrlSetData($message,"Error with output file!")
            SetError(1)
            $totaltext=""
            Return ""
        EndIf
    if FileExists($file) Then
        GUICtrlSetData($message,"Decrypting...")
        $loadfile=fileopen($file,0)
        $reads=FileRead($loadfile)
        GUICtrlSetData($outof,StringLen($reads))
        fileclose($loadfile)
        $opened1=fileopen($file,0)
        $totaltext=""
        While $curcount <> StringLen($reads)
            $read=FileRead($opened1,3000)
            For $i=1 to StringLen($read)
            If $i=1 Then
                $current=StringMid($read,1,1)
            Else
                $current=StringMid($read,$i,1)
            EndIf
            if $current111="neg" Then
            $encode=asc($current)
            $encode=$encode-GUICtrlRead($offset)
            $text=chr($encode)
            $totaltext=$totaltext & $text
            $curcount=GUICtrlRead($now)
            GUICtrlSetData($now,$curcount+1)
            $curcount=$curcount+1
        Else
                        $encode=asc($current)
            $encode=$encode+GUICtrlRead($offset)
            $text=chr($encode)
            $totaltext=$totaltext & $text
            $curcount=GUICtrlRead($now)
            GUICtrlSetData($now,$curcount+1)
            $curcount=$curcount+1
        EndIf

            if $current111="neg" Then
                $current111="pos"
            Else
                $current111="neg"
            EndIf
        Next
        FileWrite($open1,$totaltext)
        $totaltext=""
    WEnd
    FileClose($open1)
    FileClose($opened1)
    FileClose($loadfile)

        GUICtrlSetData($message,"Decryption Complete!")
beep(500,200)
$totaltext=""
    Else
        GUICtrlSetData($message,"Incorrect path")
    SetError(1)
EndIf
GUISetState(@SW_ENABLE)
EndFunc

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
SmOke_N

Oh ok i didn't know that...

:lmao: Didn't know what?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Richard Robertson

He didn't know that.

Share this post


Link to post
Share on other sites
this-is-me

Which version of AutoIt did you use to make this script?

Edited by this-is-me

Who else would I be?

Share this post


Link to post
Share on other sites
SmOke_N

I do the compile from sci editor so...

It automatically gives decompilible and no passfrase. :lmao::ph34r::geek::):ph34r: :"> :">

Hmm, I get a kick out of people that say things without checking themselves.

Try to decompile it, and see what it tells you... Then reply.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
=sinister=

wt... You check it with any virus scanner

Doesn't have to show up in a virus scanner to be a virus.

Share this post


Link to post
Share on other sites
jvanegmond

Doesn't have to show up in a virus scanner to be a virus.

True. Some AutoIt scripts that just MsgBox are flagged as virus. My keylogger doesn't get flagged at all. :whistle: It has something to do with the autoit version or something..

Anyway, a idea on improvement: Add a option "Encrypt" and "Decrypt" to the menu that pops under when you right click a file. Shouldn't be too hard, work it into a function and there you go.

Share this post


Link to post
Share on other sites
RazerM

It's easier than you'd think. For my Encrypt0r project, the installer does this

RegWrite("HKEY_CLASSES_ROOT\*\shell\Encrypt with Encrypt0r\command", "", "REG_SZ", '"' & $path & '\Encrypt0r.exe" "Encrypt" "%1"') oÝ÷ Û^­í7ê­+-ë¬z»)쵩ejب­8b²gƧÉø¥{¥¯y©÷ôIܯ*+aw+Êt¯¢iÚ'¶«mrXg§¹h^+b²Þ²Çw+Êt¯¥·¬z{wôIܯ*mßÖ§u8^~)^¶­Á«+mrXçuw+Êt®¬¶ZÙ^r¦jwew©j¶¦z׫²Ê"¶ë²Øb±«­¢+Ù%ÀÌØí
µ1¥¹lÁt±ÐìÐìÀQ¡¸(ÀÌØí¹ÉåÁÐÁÉ¥±ôMÉ¥ÁѥȵÀìÅÕ½ÐìÀäÈí¹ÉåÁÐÁȹáÅÕ½Ðì(%ÀÌØí
µ1¥¹lÅtôÅÕ½Ðí¹ÉåÁÐÅÕ½ÐìQ¡¸¹ÉåÁÑ
µ ¤(%ÀÌØí
µ1¥¹lÅtôÅÕ½ÐíÉåÁÐÅÕ½ÐìQ¡¸ÉåÁÑ
µ ¤)¹%
Edited by RazerM

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×