public class SQLInjection
extends java.lang.Object
| Constructor and Description |
|---|
SQLInjection() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
changePassword(java.sql.Connection conn,
java.lang.String userName,
java.lang.String password)
Utility method to change a password of a user.
|
static java.sql.ResultSet |
getUser(java.sql.Connection conn,
java.lang.String userName,
java.lang.String password)
Utility method to get a user record given the user name and password.
|
static void |
main(java.lang.String... args)
This method is called when executing this sample application from the
command line.
|
public static void main(java.lang.String... args)
throws java.lang.Exception
args - the command line parametersjava.lang.Exceptionpublic static java.sql.ResultSet getUser(java.sql.Connection conn,
java.lang.String userName,
java.lang.String password)
throws java.lang.Exception
conn - the database connectionuserName - the user namepassword - the passwordjava.lang.Exceptionpublic static java.lang.String changePassword(java.sql.Connection conn,
java.lang.String userName,
java.lang.String password)
throws java.lang.Exception
conn - the database connectionuserName - the user namepassword - the passwordjava.lang.Exception