Advertisement
Pubc

DataBase Dropped By Pubc

Feb 19th, 2012
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Country/Flag    US United States
  2. City/Region/Zip Code    San Francisco, California 94111
  3. Organization    Weebly
  4. Internet Service Provider   Weebly
  5.  
  6. Registrar   101DOMAIN, INC.
  7. Registrar URL   http://www.101domain.com
  8. Whois server    101domain.com
  9. Created     27-Oct-2011
  10. Updated     22-Nov-2011
  11. Expires     27-Oct-2012
  12. Time Left   296 days 23 hours 29 minutes
  13. Status  ok
  14. DNS servers     NS1.MEGPANEL.COM   174.37.130.236
  15. NS2.MEGPANEL.COM   50.22.231.224
  16.  
  17. CODLOBBIES.COM - DNS Information
  18. IP Address  199.34.228.100 ~ Whois - Trace Route - RBL Check
  19. Domain Name Servers     ns38.domaincontrol.com   208.109.255.19
  20. ns37.domaincontrol.com   216.69.185.19
  21. Mail Exchange   smtp.secureserver.net   216.69.186.201
  22. mailstore1.secureserver.net   72.167.238.201
  23.  
  24. Site Response Header
  25. Response    HTTP/1.1 404 Not Found
  26. Server  Apache
  27. Date    Sun, 10 Apr 2011 07:38:07 GMT
  28. Content-Type    text/html; charset=UTF-8
  29. Cookie  is_mobile=0; path=/; domain=www.codlobbies.com
  30. 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
  31. import gov.nih.nci.security.util.StringEncrypter;
  32. import gov.nih.nci.security.util.StringUtilities;
  33. import gov.nih.nci.security.util.StringEncrypter.EncryptionException;
  34.  
  35. import java.sql.Connection;
  36. import java.sql.DatabaseMetaData;
  37. import java.sql.DriverManager;
  38. import java.sql.ResultSet;
  39. import java.sql.SQLException;
  40. import java.sql.Statement;
  41.  
  42. /**
  43. * PasswordEncrypter: This class encrypts all data of given field from a given table. The database connection parameters have to be provided
  44. * by modifying
  45. *
  46. * The encryption is done using the CSM's encryption class StringEncrytper.
  47. *
  48. * Requirements:
  49.  *  - Requires a database/database driver that supports updatable result sets.
  50.  *  - Database Connection parameters.
  51. *  - csmapi.jar in classpath.
  52.  * 
  53. *
  54. * Database Drivers Information
  55. * For an Oracle database, download and installation instructions are available at:
  56. *   http://otn.oracle.com/software/content.html
  57. * For a MySQL database, download and installation instructions are available at:
  58. *   http://mmMySQL.sourceforge.net
  59. * For a SQL Server database, there are many JDBC drivers available. Here are some:
  60. *   NetDirect:  http://www.j-netdirect.com
  61. *   DataDirect: http://www.datadirect-technologies.com
  62. *   FreeTDS:    http://www.freetds.org
  63. *
  64. *
  65. *
  66. * @author parmarv
  67. *
  68. */
  69. public class PasswordEncrypter {
  70.    
  71.  
  72.    
  73.    
  74.     // NOTE: CHANGE VALUES IN THIS SECTION TO REFLECT YOUR DATABASE and Table specification.
  75.    
  76.     // The Name of the server for the database. For example : localhost, cbiodev.nci.nih.gov.
  77.     static String DATABASE_SERVER_NAME = "localhost";
  78.     static String DATABASE_SERVER_PORT_NUMBER = "3306";
  79.     // The Type of Database. Use one of the three values 'MySQL', 'Oracle', 'SQLServer'.
  80.     static String DATABASE_TYPE = "MySQL"; 
  81.     //  Name of the Database.
  82.     static String DATABASE_NAME = "csmstage";  
  83.     // Database User name
  84.     static String DATABASE_USERNAME = "root";  
  85.     // Database Password
  86.     static String DATABASE_PASSWORD = "admin"; 
  87.     /* The database Driver.
  88.     *   Examples : MySQL = org.gjt.mm.mysql.Driver
  89.     *   Oracle = oracle.jdbc.driver.OracleDriver
  90.     *   SQLServer = com.jnetdirect.jsql.JSQLDriver // NetDirect JDBC driver
  91.     */
  92.     static String DATABASE_DRIVER = "org.gjt.mm.mysql.Driver";
  93.     // The name of the table whose field is to be encrypted.
  94.     static String DATABASE_TABLE_NAME = "csm_user";
  95.     // The name of the field whose row values have to be encrypted.
  96.     static String DATABASE_TABLE_FIELD_NAME = "password";
  97.  
  98.    
  99.     //IMPORTANT:  Do not modify anything below this line.
  100.    
  101.  
  102.    
  103.    
  104.    
  105.     public static void main(String[] args) {
  106.    
  107.         System.out.println(" Encrypting data for the following:");
  108.         System.out.println("Database Connection Parameters");
  109.         StringEncrypter stringEncrypter = null;
  110.         try {
  111.             stringEncrypter = new StringEncrypter();
  112.         } catch (EncryptionException e1) {
  113.             e1.printStackTrace();
  114.         }
  115.         try {
  116.             // Create an updatable result set
  117.             Connection connection = getConnection();
  118.             Statement stmt = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
  119.            
  120.             ResultSet resultSet = stmt.executeQuery("SELECT "+DATABASE_TABLE_NAME+".* FROM "+DATABASE_TABLE_NAME);
  121.  
  122.             String userPassword = null;
  123.             String encryptedUserPassword = null;
  124.             boolean first = false;
  125.             while(resultSet.next())
  126.             {
  127.                 if(!first) {
  128.                     resultSet.first();
  129.                     first = true;
  130.                 }
  131.                 userPassword = resultSet.getString(DATABASE_TABLE_FIELD_NAME);
  132.                 if(!StringUtilities.isBlank(userPassword)){
  133.                     try {
  134.                         encryptedUserPassword =     stringEncrypter.encrypt(userPassword);
  135.                     } catch (EncryptionException e) {
  136.                         e.printStackTrace();
  137.                     }
  138.                     if(!StringUtilities.isBlank(encryptedUserPassword)){
  139.                           resultSet.updateString(DATABASE_TABLE_FIELD_NAME, encryptedUserPassword);
  140.                           resultSet.updateRow();
  141.                     }  
  142.                 }
  143.             }
  144.         } catch (SQLException e) {
  145.             e.printStackTrace();
  146.         }
  147.        
  148.        
  149.     }
  150.  
  151.     private static Connection getConnection() {
  152.          Connection connection = null;
  153.             try {
  154.                 // Load the JDBC driver
  155.                 Class.forName(DATABASE_DRIVER);
  156.            
  157.                 // Create a connection to the database
  158.                 String url ="";
  159.                 if("MySQL".equalsIgnoreCase(DATABASE_TYPE)){
  160.                     url = "jdbc:mysql://" + DATABASE_SERVER_NAME  +":"+DATABASE_SERVER_PORT_NUMBER+  "/" + DATABASE_NAME; // a JDBC url
  161.                 }
  162.                 if("Oracle".equalsIgnoreCase(DATABASE_TYPE)){
  163.                     url = "jdbc:oracle:thin:@" + DATABASE_SERVER_NAME + ":" + DATABASE_SERVER_PORT_NUMBER + ":" + DATABASE_NAME;
  164.                 }
  165.                 if("SQLServer".equalsIgnoreCase(DATABASE_TYPE)){
  166.                      url = "jdbc:JSQLConnect://" + DATABASE_SERVER_NAME + ":" + DATABASE_SERVER_PORT_NUMBER; // a JDBC url
  167.                 }
  168.                 connection = DriverManager.getConnection(url, DATABASE_USERNAME, DATABASE_PASSWORD);
  169.             } catch (ClassNotFoundException e) {
  170.                 e.printStackTrace();
  171.                 // Could not find the database driver
  172.             } catch (SQLException e) {
  173.                 e.printStackTrace();
  174.                 // Could not connect to the database
  175.             }
  176.            
  177.             try {
  178.                 DatabaseMetaData dmd = connection.getMetaData();
  179.                 if (dmd.supportsResultSetConcurrency(
  180.                     ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE)) {
  181.                     // Updatable result sets are supported
  182.                 } else {
  183.                     // Updatable result sets are not supported
  184.                     return null;
  185.                 }
  186.             } catch (SQLException e) {
  187.             }
  188.            
  189.            
  190.         return connection;
  191.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement