This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static final String alphabet = "0123456789ABCDE"; | |
public static void main(String[] args) throws UnknownHostException, IOException { | |
System.setProperty("javax.net.ssl.trustStore", "C:\\path\\to\\java\\truststore.jks"); | |
System.setProperty("javax.net.ssl.trustStorePassword", "Password1"); | |
SSLSocketFactory factory = (SSLSocketFactory) SSLSocketFactory.getDefault(); | |
SSLSocket sslsocket = (SSLSocket) factory.createSocket("127.0.0.1", 7000); | |
OutputStreamWriter writer = new OutputStreamWriter(sslsocket.getOutputStream(), "UTF-8"); | |
char[] buffer = new char[9]; | |
Random r = new Random(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) throws IOException { | |
System.setProperty("javax.net.ssl.keyStore", "C:\\path\\to\\keystore\\store.jks"); | |
System.setProperty("javax.net.ssl.keyStorePassword", "Password1"); | |
SSLServerSocketFactory ssf = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault(); | |
ServerSocket ss = ssf.createServerSocket(7000); | |
System.out.println("started"); | |
while (true) { | |
Socket s = ss.accept(); | |
System.out.println("connected"); | |
InputStreamReader reader = new InputStreamReader(s.getInputStream()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s3key=your key | |
s3secret=your secret | |
function putS3 | |
{ | |
object=$1 | |
sourceBucket='bucket' | |
destinationBucket='bucket' | |
date=$(date +"%a, %d %b %Y %T %z") |