Welcome To t0k3k Miring Crew Official Forum
Welcome To t0k3k Miring Crew Official Forum

Silahkan Klik Login Untuk Masuk Di Forum
Atau Klik Register Untuk Menjadi Member Di t0k3k Miring Crew

Welcome To t0k3k Miring Crew Official Forum


 
IndeksPortalCalendarGalleryFAQPencarianAnggotaGroupPendaftaranLogin

Share | 
 

 Advance Password Generator Version 2.0 [SRC][GUI]

Topik sebelumnya Topik selanjutnya Go down 
PengirimMessage
edelweize
Admin
Admin


Jumlah posting : 255
Points : 401
Reputation : 0
Join date : 26.02.10
Age : 23
Lokasi : In This Forum

PostSubyek: Advance Password Generator Version 2.0 [SRC][GUI]   Wed Apr 07, 2010 3:26 am

download
http://www.mediafire.com/?aujmwzmbwgy

untuk running file .jar nya install java dolo........ Big Grin

JRE (Java Runtime Enviroment)

Features:
- Randomly generates secure passwords
- May copy any selected password to your clipboard
- May delete any selected password
- May lengthen any selected password
- May shorten any selected password
- May have a password from 5 characters long to 25 characters long

What got added:
- A new GUI using only codes
- Several new functions and features

Use:
- To have secure passwords for accounts.

Screenshot:


Code:
import java.security.SecureRandom;

import javax.swing.DefaultListModel;
import javax.swing.JOptionPane;
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JList;
import javax.swing.ListSelectionModel;

import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.ClipboardOwner;
import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.Transferable;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class Password_Generator implements ClipboardOwner {

        protected static final int currPassLength = 5;

        protected static SecureRandom srnd = new SecureRandom();
        protected static DefaultListModel DLM = new DefaultListModel();
        protected static JFrame JF = new JFrame("Password Generator by CometJack");
        protected static JButton JB = new JButton("Generate");
        protected static JButton JB2 = new JButton("Copy");
        protected static JButton JB3 = new JButton("Delete");
        protected static JButton JB4 = new JButton("Lengthen");
        protected static JButton JB5 = new JButton("Shorten");
        protected static JList JL = new JList(DLM);
        protected static JPanel JP = new JPanel();

        protected static char[] passChars = { 'a', 'b', 'c', 'd', 'e', 'f',
                  'g', 'h', 'j', 'k', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u',
                  'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
                  'J', 'K','M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
                  'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '@',
                  '*', '[', ']', '%', '$', '#', '!', '^', '&', '(', ')', '`', '~' };

        public static void main(String[] argv) {
         
        JL.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
        JL.setLayoutOrientation(JList.HORIZONTAL_WRAP);
        JL.setVisibleRowCount(5);
        JF.add(JP);
        JP.add(JB);
        JP.add(JB2);
        JP.add(JB3);
        JP.add(JB4);
        JP.add(JB5);
        JP.add(JL);
        JF.pack();
        JF.setLocationRelativeTo(null);
        JF.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JF.setVisible(true);
        JL.setBackground(null);
        JB.addActionListener(new buttonAAction());
        JB2.addActionListener(new buttonBAction());
        JB3.addActionListener(new buttonCAction());
        JB4.addActionListener(new buttonDAction());
        JB5.addActionListener(new buttonEAction());
        }

      static class buttonAAction implements ActionListener {
           
            public void actionPerformed(ActionEvent arg0) {
               StringBuffer SB = new StringBuffer();
               
               for (int iCounterA = 0; iCounterA < currPassLength; iCounterA++) {
                    SB.append(passChars[srnd.nextInt(passChars.length)]);
                }
               
                if (DLM.getSize() < 5){
                   DLM.addElement(SB.toString());
                } else {
                   DLM.clear();
                   DLM.addElement(SB.toString());
                }
               
                /* Something I had, I decided not to use it. You can if you want.
                *
                * final int iOption = JOptionPane.showConfirmDialog(null, "Max passwords listed, clear all passwords?"
                *         , "Error", JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE);
                *    
                *   if (iOption == 0) {*/
               
                JF.pack();
                JF.setLocationRelativeTo(null);
               
            }
           
        }
      
      static class buttonBAction implements ActionListener {

         public void actionPerformed(ActionEvent arg0) {
            Password_Generator PG = new Password_Generator();
            PG.copyToClipboard(DLM.getElementAt(JL.getSelectedIndex()).toString());
            JOptionPane.showConfirmDialog(null, "Password \"" + DLM.getElementAt(JL.getSelectedIndex()).toString() + "\" has been copied."
                       , "Password Copied", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE);
      }
         
   }
      public void copyToClipboard(String data) {
         StringSelection SS = new StringSelection(data);
           Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
           clipboard.setContents(SS, this);
      }
      
      public void lostOwnership(Clipboard arg0, Transferable arg1) {
         
      }
      
      static class buttonCAction implements ActionListener {

         public void actionPerformed(ActionEvent arg0) {
            JOptionPane.showConfirmDialog(null, "Password \"" + DLM.getElementAt(JL.getSelectedIndex()).toString() + "\" has been deleted."
                       , "Password Copied", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE);
            DLM.removeElementAt(JL.getSelectedIndex());
            JF.pack();
                JF.setLocationRelativeTo(null);
      }
      
   }
      
      static class buttonEAction implements ActionListener {

         public void actionPerformed(ActionEvent arg0) {
            DLM.setElementAt(deleteChar(DLM.getElementAt(JL.getSelectedIndex()).toString()), JL.getSelectedIndex());
            JF.pack();
                JF.setLocationRelativeTo(null);
         }
         
         static String deleteChar(String data) {
               StringBuilder SB = new StringBuilder(data);
               if (SB.length() == 5) {
                  return data;
               } else {
               SB.deleteCharAt(SB.length()-1);
               return SB.toString();
               }
           }
      }
      
      static class buttonDAction implements ActionListener {

         public void actionPerformed(ActionEvent arg0) {
     
                DLM.setElementAt(addChar(DLM.getElementAt(JL.getSelectedIndex()).toString()), JL.getSelectedIndex());
                JF.pack();
                JF.setLocationRelativeTo(null);
         }   
   }
      
      static String addChar(String data) {
            StringBuffer SB3 = new StringBuffer(data);
            if (SB3.length() == 25) {
               return data;
            } else {
               SB3.append(passChars[srnd.nextInt(passChars.length)]);
               return SB3.toString();
            }
      }
}


Credit From CometJack @ HF

_________________


Regards,

edelweize
Kembali Ke Atas Go down
Lihat profil user http://t0k3kmiringcrew.forummotion.com/
koya777
Global Moderator
Global Moderator


Jumlah posting : 43
Points : 54
Reputation : 2
Join date : 07.03.10
Lokasi : /etc/passwd

PostSubyek: Re: Advance Password Generator Version 2.0 [SRC][GUI]   Wed Apr 07, 2010 3:28 am

Other Mood
Kembali Ke Atas Go down
Lihat profil user
takecy
V.I.P Member
V.I.P Member


Jumlah posting : 33
Points : 36
Reputation : 1
Join date : 02.03.10
Age : 28
Lokasi : ponorogo

PostSubyek: Re: Advance Password Generator Version 2.0 [SRC][GUI]   Wed Apr 07, 2010 3:47 am

Bad Mood
Kembali Ke Atas Go down
Lihat profil user http://ponorogozone.com
edelweize
Admin
Admin


Jumlah posting : 255
Points : 401
Reputation : 0
Join date : 26.02.10
Age : 23
Lokasi : In This Forum

PostSubyek: Re: Advance Password Generator Version 2.0 [SRC][GUI]   Wed Apr 07, 2010 4:10 am

no junk yahh.... Big Grin

_________________


Regards,

edelweize
Kembali Ke Atas Go down
Lihat profil user http://t0k3kmiringcrew.forummotion.com/
Bboy_maverick
Crew Member
Crew Member


Jumlah posting : 99
Points : 124
Reputation : 0
Join date : 08.03.10
Age : 24
Lokasi : manado

PostSubyek: Re: Advance Password Generator Version 2.0 [SRC][GUI]   Thu Apr 08, 2010 9:50 pm

wew kagag ngerti saya master ...
Other Mood Other Mood Other Mood Other Mood Other Mood

maklum newbie Bad Mood Bad Mood Bad Mood
Kembali Ke Atas Go down
Lihat profil user http://www.microlighthangar.com/forum/messages.asp?iMsg=171&
Sponsored content




PostSubyek: Re: Advance Password Generator Version 2.0 [SRC][GUI]   Today at 3:56 pm

Kembali Ke Atas Go down
 
Advance Password Generator Version 2.0 [SRC][GUI]
Topik sebelumnya Topik selanjutnya Kembali Ke Atas 
Halaman 1 dari 1
 Similar topics
-
» WTA generator Hidrogen....
» CBR 600RR Euro Version (no limiter) 2011 hitam mulus
» Shinobi DVDRip
» katanya versi naked..
» Service Manual Ninja 250R

Permissions in this forum:Anda tidak dapat menjawab topik
Welcome To t0k3k Miring Crew Official Forum :: Miscellaneous Zone :: Coding And Programming-
Navigasi: