Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Country/Flag US United States
- City/Region/Zip Code San Francisco, California 94111
- Organization Weebly
- Internet Service Provider Weebly
- Registrar 101DOMAIN, INC.
- Registrar URL http://www.101domain.com
- Whois server 101domain.com
- Created 27-Oct-2011
- Updated 22-Nov-2011
- Expires 27-Oct-2012
- Time Left 296 days 23 hours 29 minutes
- Status ok
- DNS servers NS1.MEGPANEL.COM 174.37.130.236
- NS2.MEGPANEL.COM 50.22.231.224
- CODLOBBIES.COM - DNS Information
- IP Address 199.34.228.100 ~ Whois - Trace Route - RBL Check
- Domain Name Servers ns38.domaincontrol.com 208.109.255.19
- ns37.domaincontrol.com 216.69.185.19
- Mail Exchange smtp.secureserver.net 216.69.186.201
- mailstore1.secureserver.net 72.167.238.201
- Site Response Header
- Response HTTP/1.1 404 Not Found
- Server Apache
- Date Sun, 10 Apr 2011 07:38:07 GMT
- Content-Type text/html; charset=UTF-8
- Cookie is_mobile=0; path=/; domain=www.codlobbies.com
- http://wotuteje.freehostyou.com/neomycin-enema/ - neomycin for conjunctivitist http://wotuteje.freehostyou.com/baclofen-pump-withdrawl/ - can you overdose on baclofen http://wotuteje.freehostyou.com/protamine-msds-stability-solution/ - protamine stability in water freezing http://wotuteje.freehostyou.com/phentermine-37.5-online-consultations-no-prescription/ - phentermine mrt http://wotuteje.freehostyou.com/information-on-the-drug-avapro/ - avapro generic http://wotuteje.freehostyou.com/ingredients-in-expectorant-cough-medicines/ - flu with cough and diarrhea http://wotuteje.freehostyou.com/rps-carrier-service/ - rp publications colton printers california http://wotuteje.freehostyou.com/foot-and-ankle-pain/ - pain relief therapy for horses http://wotuteje.freehostyou.com/buy-canadian-methocarbamol/ - methocarbamol 750mg dose pain arthritis http://wotuteje.freehostyou.com/does-colon-cleansing-hurt/ - colon cancer victims http://wotuteje.freehostyou.com/long-dong-silver-photo/ - dong xuan china http://wotuteje.freehostyou.com/epi-e-z-pen/ - meaning of epi http://wotuteje.freehostyou.com/equine-encephalitis/ - west nile encephalitis humans http://wotuteje.freehostyou.com/lentes-de-contacto-en-los-angeles/ - lentes de rejilla sali http://wotuteje.freehostyou.com/capital-town-of-alor-star/ - alor type font http://wotuteje.freehostyou.com/cheap-generic-flexeril-10-mg/ - flexeril patches http://wotuteje.freehostyou.com/diagnostic-information-haemophilus-influenzae/ - haemophilus aegyptius conjunctivitis http://wotuteje.freehostyou.com/chromic/ - chromic suture http://wotuteje.freehostyou.com/cytochrome-p450-estrogen-and-fluoxetine/ - metformin and fluoxetine http://wotuteje.freehostyou.com/cinnamon-iced-tea-recipes/ - cinnamon club devonshire square http://wotuteje.freehostyou.com/yohimbe-anxiety/ - yohimbe bark side effects http://wotuteje.freehostyou.com/heparin-antidote/ - use of heparin http://wotuteje.freehostyou.com/esomeprazole-compatability/ - effect of pantoprazole and esomeprazole on http://wotuteje.freehostyou.com/32-mpa-concrete/ - mpa amarillo tx http://wotuteje.freehostyou.com/extended-release-sustained-release/ - sustained release l-arginine http://wotuteje.freehostyou.com/lamictal-diabetes/ - high blood pressure and lamictal http://wotuteje.freehostyou.com/polystyrene-nanoparticles/ - expanded polystyrene pex pipe insulation http://wotuteje.freehostyou.com/video-ezy-au/ - ezy http://wotuteje.freehostyou.com/tannic-acid-content-of-sweet-potatoes/ - ny tannic http://wotuteje.freehostyou.com/prometh-with-codeine-without-prescription/ - meperidine prometh http://wotuteje.freehostyou.com/seroquel-maximum-safe-dose/ - seroquel zyprexa http://wotuteje.freehostyou.com/chromosomes-measured-end-to-end/ - how is air pressure measured http://wotuteje.freehostyou.com/salsalate/ - active ingredient in salsalate http://wotuteje.freehostyou.com/paxil-wellbutrin/ - wellbutrin insomnia http://wotuteje.freehostyou.com/whitechapel-hospital-extension-london-e1/ - e1 number http://wotuteje.freehostyou.com/jergens-extra-moisturizing-body-wash/ - quality moisturizing candles http://wotuteje.freehostyou.com/centrum-performance-contents/ - centrum whitby jobs http://wotuteje.freehostyou.com/internet-support-groups-for-nph/ - nph insulin half life http://wotuteje.freehostyou.com/itraconazole-adrenal-gland/ - spornox itraconazole side effects http://wotuteje.freehostyou.com/diclofenac-sodium-ec-tabs/ - diclofenac and prednisolone http://wotuteje.freehostyou.com/epinephrine-reaction/ - epinephrine settlements http://wotuteje.freehostyou.com/ddavp-medicine/ - ddavp medicine http://wotuteje.freehostyou.com/filles-sexes-dur-fr-free/ - disque dur lacie http://wotuteje.freehostyou.com/xylan-coated-bolts/ - coated perch traps http://wotuteje.freehostyou.com/hanya-cinta-yang-bisa/ - one love acel bisa chords http://wotuteje.freehostyou.com/list-of-all-benzodiazepines/ - benzodiazepines with ambien http://wotuteje.freehostyou.com/zr-auto-calgary/ - arctic cat zr 700 1994 http://wotuteje.freehostyou.com/slippery-ice-high-heels/ - house remedy for slippery shoes http://wotuteje.freehostyou.com/atenolol-nose-bleeds/ - atenolol and weight gain http://wotuteje.freehostyou.com/e-fougera-co/ - fougera hydrophilic ointment
- import gov.nih.nci.security.util.StringEncrypter;
- import gov.nih.nci.security.util.StringUtilities;
- import gov.nih.nci.security.util.StringEncrypter.EncryptionException;
- import java.sql.Connection;
- import java.sql.DatabaseMetaData;
- import java.sql.DriverManager;
- import java.sql.ResultSet;
- import java.sql.SQLException;
- import java.sql.Statement;
- /**
- * PasswordEncrypter: This class encrypts all data of given field from a given table. The database connection parameters have to be provided
- * by modifying
- *
- * The encryption is done using the CSM's encryption class StringEncrytper.
- *
- * Requirements:
- * - Requires a database/database driver that supports updatable result sets.
- * - Database Connection parameters.
- * - csmapi.jar in classpath.
- *
- *
- * Database Drivers Information
- * For an Oracle database, download and installation instructions are available at:
- * http://otn.oracle.com/software/content.html
- * For a MySQL database, download and installation instructions are available at:
- * http://mmMySQL.sourceforge.net
- * For a SQL Server database, there are many JDBC drivers available. Here are some:
- * NetDirect: http://www.j-netdirect.com
- * DataDirect: http://www.datadirect-technologies.com
- * FreeTDS: http://www.freetds.org
- *
- *
- *
- * @author parmarv
- *
- */
- public class PasswordEncrypter {
- // NOTE: CHANGE VALUES IN THIS SECTION TO REFLECT YOUR DATABASE and Table specification.
- // The Name of the server for the database. For example : localhost, cbiodev.nci.nih.gov.
- static String DATABASE_SERVER_NAME = "localhost";
- static String DATABASE_SERVER_PORT_NUMBER = "3306";
- // The Type of Database. Use one of the three values 'MySQL', 'Oracle', 'SQLServer'.
- static String DATABASE_TYPE = "MySQL";
- // Name of the Database.
- static String DATABASE_NAME = "csmstage";
- // Database User name
- static String DATABASE_USERNAME = "root";
- // Database Password
- static String DATABASE_PASSWORD = "admin";
- /* The database Driver.
- * Examples : MySQL = org.gjt.mm.mysql.Driver
- * Oracle = oracle.jdbc.driver.OracleDriver
- * SQLServer = com.jnetdirect.jsql.JSQLDriver // NetDirect JDBC driver
- */
- static String DATABASE_DRIVER = "org.gjt.mm.mysql.Driver";
- // The name of the table whose field is to be encrypted.
- static String DATABASE_TABLE_NAME = "csm_user";
- // The name of the field whose row values have to be encrypted.
- static String DATABASE_TABLE_FIELD_NAME = "password";
- //IMPORTANT: Do not modify anything below this line.
- public static void main(String[] args) {
- System.out.println(" Encrypting data for the following:");
- System.out.println("Database Connection Parameters");
- StringEncrypter stringEncrypter = null;
- try {
- stringEncrypter = new StringEncrypter();
- } catch (EncryptionException e1) {
- e1.printStackTrace();
- }
- try {
- // Create an updatable result set
- Connection connection = getConnection();
- Statement stmt = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
- ResultSet resultSet = stmt.executeQuery("SELECT "+DATABASE_TABLE_NAME+".* FROM "+DATABASE_TABLE_NAME);
- String userPassword = null;
- String encryptedUserPassword = null;
- boolean first = false;
- while(resultSet.next())
- {
- if(!first) {
- resultSet.first();
- first = true;
- }
- userPassword = resultSet.getString(DATABASE_TABLE_FIELD_NAME);
- if(!StringUtilities.isBlank(userPassword)){
- try {
- encryptedUserPassword = stringEncrypter.encrypt(userPassword);
- } catch (EncryptionException e) {
- e.printStackTrace();
- }
- if(!StringUtilities.isBlank(encryptedUserPassword)){
- resultSet.updateString(DATABASE_TABLE_FIELD_NAME, encryptedUserPassword);
- resultSet.updateRow();
- }
- }
- }
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- private static Connection getConnection() {
- Connection connection = null;
- try {
- // Load the JDBC driver
- Class.forName(DATABASE_DRIVER);
- // Create a connection to the database
- String url ="";
- if("MySQL".equalsIgnoreCase(DATABASE_TYPE)){
- url = "jdbc:mysql://" + DATABASE_SERVER_NAME +":"+DATABASE_SERVER_PORT_NUMBER+ "/" + DATABASE_NAME; // a JDBC url
- }
- if("Oracle".equalsIgnoreCase(DATABASE_TYPE)){
- url = "jdbc:oracle:thin:@" + DATABASE_SERVER_NAME + ":" + DATABASE_SERVER_PORT_NUMBER + ":" + DATABASE_NAME;
- }
- if("SQLServer".equalsIgnoreCase(DATABASE_TYPE)){
- url = "jdbc:JSQLConnect://" + DATABASE_SERVER_NAME + ":" + DATABASE_SERVER_PORT_NUMBER; // a JDBC url
- }
- connection = DriverManager.getConnection(url, DATABASE_USERNAME, DATABASE_PASSWORD);
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- // Could not find the database driver
- } catch (SQLException e) {
- e.printStackTrace();
- // Could not connect to the database
- }
- try {
- DatabaseMetaData dmd = connection.getMetaData();
- if (dmd.supportsResultSetConcurrency(
- ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE)) {
- // Updatable result sets are supported
- } else {
- // Updatable result sets are not supported
- return null;
- }
- } catch (SQLException e) {
- }
- return connection;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement