Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Delphi Password protection tutorial Update 22 dec
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
tarochanpan
Master Cheater
Reputation: 0

Joined: 25 Jan 2007
Posts: 285
Location: up your arse XD

PostPosted: Sat Aug 18, 2007 9:38 pm    Post subject: Delphi Password protection tutorial Update 22 dec Reply with quote

Updated 22 dec 207
*added how to use multiply text boxes
* how to change to form name when passoword is correct


Ever wanted to be able to go back to a website but keep it secret to the others okay all u have to do is this tutorial

First up make your form any size you want
http://i154.photobucket.com/albums/s240/tarochanpan/1.jpg

then Add a Edit box and a button
http://i154.photobucket.com/albums/s240/tarochanpan/2.jpg

ok now get the site you want to password protect and copy the site in notepad (i will be using Google for this tutorial)
http://i154.photobucket.com/albums/s240/tarochanpan/3.jpg

now go up to Uses and type in Shellapi
http://i154.photobucket.com/albums/s240/tarochanpan/4.jpg

ok now double click on the edit box and type this code in

Code:
if edit1.text = 'simon'then
begin
ShellExecute(Handle, 'open','http://www.google.com', nil, nil, SW_SHOWNORMAL) ;


so this techinaly means if edit box 1 has simon typed into it when it you press the button it will got to http://www.google.com

My whole code


Code:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ShellAPI;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
if edit1.text = 'simon'then
begin
ShellExecute(Handle, 'open','http://www.google.com', nil, nil, SW_SHOWNORMAL) ;
end;

end;
end.


this is about the simplest program you can make

If you want to make the program so it opens 2 sites at once put another shellexecute under it like this

Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
if edit1.text = 'simon'then
begin
ShellExecute(Handle, 'open','www.cheatengine.org', nil, nil, SW_SHOWNORMAL) ;
ShellExecute(Handle, 'open','www.google.com', nil, nil, SW_SHOWNORMAL) ;
end;

end;
end.



ups2000ups little bit. okay if u want something to happen if they type in the wrong pass put in this code

Code:
else
if edit1.text <> 'password' then
label3.caption := 'wrong'



A little extra if you wanna make the words typed intothe box look like
* that then double click the edit box and add this code

Code:
edit1.passwordchar:=  '*';

u can change the * to other things as well

my updated code (after added everything in my tut and a little extras)

Code:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ShellAPI;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure Edit1Change(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
if edit1.text = 'simon'then
ShellExecute(Handle, 'open','www.cheatengine.org', nil, nil, SW_SHOWNORMAL) ;
ShellExecute(Handle, 'open','www.google.com', nil, nil, SW_SHOWNORMAL) ;
else
if edit1.text <> 'password' then
label3.caption := 'wrong'
end;

procedure TForm1.Edit1Change(Sender: TObject);
begin
edit1.PasswordChar := '*';
end;

end.
end.


if u want to instead of the label have something say its incorrect have this code instead

Code:
if edit1.text = 'simon'then
ShellExecute(Handle, 'open','www.google.com', nil, nil, SW_SHOWNORMAL)
ShellExecute(Handle, 'open','www.cheatengine.org', nil, nil, SW_SHOWNORMAL)
else
Messagedlg('Incorrect Password', mterror, [mbok], 0);
end;


To use multpile text boxes use this

Code:
var s: string;
begin
s := Edit1.Text+Edit2.Text+Edit3.Text;
if (s) = 'hellofredyou' then
begin
ShellExecute(Handle, 'open','www.google.com', nil, nil, SW_SHOWNORMAL) ;


To change the form name wehn the password is correct use this:
Code:
if edit1.text = 'simon'then
form1.name := "Random text';



Credits to symbol for the extra bit, ups2000ups for the ups2000ups bit and for me for the tutorial

_________________




Last edited by tarochanpan on Sat Dec 22, 2007 9:38 pm; edited 11 times in total
Back to top
View user's profile Send private message MSN Messenger
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Sat Aug 18, 2007 9:54 pm    Post subject: Reply with quote

whats the use? u will see its google after its opend not a secret O_o
and u can open ur webbrowser and type google.com Surprised
well, thats pretty easy u should add something like a crackme if u crack the password it browse to a site like xnxx O_o lol
u can add a password char like **** but u can change it to 1111111 or any char u want Razz

edit1.passwordchar:= ; if im not wrong...
Back to top
View user's profile Send private message
tarochanpan
Master Cheater
Reputation: 0

Joined: 25 Jan 2007
Posts: 285
Location: up your arse XD

PostPosted: Sat Aug 18, 2007 9:55 pm    Post subject: Reply with quote

Symbol wrote:
whats the use? u will see its google after its opend not a secret O_o
and u can open ur webbrowser and type google.com Surprised
well, thats pretty easy u should add something like a crackme if u crack the password it browse to a site like xnxx O_o lol
u can add a password char like **** but u can change it to 1111111 or any char u want Razz

edit1.passwordchar:= ; if im not wrong...



i just used google as an example 0.o
edit: and my code works perfectly
edit2:thanks for the advice
edit3: adding the little bit you told me to the tutorial

_________________


Back to top
View user's profile Send private message MSN Messenger
Lo elmo
How do I cheat?
Reputation: 0

Joined: 19 Aug 2007
Posts: 2

PostPosted: Sun Aug 19, 2007 12:07 am    Post subject: Reply with quote

thank you for this rep you as soon as possible
Back to top
View user's profile Send private message
ups2000ups
I post too much
Reputation: 0

Joined: 31 Jul 2006
Posts: 2471

PostPosted: Sun Aug 19, 2007 1:12 am    Post subject: Reply with quote

the password is easy to crack with ollydbg =D

do a security thing

edit1 option
Quote:

if edit1.text = 'password' then
GoToGoogleButton.click;

GoToGoogleButton option
Quote:

if edit1.text = 'password' then
ShellExecute(Handle, 'open','http://www.google.com', nil, nil, SW_SHOWNORMAL)
else
if edit1.text <> 'password' then // if the guy who cracked it is stupid and missed to change the bouth stings lol
application.messagebox ('Something is wrong','error')
else
if edit1.text = '' then // if they deleted the password
application.messagebox ('Something is wrong','error');
[/quote]
_________________
dont complain about my english...
1*1 = 2?
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sun Aug 19, 2007 1:15 am    Post subject: Reply with quote

ups2000ups wrote:
the password is easy to crack with ollydbg =D


any password/method is. your 'security' means nothing, it'll just make you feel better (and in turn feel worse when you get 0wn3d for investing too much trust in a flawed system)
Back to top
View user's profile Send private message
ups2000ups
I post too much
Reputation: 0

Joined: 31 Jul 2006
Posts: 2471

PostPosted: Sun Aug 19, 2007 1:18 am    Post subject: Reply with quote

appalsap wrote:
ups2000ups wrote:
the password is easy to crack with ollydbg =D


any password/method is. your 'security' means nothing, it'll just make you feel better (and in turn feel worse when you get 0wn3d for investing too much trust in a flawed system)



i know -.- but my way make you cant use a password with '' text and if they dosent change bout 'password' they wont be able to use it anyway

btw i dont like you and stop make use of ur mod position

_________________
dont complain about my english...
1*1 = 2?
Back to top
View user's profile Send private message
muffinman177
Master Cheater
Reputation: 0

Joined: 09 Dec 2006
Posts: 377
Location: Drury Lane

PostPosted: Mon Aug 20, 2007 2:32 pm    Post subject: Reply with quote

How would you open multiple websites with one button?
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Mon Aug 20, 2007 2:45 pm    Post subject: Reply with quote

in the same window?
ie 7 tabs?
make an internet browser with multiple webbrowsers?
or in seperate windows use 2 url's to execute
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Mon Aug 20, 2007 2:46 pm    Post subject: Reply with quote

muffinman177 wrote:
How would you open multiple websites with one button?


build an array of strings and loop through that array calling ShellExecute on each element
Back to top
View user's profile Send private message
tarochanpan
Master Cheater
Reputation: 0

Joined: 25 Jan 2007
Posts: 285
Location: up your arse XD

PostPosted: Mon Aug 20, 2007 11:29 pm    Post subject: Reply with quote

To open to things at one all you have to do is add another shellexecute after the first one so like this

Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
if edit1.text = 'simon'then
begin
ShellExecute(Handle, 'open','www.cheatengine.org', nil, nil, SW_SHOWNORMAL) ;
ShellExecute(Handle, 'open','www.google.com', nil, nil, SW_SHOWNORMAL) ;
end;

end;
end.


adding this to my tut
And going to watch movie ping pong XD

_________________


Back to top
View user's profile Send private message MSN Messenger
muffinman177
Master Cheater
Reputation: 0

Joined: 09 Dec 2006
Posts: 377
Location: Drury Lane

PostPosted: Tue Aug 21, 2007 2:39 pm    Post subject: Reply with quote

If I put
Code:

end else
begin
Messagedlg('Incorrect Password', mterror, [mbok], 0);


after the shell executes, it keeps saying incorrect password after every letter. How do I program it to wait until you click button1
Back to top
View user's profile Send private message
tarochanpan
Master Cheater
Reputation: 0

Joined: 25 Jan 2007
Posts: 285
Location: up your arse XD

PostPosted: Tue Aug 21, 2007 11:23 pm    Post subject: Reply with quote

muffinman177 wrote:
If I put
Code:

end else
begin
Messagedlg('Incorrect Password', mterror, [mbok], 0);


after the shell executes, it keeps saying incorrect password after every letter. How do I program it to wait until you click button1


dont put the end so the code is like this

Code:
if edit1.text = 'simon'then
ShellExecute(Handle, 'open','www.google.com', nil, nil, SW_SHOWNORMAL)
else
Messagedlg('Incorrect Password', mterror, [mbok], 0);
end;


thats works perfectly

_________________


Back to top
View user's profile Send private message MSN Messenger
muffinman177
Master Cheater
Reputation: 0

Joined: 09 Dec 2006
Posts: 377
Location: Drury Lane

PostPosted: Wed Aug 22, 2007 1:44 pm    Post subject: Reply with quote

That's what I did, after every letter it says incorrect password. Like as soon as you type in "S" for Simon, it'll say incorrect.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Wed Aug 22, 2007 6:21 pm    Post subject: Reply with quote

I don't really know Delphi, but you probably put it after some kind of Text Changed event or something similar.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites