One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
import java.util.Random; | |
/** | |
* A credit card number generator. | |
* | |
* @author Josef Galea | |
*/ | |
public class CreditCardNumberGenerator { | |
private Random random = new Random(System.currentTimeMillis()); |
package net.hausherr.sample; | |
import org.apache.http.client.CookieStore; | |
import org.apache.http.conn.routing.HttpRoute; | |
import org.apache.http.conn.routing.HttpRoutePlanner; | |
import org.apache.http.conn.scheme.PlainSocketFactory; | |
import org.apache.http.conn.scheme.Scheme; | |
import org.apache.http.conn.scheme.SchemeRegistry; | |
import org.apache.http.conn.ssl.SSLSocketFactory; | |
import org.apache.http.conn.ssl.TrustStrategy; |
\n | |
============= HOST: ==========\n | |
\n | |
local_ip: %{local_ip}\n | |
local_port: %{local_port}\n | |
remote_ip: %{remote_ip}\n | |
remote_port: %{remote_port}\n | |
\n | |
======= CONNECTION: ==========\n | |
\n |
public class SSLProtocolTests { | |
public static void main(String[] args) throws Exception { | |
SSLContext context = SSLContext.getInstance("TLSv1.2"); | |
context.init(null,null,null); | |
SSLSocketFactory factory = (SSLSocketFactory)context.getSocketFactory(); | |
SSLSocket socket = (SSLSocket)factory.createSocket(); | |
String[] protocols = socket.getSupportedProtocols(); |
public class SSLProtocolTests { | |
public static void main(String[] args) throws Exception { | |
SSLContext context = SSLContext.getDefault(); | |
SSLSocketFactory factory = (SSLSocketFactory)context.getSocketFactory(); | |
SSLSocket socket = (SSLSocket)factory.createSocket(); | |
String[] protocols = socket.getSupportedProtocols(); | |
System.out.println("Supported Protocols: " + protocols.length); | |
for(int i = 0; i < protocols.length; i++) |
Use TCPDUMP to Monitor HTTP Traffic | |
1. To monitor HTTP traffic including request and response headers and message body: | |
tcpdump -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | |
2. To monitor HTTP traffic including request and response headers and message body from a particular source: | |
tcpdump -A -s 0 'src example.com and tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | |
3. To monitor HTTP traffic including request and response headers and message body from local host to local host: |