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 


Random password generator

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code
View previous topic :: View next topic  
Author Message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Mon Dec 31, 2001 8:10 am    Post subject: Random password generator Reply with quote

Here's a VDS 4 script to generate a list of random passwords. The passwords will all consist of 6 characters and 2 numbers.

Code:

  %%count = 300

  %%chars1 = "abcdefghijklmnopqrstuvwxyz"
  %%chars2 = "0123456789"

  option decimalsep,.
  option fieldsep,.
  parse "%%day;%%part",@datetime()
  random @format(@fmul(@fdiv(%%part,%%day),1.1),10.0)

  list create,1
  %n = 1
  repeat
    %%password =
    %i = 1
    repeat
      %%password = %%password@substr(%%chars1,@random(1,@len(%%chars1)))
      %i = @succ(%i)
    until @equal(%i,7)
    %i = 1
    repeat
      %%password = %%password@substr(%%chars2,@random(1,@len(%%chars2)))
      %i = @succ(%i)
    until @equal(%i,3)
    list add,1,%%password
    %n = @succ(%n)
  until @equal(%n,@succ(%%count))
  list savefile,1,list.txt
  list close,1



Tommy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code 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