Jump to content



Photo

Simple Encryption/decryption


  • Please log in to reply
6 replies to this topic

#1 bcording

bcording

    Adventurer

  • Active Members
  • PipPip
  • 133 posts

Posted 07 March 2004 - 11:24 AM

This encryption is designed to only allow the decryption to be performed by the same user on the same machine. This can be changed by changing the passphrase. I wouldn't use this for anything of extreme importance, but it will keep simple passers by from reading your data. I hope :whistle:

Plain Text         
Func Encrypt($UnCooked)    Local $B, $S, $P    Local $A1, $A2, $A3, $I, $j    Local $Phrase = @ComputerName & @UserName;This is the passphase    $j = 1    For $I = 1 To StringLen($Phrase)      $P = $P & Asc(StringMid($Phrase, $I, 1))    Next    For $I = 1 To StringLen($UnCooked)      $A1 = Asc(StringMid($P, $j, 1))      $j = $j + 1      If $j > StringLen($P) Then $j = 1      $A2 = Asc(stringMid($UnCooked, $I, 1))      $A3 = BitXor($A1, $A2)      $B = Hex($A3,2)      If stringLen($B) < 2 Then $B = "0" + $B      $S = $S & $B    Next    Return $S EndFunc Func Decrypt($Cooked)    Local $Phrase = @ComputerName & @UserName;This is the passphase    Local $B, $S, $P, $A1, $A2, $A3, $i, $j    $j = 1    For $i = 1 To StringLen($Phrase)      $P = $P & Asc(StringMid($Phrase, $i, 1))    Next    For $i = 1 To StringLen($Cooked) Step 2      $A1 = Asc(StringMid($P, $j, 1))      $j = $j + 1      If $j > StringLen($P) Then $j = 1      $b = StringMid($Cooked, $i, 2)      $A3 = Dec($b)      $A2 = BitXor($A1, $A3)      $S = $S & Chr($A2)    Next    Return $S EndFunc






#2 emmanuel

emmanuel

    No one ever accused me of being normal.

  • Active Members
  • PipPipPipPipPipPip
  • 1,128 posts

Posted 18 May 2004 - 07:08 PM

coolness, though I'd suggest using the MAC address over the computername... I could rename my computer to something else and create a local user account with a duplicate name... but mac addresses are forever :D
"I'm not even supposed to be here today!" -Dante (Hicks)

#3 scriptkitty

scriptkitty

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,274 posts

Posted 18 May 2004 - 08:01 PM

but mac addresses are forever


Not Really, I can set my MAC address to anything I want.
Quick google search would show ya.

:D ?

No, I bought a new network card and the cable company sucks for changing MAC addresses.

Now with the days of (if I get the term right) WarDriving, the MAC address emulators are very common.
AutoIt3, the MACGYVER Pocket Knife for computers.

#4 emmanuel

emmanuel

    No one ever accused me of being normal.

  • Active Members
  • PipPipPipPipPipPip
  • 1,128 posts

Posted 18 May 2004 - 08:16 PM

oh, really? well, nifty to know... harder still than just renaming.
"I'm not even supposed to be here today!" -Dante (Hicks)

#5 SlimShady

SlimShady

    AutoIt lover

  • Active Members
  • PipPipPipPipPipPip
  • 2,383 posts

Posted 18 May 2004 - 09:17 PM

What I know: There are 2 MAC-addresses.
one in your network card (hardcoded)
one in your modem (hardcoded)

Can you explain how your ISP operator can change your MAC?

#6 moocan

moocan

    Seeker

  • New Members
  • 8 posts

Posted 03 June 2004 - 06:55 PM

Hi,

I'm a beginner, and I search how to encrypt a INI file which contains parameters and that only Auto it could uncrypt to read parameters ..

If possible is ot possible with your script and how ?

Thanks
MooCan

#7 Guest_Ezzetabi why cant log in when re_*

Guest_Ezzetabi why cant log in when re_*
  • Guests

Posted 03 June 2004 - 08:18 PM

What I know: There are 2 MAC-addresses.
one in your network card (hardcoded)
one in your modem (hardcoded)

Can you explain how your ISP operator can change your MAC?

The Mac hardcoded cant be changed,
but you can force Windows believe you have the Mac you want.
Just Smac it.

http://www.cypherspace.org/adam/rsa/idea.html




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users