Jump to content

encryption an decryption


 Share

Recommended Posts

I have current started on encryption... as i noticed a topic about it and it interested me.

Well what i want to make is a txt file decryption.

but what i do not know is how to make a INPUT DIRECTORY (link to txt file).

and OUTPUT DIRECTORY ( put decrypted file).

Also how would you make it peform when reading the txrt file.

if a is detected replace with t.

if d is detected replace with s.

and so on.

It is greatly apreciated if you can help as this is my first time making a decryption program.

Also does anyone know if autoit works on a PSP.

Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Link to comment
Share on other sites

Its just that i thought if i had a psp ver 1.5 and a exe autoit file, i could transform the exe into a pbp file and play it on the psp.

Just to say.... i think you can, as you are able to get windows 95 running on a psp.

Also, does anyone have anyother info on decryption.

as it is apreciated.

Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Link to comment
Share on other sites

The best way to get information about encryption and decryption processes would be to look it up on the net. There is entirely too much that couldnt be covered in a post on the forums. Search Google.com and your local library. That should give you a starting point. Then it is a simple deal. You will have to use StringReplace() and read your files to a string.

Let me know if you need anything else.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

I have current started on encryption... as i noticed a topic about it and it interested me.

Well what i want to make is a txt file decryption.

but what i do not know is how to make a INPUT DIRECTORY (link to txt file).

and OUTPUT DIRECTORY ( put decrypted file).

Also how would you make it peform when reading the txrt file.

if a is detected replace with t.

if d is detected replace with s.

and so on.

It is greatly apreciated if you can help as this is my first time making a decryption program.

Also does anyone know if autoit works on a PSP.

<{POST_SNAPBACK}>

there are alot better encryption types than a simple cypher as you suggest. i'll whip you up something real quick to do what you like, but if you have data you want to encrypt from people who would actually try to decrypt it, you'll definitely want to do some more research.
Link to comment
Share on other sites

If you are serious with cryptography, buy AND read the following book. No way around that !

Bruce Schneier: Applied Cryptography.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

Hi,

maybe this is something you can use.

$encryptedUserID = _StringEncrypt ( 1, $UserID, "xyz123" , 3 )

IniWrite("pwd.ini", "UserID", "ID", $encryptedUserID)

xyz123 is used to encrpyt your String.

code-->

#include <GUIConstants.au3>

#include <string.au3>

Call("UserID")

Call("HostPWD")

Call("NotesPWD")

exit(0)

Func UserID()

$UserID = InputBox("Security Check", "Bitte geben Sie Ihre UserID ein:", "", "*", 220, 130)

If @error = 1 Then

MsgBox(64, "Information", "Das Skript wurde beendet", 2)

Exit

EndIf

$UserID2 = InputBox("Security Check", "Bitte geben Sie Ihre UserID erneut ein:", "", "*", 220, 130)

If @error = 1 Then

MsgBox(64, "Information", "Das Skript wurde beendet", 2)

Exit

EndIf

if $UserID = $UserID2 Then

$encryptedUserID = _StringEncrypt ( 1, $UserID, "xyz123" , 3 )

IniWrite("pwd.ini", "UserID", "ID", $encryptedUserID)

Else

$returnWert = MsgBox(5, "Passwortcheck", "Die eingegenen Passwörter stimmen nicht überein!")

Select

Case $returnWert = 4

Call("UserID")

Case Else

MsgBox(64, "Information", "Das Skript wurde beendet", 2)

Exit(0)

EndSelect

EndIf

EndFunc ;==>UserID

Func HostPWD()

$HostPWD = InputBox("Security Check", "Bitte geben Sie das Host-Passwort ein:", "", "*", 220, 130)

If @error = 1 Then

MsgBox(64, "Information", "Das Skript wurde beendet", 2)

Exit

EndIf

$HostPWD2 = InputBox("Security Check", "Bitte geben Sie das Host-Passwort erneut ein:", "", "*", 220, 130)

If @error = 1 Then

MsgBox(64, "Information", "Das Skript wurde beendet", 2)

Exit

EndIf

if $HostPWD = $HostPWD2 Then

$encryptedHOSTPWD = _StringEncrypt ( 1, $HOSTPWD, "test" , 3 )

IniWrite("pwd.ini", "Host", "PWD", $encryptedHOSTPWD)

Else

$returnWert = MsgBox(5, "Passwortcheck", "Die eingegenen Passwörter stimmen nicht überein!")

Select

Case $returnWert = 4

Call("UserID")

Case Else

MsgBox(64, "Information", "Das Skript wurde beendet", 2)

Exit(0)

EndSelect

EndIf

EndFunc ;==>HostPWD

Func NotesPWD()

$NotesPWD = InputBox("Security Check", "Bitte geben Sie das Notes-Passwort ein:", "", "*", 220, 130)

If @error = 1 Then

MsgBox(64, "Information", "Das Skript wurde beendet", 2)

Exit

EndIf

$NotesPWD2 = InputBox("Security Check", "Bitte geben Sie das Notes-Passwort erneut ein:", "", "*", 220, 130)

If @error = 1 Then

MsgBox(64, "Information", "Das Skript wurde beendet", 2)

Exit

EndIf

if $NotesPWD = $NotesPWD2 Then

$encryptedNotesPWD = _StringEncrypt ( 1, $NotesPWD, "encrypthelp" , 3 )

IniWrite("pwd.ini", "Notes", "PWD", $encryptedNotesPWD)

Else

$returnWert = MsgBox(5, "Passwortcheck", "Die eingegenen Passwörter stimmen nicht überein!")

Select

Case $returnWert = 4

Call("UserID")

Case Else

MsgBox(64, "Information", "Das Skript wurde beendet", 2)

Exit(0)

EndSelect

EndIf

EndFunc ;==>NotesPWD

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

First may i say tthanks for all your feedback.

Also thanks Kurt for leting me know about that book. Would be a good challenge to read and undersand.

All i would like is a simple encrytion script... once i can learn the basics, i can adapt and try to learn more from what you made.

I Would like to say, thanks to cameronsdad, it is apreciated if you can help me.

I just never knew if autoit could decrypt a txt file.

I can't wait to see what you can whip up.

Also may i ask how do you input the location of the txt file to encrypt.

Im guessing you would make a input box and use the inputed data to tell the script to get that file.

But how would you make it encrypt the data?

Thanks.

Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Link to comment
Share on other sites

First may i say tthanks for all your feedback.

Also thanks Kurt for leting me know about that book. Would be a good challenge to read and undersand.

If you're interested in cryptography, I can recommend CrypTool: http://www.cryptool.com/. A pretty good learning tool.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

Hi,

why do you want to do encryption with autoit? There are freeware tools doing that 4 u.

Maybe I can write a script for you that encrypts a txt-file or decrypts a txt-file.

That is a nice tasks for me to learn more about autoit, cause I just started learning und now I automated all me logins and now I looking forward to some new stuff. ;)

So long,

Mega

P.S.: What about _StringEncrypt ???

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Thanks for the info and the site Kurt. Ill look into it... but first i would like to try it wth autoit.

The reason i want todo it with autoit.

Well it sounds like fun and you can make it yourself... but sadly i do not know enough about making a encryptor in autoit.

Its also good to test how far autoit can go.

Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Link to comment
Share on other sites

First may i say tthanks for all your feedback.

Also thanks Kurt for leting me know about that book. Would be a good challenge to read and undersand.

All i would like is a simple encrytion script... once i can learn the basics, i can adapt and try to learn more from what you made.

I Would like to say, thanks to cameronsdad, it is apreciated if you can help me.

I just never knew if autoit could decrypt a txt file.

I can't wait to see what you can whip up.

Also may i ask how do you input the location of the txt file to encrypt.

Im guessing you would make a input box and use the inputed data to tell the script to get that file.

But how would you make it encrypt the data?

Thanks.

<{POST_SNAPBACK}>

i apologize that this is taking so long, i've been working all day and the phones haven't given me a break. i'm coding a simple cypher program, but if you'd like a site to play with, you could use dale's IE.au3 to interact with this page that's just a web based tool (by someone else) that i put on my site to play wtih...
Link to comment
Share on other sites

cameronsdad.

Calm down and take your time, i can wait as i have to go to school in 9 hours.

Its sad only being 15 and having to go to school.

I have currently installing windows 95 on my psp and guess what.

Autoit works on it.

Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Link to comment
Share on other sites

cameronsdad.

Calm down and take your time, i can wait as i have to go to school in 9 hours.

Its sad only being 15 and having to go to school.

I have currently installing windows 95 on my psp and guess what.

Autoit works on it.

<{POST_SNAPBACK}>

here we go, sorry it took so long... this is just the encryption side, doing a decryption side wouldn't be too hard, but i thought i'd let you have SOME of the fun. here's how it works. you give it a text file to encrypt, then it will ask what you want each letter replaced with... originally i wanted so that if you gave the same thing twice it'd correct you, but that is kind of hanging up right now... easy fix is not to use the same letter twice... you could easily convert this to read in a key file to use, but i went with this method because it allows you to assign any string to replace a letter. example you can replace "a" with "xog" instead of just having a straight transfer...it leaves normal punctuation and hyphenation alone, and at the end of the file, it writes the key spread out over 26 lines. Not very secure, but that can be easily modified to create a key file instead of writing to the same file, for use with decryption. here is the code.

Opt("TrayIconDebug",1)
$INPUT = FileOpen(FileOpenDialog("File To Encrypt","c:\","All (*.*)",7),0)
global $key[27][27]
$letters = StringSplit("abcdefghijklmnopqrstuvwxyz","")
$x = 1
while $x <= 26
    $key[$x][1] = $letters[$x]
    if $key[$x][2] = "" then 
        $cypher = InputBox("Key","What letter would you like to replace " & $letters[$x] & " with?",$letters[26 - ($x-1)])
        $key[$x][2] = $cypher
    EndIf
    for $y = 1 to $x-1
        if $key[$y][2] = $cypher Then
            $key[$y][2] = ""
            $key[$x][2] = $cypher
            $x = $y-1
            MsgBox(0,"error","You already had " & $cypher & " assigned to " & $key[$y][1] & ".  That assignment has been removed")
            ExitLoop
        Else
            $key[$x][2] = $cypher
        EndIf
    Next
    $x = $x + 1
WEnd
$output = FileOpen(FileSaveDialog("Output File","c:\","All (*.*)"),2)
While 1
    $chars = FileRead($input, 1)
    if @error = -1 then ExitLoop
    $chars = enc($chars)
    FileWrite($output,$chars)
Wend
FileWrite($output,@crlf)
for $z = 1 to 25
    FileWriteLine($output,$key[$z][2])
Next
FileClose($input)
FileClose($output)
        Func enc($blah)
            if $blah = " " then Return " "
            if $blah = "." then return "."
            if $blah = "?" then Return "?"
            if $blah = "!" then Return "!"
            if $blah = "-" then Return "-"
            FOR $X = 1 to 26
                if $key[$x][1] = StringLower($blah) then Return $key[$x][2]
            Next
        EndFunc
Link to comment
Share on other sites

hey

thanks a lot.

Now what i need to do is make a gui for it.

thanks for the help.

<{POST_SNAPBACK}>

i thought about doing this with a gui, but with all of the controls necessary, i decided it was too much work for a demonstration like i was going for, and it's rough for me writing at work because i never get more than 5 minutes at a time to work on anything other than the stuff they're paying me to do... If you feel like writing up the gui, i'll be happy to help if you run into problems.
Link to comment
Share on other sites

Ill write the gui no prob.

But there is one thing.

What is the script for a

Encryption txt file.

the location box. c.. and so on with a browse function.

I hope you can uderstand what i need help with.

Thanks.

<{POST_SNAPBACK}>

i think you're talking about the FileOpenDialog() and FileSaveDialog() functions...

yes? full documentation in the help file for those if that's what you're looking for...

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...