Jump to content
Sign in to follow this  
Noviceatthis

Encrypt web address

Recommended Posts

Noviceatthis

Hello all

I made this a while back:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Crypt.au3>
#region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("Enter Password", 616, 133, 192, 124)
GUISetBkColor(0x000080)
$Label1 = GUICtrlCreateLabel("Enter Password", 8, 8, 598, 33, BitOR($SS_CENTER, $SS_CENTERIMAGE, $SS_SUNKEN))
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFFFF00)
GUICtrlSetBkColor(-1, 0x008080)
$Input1 = GUICtrlCreateInput("", 8, 80, 593, 21)
$Button1 = GUICtrlCreateButton("Correct Password", 344, 64, 257, 49)
GUICtrlSetState($Button1, $GUI_HIDE)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###

$v = 0
$x = 0

$passwordhash = "0x5F4DCC3B5AA765D61D8327DEB882CF99"

While 1
$Answer = GUICtrlRead($Input1)
If _Crypt_HashData($Answer,$CALG_MD5) = $passwordhash Then
If $v <> 0 Then
Sleep(20)
Else
func1()
EndIf
Else
if $v <> 0 Then
GUICtrlSetState($Button1, $GUI_HIDE)
GUICtrlSetPos($Input1, 8, 80, 593, 21)
$v = 0
Else
Sleep(20)
EndIf
EndIf



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

Case $Button1
ShellExecute("www.google.com")
Exit

EndSwitch
WEnd


Func func1()
If _Crypt_HashData($Answer,$CALG_MD5) = $passwordhash Then
GUICtrlSetPos($Input1, 8, 80, 313, 21)
GUICtrlSetState($Button1, $GUI_SHOW)
$v = 2
EndIf
EndFunc   ;==>func1

I was just wondering whether there was a way of encrypting the web address in the same way as the password

Thanks in advance

Share this post


Link to post
Share on other sites
JohnOne

Not unless you decrypt it first, and with the function you are using (_Crypt_HashData), I don't think there is a decrypt for it.

So you'd need to use use some other encryption method which can be decrypted with a key, you will have to..

1. store the key in script.

2. ask user to input it.

3. some other method of getting key from external location.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
BrewManNH

If you're trying to hide the URL it's going to, it isn't going to do much good if you obfuscate it, because it's fairly easy to figure out what site it's going to go to if the user has enough smarts to be able to sniff the network.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
Noviceatthis

thanks for the replies

JohnOne what other encryption methods are there?? I don't mean to be annoying but im oblivious when it comes to encryption methods, would other functions in the Crypt.au3 file suffice??

Edited by Noviceatthis

Share this post


Link to post
Share on other sites
Noviceatthis

JohnOne

Thank you very much :)

Share this post


Link to post
Share on other sites
Clark

If you just want to "hide" the url so it is not obvious, you could always use url obfuscation.

Google will show you many methods.

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  

×