Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • King Bosnia: Any recommendations to private servers?
      October 18, 2018, 04:47:35 PM
    • FightMexoxo: oi i have the files if anyone whats em
      October 18, 2018, 12:44:42 AM
    • The Wanderer: Whoops
      October 15, 2018, 12:56:18 AM
    • The Wanderer: Making own operating system
      October 15, 2018, 12:56:11 AM
    • Travas: no
      October 07, 2018, 04:03:36 PM
    • Saltyspade10: Server still up and running?
      October 05, 2018, 07:13:41 PM
    • Wesam: Can someone upload moparscape.jar?
      October 05, 2018, 11:43:43 AM
    • Ligoe: yo
      September 30, 2018, 12:48:15 PM
    • Ligoe: how come i can't login the game
      September 30, 2018, 12:48:03 PM
    • fuzzout: Anybody here with experience in using Luna source? I'm looking to develop something, but can't seem to get any of my clients to work with it...
      September 26, 2018, 10:47:27 AM
    • `Discardedx2`: ?
      September 21, 2018, 12:24:09 PM
    • Pookey71: ARE YOU HERE TO RECEIVE MY LIMP PENIS!?
      September 20, 2018, 11:55:24 PM
    • Pookey71: THIS IS DEMOCRACY MANIFESTO
      September 20, 2018, 11:55:07 PM
    • Vasi28: Гранд
      September 03, 2018, 07:06:22 PM
    • Rash: test
      August 30, 2018, 09:09:18 PM
    • Guruu:[link]
      August 30, 2018, 12:04:45 AM
    • Guruu: am i allowed to post links shoutbox?
      August 30, 2018, 12:03:46 AM
    • drubrkletern:[link] feedback wanted
      August 28, 2018, 03:55:17 PM
    • bugz000: Anyone got a link for the old ass silab client and cache.zip? from mopar 3.2 era :) 317
      August 25, 2018, 12:48:15 AM
    • cholland2015: Does anyone know where I can download the old moparscape client/server?
      August 24, 2018, 02:30:51 PM

    Author Topic: Insane Random Key Generator With notepad limited ++  (Read 494 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineSpecial Air Service

    • Member
    • ***
    • Posts: 103
    • Thanks: +0/-0
      • View Profile
    Insane Random Key Generator With notepad limited ++
    « on: September 11, 2014, 01:19:04 PM »
    Wassup ma peoplez. How was your day? Anyway, we shall proceed
    I have created a wonder peace. A peace of work that is so good facebook want to buy it from me
    (click to show/hide)

    Anyway this has been lurking about the internet for a few seconds.

    And i will give you all the code

    Code: [Select]
    import java.security.SecureRandom;
    import java.util.Scanner;
    /**
     * This class is insane. This may have been released before
     * but here it is creeping up on Y'all again.
     * I do hope you enjoy this as it was made for
     * educational purposes only and i do not intend to hurt
     * anyone with this simple class
     * @author Zack/Optimum/Special Air Service
     *
     */
    class RandomKeyGenerator {

    /**
    * A list of all the characters that can be put into
    * the key itself
    */
    final static char[] KEYS = {
    '1', '2', '3', '4', '5', '6', '7', '8', '9',
    'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
    'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
    's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
    };

    /**
    * This will register how much times the
    * loopKeys method has been called
    */
    static int loops = 0;

    /**
    * The main method
    * Everything is put together here
    * @param args
    */
    @SuppressWarnings("resource")
    public static void main(String[] args){
    new NotepadLimited();
    Scanner s = new Scanner(System.in);
    System.out.println("Enter the amount of keys you want to generate: ");
    int times = Integer.parseInt(s.nextLine());
    System.out.println("Enter the amount of characters you want in each key: ");
    int characters = Integer.parseInt(s.nextLine());
    System.out.println("Enter the number of characters before you put a dash after: ");
    int dashes = Integer.parseInt(s.nextLine());
    loopKeys(times, characters, dashes);
    }

    /**
    * This will loop the constructKey method
    * @param times
    * The amount if times it will repeat
    * itself
    * @param characters
    * The number of characters that will be in your loop
    * @param dashAfter
    * The number of characters before you put a dash
    */
    static void loopKeys(int times, int characters, int dashAfter){
    while(loops != times){
    constructKey(characters, dashAfter);
    loops++;
    }
    }

    /**
    * This method will construct the key itself to a
    * set number of characters and dashes
    * @param character
    * - The amount of characters that will be in 1 key
    * @param dashAfter
    * - Put a dash after a certain amount of characters
    */
    static void constructKey(int character, int dashAfter){
    int counter = 0;
    int dashCounter = 0;
    for(int i = 0; i < character; i++){
    int rnd = secureRnd(KEYS.length);
    System.out.print(KEYS[rnd]);
    counter++;
    while(counter == dashAfter && dashCounter != ((character / dashAfter) - 1)){
    System.out.print('-');
    counter = 0;
    dashCounter++;
    }
    }
    System.out.print('\n');
    }

    /**
    * This will generate a random number
    * @param number
    * This will be the number to randomise
    * 0-number
    * @return
    * the random number
    */
    static int secureRnd(int number){
    return new SecureRandom().nextInt(number);
    }

    }

    Code: [Select]
    import javax.swing.JFrame;
    import javax.swing.JTextArea;

    public class NotepadLimited extends JFrame{

    private static final long serialVersionUID = 8009645715138191580L;

    JTextArea txtPad = new JTextArea();

    public NotepadLimited(){
    this.setSize(400, 300);
    this.setTitle("Notepad Limited++");
    this.getContentPane().add(txtPad);
    txtPad.setSize(200,300);
    this.setVisible(true);
    }

    }

    and here is a screenshot:
    « Last Edit: September 11, 2014, 01:31:40 PM by Special Air Service »
    Runescape Gambling

    OfflinePure_

    • Member
    • ****
    • *
    • Posts: 4,687
    • Thanks: +0/-0
      • View Profile
    Re: Insane Random Key Generator With notepad limited ++
    « Reply #1 on: September 11, 2014, 01:57:38 PM »
    Is this a troll? If not good job.
    i won the forum
    Runescape Gambling

    OfflineHcoJustin

    • Member
    • ****
    • Posts: 2,400
    • Thanks: +0/-0
      • View Profile
    Re: Insane Random Key Generator With notepad limited ++
    « Reply #2 on: September 11, 2014, 02:13:43 PM »
    Is this a troll? If not good job.
    Of course its a troll
    Runescape Gambling

    OfflineSpecial Air Service

    • Member
    • ***
    • Posts: 103
    • Thanks: +0/-0
      • View Profile
    Re: Insane Random Key Generator With notepad limited ++
    « Reply #3 on: September 11, 2014, 05:20:33 PM »
    Is this a troll? If not good job.

    The notepad is a troll lol the number generator is made because i was bored

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal