|
Make sure the result files are correct and clear!
|
Notice that this is a programming-intensive exam.
createStatement
, ResultSet
, setContentView
, moveToFirst
, findViewById
, setOnClickListener
, RelativeLayout
, intent-filter
, and EditText
, but not all the keywords used, will be given.
Though the keywords are provided, you still need to know where and how to put them.
#!/usr/bin/bash CLASSPATH=.:/usr/lib/oracle/23/client64 CLASSPATH=$CLASSPATH:/usr/lib/oracle/23/client64/lib/ojdbc8.jar CLASSPATH=$CLASSPATH:/usr/lib/oracle/23/client64/lib/ottclasses.zip export CLASSPATH |
#!/usr/bin/perl print( "Content-type: text/html\n\n" ); use CGI; $query = new CGI; $var = $query->param( 'var' ); # or $var = $query->url_param( 'var' ); $var =~ s/^\s*(\S*)\s*$/$1/; $var =~ s/;|>|>>|<|\*|\?|\&|\|//g; $cmd = "/usr/bin/java -Djava.security.egd=file:/dev/./urandom "; system( $cmd ); |
// Import the following packages to use JDBC. import java.sql.*; import java.io.*; import oracle.jdbc.*; import oracle.jdbc.pool.OracleDataSource; public class ClassName { public static void main( String args[ ] ) throws SQLException { String user = "C##user_id"; String password = "password"; String database = "20.185.147.112:1521/xe"; // Open an OracleDataSource and get a connection. OracleDataSource ods = new OracleDataSource( ); ods.setURL ( "jdbc:oracle:thin:@" + database ); ods.setUser ( user ); ods.setPassword( password ); Connection conn = ods.getConnection( ); Statement stmt = conn.createStatement( ); |
⇒
JDBC (or maybe including HTML and Perl) programs / commands⇒
results⇒
Android code
Recommendations
To prepare the exam: |