forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Couple of questions here... keygenerator etc

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Fri Feb 21, 2003 5:32 am    Post subject: Couple of questions here... keygenerator etc Reply with quote

Uhm, just me again.
I want to make a keygenerator program that I also want to embedd into my program.

What I would like to do is to take a users email address and turn it into a serial. I've seen this done in alot of other programs and really like this system.

Could anyone help me with this?

Also, and alittle simpler, how can I check if a file exists?
Let's say I wanna check if filename.txt exists in @path(%0) and pass the result to a variable... Any help guys?

Oh yeah, one more thing. If I create a text object and types in some info in it like this:

Programname
Version
etc etc
email
website

is it possible to add that into one text object, at the same time make the email and website links to open in browser and the email app?

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1567

PostPosted: Fri Feb 21, 2003 6:04 am    Post subject: Reply with quote

An easy way to make a keygenerator is to take the @asc() ascii value of each character one at a time (in this case an email address) and then output a set of numbers which represent that email address. For instance the output would be something like: 24259283240234 which represent the ascii equivelent of the email address. However this is not very safe and a crack/hacker would figure this out very very quickly. You can perform some mathmatical functions on that output such as multiplying it by 9 or another set of numbers then doing more math on it to modify it's output.

But a more safe and easy way is by using encryption as a way to protect your serials/keys, there are examples here on the forum on how to use a vds made encryption http://www.vdsworld.com/archive/index.php?page=topic&board=3&topic=57 and http://www.vdsworld.com/archive/index.php?page=topic&board=3&topic=107

Or you can take a look at the blowfish extension (high level encryption), and the vdsinout extension (basic encryption).

As for finding if a file exists use the following code:

Code:

if @file(c:\whatever.txt)
  warn file exists
else
  warn file does not exist
end


In regards to your last question ahh I think you want to open a browser and an email program at the same time?

Code:

shell open,http://www.whatever.com
shell open,"mailto:whatever@doman.com?subject=hello world&body=http://www.whatever.com"
Back to top
View user's profile Send private message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Fri Feb 21, 2003 7:29 am    Post subject: Reply with quote

Thanks alot for your help Smile

I really like the one about the ascii values and doing math on the result Smile

About the file exist, do I have to specify the full path even if the file is in the same dir as the program?

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Fri Feb 21, 2003 8:10 am    Post subject: Reply with quote

Oops, sorry, forgot to respond to the text thing.
No, that's not what I ment.
If I add a dialog right? and then add a text object.
The I write some text in the text object. Is it possible to make some of the text into links? Or to have action function?

Damn, I feel stupid Laughing
Here is what I got so far with the ascii conertion thingy
Code:
%%String = "email@address.com"
%T = @ASC(%%String)


Now, how to get the darn thing to converting every character?

I'm so tired now.
I was trying to edit a script in VDS and I can't make a new line in the editor. Laughing

Guess why... Idea
The program was running in the background. Laughing

BTW, what's the difference between these?
%%String = "email@address.com"
%%String = email@address.com

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Fri Feb 21, 2003 8:34 am    Post subject: Reply with quote

GeoTrail wrote:
Here is what I got so far with the ascii conertion thingy
Code:
%%String = "email@address.com"
%T = @ASC(%%String)


Now, how to get the darn thing to converting every character?


Try this
Code:
%%String = "email@address.com"
repeat
  %T = @ASC(%%String)
  %%out = %%out%T
  %%String = @strdel(%%String,1)
until @null(%%String)
info %%out


Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Fri Feb 21, 2003 8:40 am    Post subject: Reply with quote

GeoTrail wrote:

BTW, what's the difference between these?
%%String = "email@address.com"
%%String = email@address.com


In this case - none. But otherwise you will use quotes to preserve spaces in paths or other strings or to make
sure that some characters are preserved. Try this example

Code:
INFO This is a test and here is a comma, - the end
INFO "This is a test and here is a comma, - the end"


If you don't quote the comma here, VDS will just break the string there.

Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing


Last edited by Dr. Dread on Fri Feb 21, 2003 8:43 am; edited 1 time in total
Back to top
View user's profile Send private message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Fri Feb 21, 2003 8:42 am    Post subject: Reply with quote

Nice one.
Thanks alot Dr. Dread Smile

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1754
Location: Space and Time

PostPosted: Fri Feb 21, 2003 12:14 pm    Post subject: Reply with quote

If you want to make shareware, you can look into my VDSReg program. It can create shareware out of VDS scripts and create registration keys as well. Just a thought. Wink See in my sig.
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Fri Feb 21, 2003 5:02 pm    Post subject: Reply with quote

Very nice. I like it.
But I really want to make my own.
It's not to make a big pro app, but mostly as this is my first VDS project, I want to use this project to learn by. Know what I mean?

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1754
Location: Space and Time

PostPosted: Fri Feb 21, 2003 9:27 pm    Post subject: Reply with quote

Sure no prob. I just thought I would let you know it was there. Wink

Have fun with VDS. It is a great tool Exclamation

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Fri Feb 21, 2003 9:50 pm    Post subject: Reply with quote

Yeah, can't disagree with that Wink
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
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 can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group