Jump to content

Password Safer


jaenster
 Share

Recommended Posts

#include <String.au3>
#include <GUIConstants.au3>
guicreate("Password / username crypting")
$userI =guictrlcreateinput("Username",10,10,200,20)
$PassI =guictrlcreateinput("Password",10,30,200,20)
$FileI =Guictrlcreateinput("FilePath",10,50,200,20)
$Check =guictrlcreatebutton("Check",10,70,100,20)
$safe  =guictrlcreatebutton("Safe",110,70,100,20)
guisetstate()
While 1
    $msg = GUIGetMsg()
    if $msg = $GUI_EVENT_CLOSE Then
        Exit
    endif
    if $msg = $check Then
        msgbox(0,"Checking..","Startup")
        $user = guictrlread($userI)
        $pass = guictrlread($passI)
        $File = guictrlread($FileI)
        $Id = FileOpen($File,0)
        $size = filegetsize($file)
        $Read = fileread($id,$size)
        fileclose($id)
        msgbox(0,"Checking..","Start Crypt process")
        $return = _stringtohex(Crypt(1,$user,$pass))
    ;$return = crypt(0,$read,$pass)
        if $return = $read Then
            msgbox(0,"Checking..","Done , Succes!")
        Else
            msgbox(0,"Checking..","Done , Password // user name is not correct"&@crlf&$return&@crlf&$read)
        endif
    endif
    if $msg = $safe Then
        $user = guictrlread($userI)
        $pass = guictrlread($passI)
        $File = guictrlread($FileI)
        filedelete($file)
        $Id = FileOpen($File,2)
        filewrite($id,_stringtohex(crypt(1,$user,$pass)))
        fileclose($id)
    endif
wend



;----------------------------------------------------
;| CrytTool by jaenster
;|Input Crypt   : $do , 0 = Decrypt , 1 = Crypt
;|          : $t , The Text to crypt
;|          : $pw , The password
;------------------------------------------------------
func crypt($Do,$t,$pw)
   if $do = 0 then;Decrypt
   return _crypttool(_crypttool2($t,$pw))
   endif
   if $do = 1 then;Crypt
   return _crypttool2(_crypttool($t),$pw)
   endif
endfunc
;This are the subfuncions of CrytIT
func _crypttool($t)
   $Terug = ""
   $t = _ReturnOtherWish($t)
   for $i = 1 to stringlen($t)
   $Nummer = asc(stringmid($t,$i,1))
   if $Nummer < 128 then
   $Terug = $Terug &chr(128+$nummer)
   EndIf
   if $nummer >= 128 then
   $Terug = $Terug &chr($Nummer-128)
   endif
   next
   return $terug
endfunc
func _crypttool2($t,$pw)
   $Terug = ""
   $Max = stringlen($pw)
   $c = 1
   for $i = 1 to stringlen($t)
    $c = $c + 1
    if $c >= $max then
        $c = 1
    endif
    $Terug = $Terug & chr(BitXOR(asc(stringmid($t,$i,1)),asc(stringmid($pw,round($c),1)))&"  ")   
   next
   return $Terug
endfunc; ==> Crypt 2
func _ReturnOtherWish($t)
   $terug = ""
   for $i = StringLen($t) to 1 step -1
      $terug = $terug & stringmid($t,$i,1)
   next
   return $Terug
endfunc

For if you want to safe someone password on your server :)

With a server - client app..

Note : You can only brute force this script , ONLY ... you need weeks / days too decrypt this .. :(

-jaenster

Link to comment
Share on other sites

LMFAO this is awesome because i was thinking of making something were i would need to safe some passwords. I was gonna make a something like a instant messenger or at least attempt one. But happying safing of the files!!!

50% of the time, it works all the time

Link to comment
Share on other sites

  • 4 months later...

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...