|
Web Design ![]() This website demonstrates using wikis as teaching and learning tool. The course instructor is happy to share the teaching materials here with those who find it readable. |
Tutorial /
Website SecurityIntroduction: In this tutorial, you will do two exercises to learn more about website security. Activity One: Spamming
Activity Two: Password Cracking"There are two ways to crack a password (other than social engineering, which is making you tell me your password by tricking you or phishing): brute force and dictionary attacks. Brute force entails writing a loop that tries all of the different options (much like playing hangman), which can take ages and uses a lot of computing power. Dictionary attacks use a dictionary database to attempt common words instead of going letter by letter."
Some useful tools
The following simple program can be used to send any HTTP request to a website program.
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.URL; import java.net.URLConnection; public class Post2WebTest { public static void main(String[] args) { String postUrl = ""; String postData = ""; try { URL url = new URL(postUrl); URLConnection conn = url.openConnection(); conn.setDoOutput(true); //conn.setRequestProperty("Referer", ""); // write POST data to server OutputStream output = conn.getOutputStream(); output.write(postData.getBytes()); output.close(); // read response from server BufferedReader reader = new BufferedReader( new InputStreamReader(conn.getInputStream())); String line; while ((line = reader.readLine()) != null) System.out.println(line); } catch (IOException ex) { ex.printStackTrace(); } } } |