_MM_IKKE

[mIRC] Random Password Generator

May 30th, 2013
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.33 KB | None | 0 0
  1. /*
  2. THIS SCRIPT HAS BEEN MADE BY [MM]IKKE
  3. DO NOT DELETE ANY OF THESE CREDITS
  4.  
  5. USAGE
  6. -----------
  7. 1. Copy-paste this to your remote tab (mIRC) in scripts editor.
  8. 2. Type /pass to generate a random password. It will ask if it should use special characters or not. You can specify the amount of characters in the first parameter ("/pass 10")
  9. 3. The password will be displayed in mIRC and copied to your clipboard.
  10. 4. Enjoy!
  11. */
  12.  
  13. alias pass {
  14.   ;Syntax: <opt: amount of characters)
  15.   ;Usage: generates a random password
  16.  
  17.   set %pass.tmp $null
  18.   var %i = 1
  19.  
  20.   if ($1 !isnum) { var %length = $rand(20,30) }
  21.   else { var %length = $1 }
  22.  
  23.   if ($?!="Use special characters? $crlf $crlf $+ : ; < = > ? @ [ \ ] ^ _ ` * + , - . / $chr(39) ( ) ! $chr(35) $chr(36) $chr(37) $chr(38) ") {
  24.     while (%i <= %length) {
  25.       set %pass.tmp %pass.tmp $+ $chr($rand(33,122))
  26.       inc %i
  27.     }
  28.   }
  29.   else {
  30.     while (%i <= %length) {
  31.       var %j = $rand(1,3)
  32.       if (%j == 1) {
  33.         set %pass.tmp %pass.tmp $+ $chr($rand(97,122))
  34.       }
  35.       elseif (%j == 2) {
  36.         set %pass.tmp %pass.tmp $+ $chr($rand(65,90))
  37.       }
  38.       else {
  39.         set %pass.tmp %pass.tmp $+ $chr($rand(48,57))
  40.       }
  41.       inc %i
  42.     }
  43.   }
  44.  
  45.   clipboard %pass.tmp
  46.   echo -at Random password:4 %pass.tmp 1(copied to clipboard)
  47.   unset %pass.tmp
  48. }
Advertisement
Add Comment
Please, Sign In to add comment