Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple Snitching in Java
// Using raw java.net.*
URL obj = new URL("https://nosnch.in/[snitch code]?m=[message]");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.getResponseCode();
// Apache HttpComponents http://hc.apache.org/httpcomponents-client-ga/quickstart.html
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpGet httpGet = new HttpGet("https://nosnch.in/[snitch code]?m=[message]");
CloseableHttpResponse response1 = httpclient.execute(httpGet);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.