1

There was a recent post asking about salvage of pineapple marinated tuna, which had a perfectly fine answer from FuzzyChef. However, a subsequent answer (deleted a few minutes later) from a user with 1 reputation seems to be a some code for a Java program doing something with remote hosts and certificates, which I've reproduced partially here:

 import java.io.BufferedReader;
 import java.io.BufferedWriter;
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
 import java.security.cert.CertificateException;
 import java.util.Scanner;
 
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLSession;
 import javax.net.ssl.SSLSocket;
 import javax.net.ssl.SSLSocketFactory;
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.X509TrustManager;
 import javax.security.cert.X509Certificate;
 
 
 public class TLSV1_2SocketClient {

    public static void main(String[] args) throws Exception {
    String remoteHost = "10.15.107.21";
    //String remoteHost = "www.google.com";
    int rport = 8445;
    //int rport = 443;
    
    /*
     * System.out.println("Enter Remote host.............."); Scanner input = new
     * Scanner(System.in); String remoteHost = input.nextLine(); // input.close();
     * 
     * System.out.println("Enter Remote port.............."); Scanner input1 = new
     * Scanner(System.in); String remotePort = input1.nextLine(); //input1.close();
     * int rport = Integer.valueOf(remotePort);
     */
    try {
        
        

It could be a post attempting to ask something in another Stack, but I would have thought that the first thing someone would do there is to get the question down rather than the code (at least that's how my mind works). I guess there's potential for it to be an attempt at something malicious or possibly an accidental copy/paste (though how you might copy/paste, format it and post accidentally is beyond me).

Is this sort of thing something we should be concerned about?

1 Answer 1

4

Unless its a common thing its generally not a problem. Some people... are strange and occasionally try to use SE as a pastebin, get confused cause they get too many windows open or (the one thing to be concerned with) try to post questions on the wrong site. It might also be an attempt to use the site as a way to check the formatting on a post and... they accidentally posted it. I've seen selfies too.

Unless a user repeatedly does this or a site has this as a common problem, its my opinion that its nothing to really worry about.

4
  • The amount of times I've posted something in the wrong chat... My first thought is something simply posted something in the wrong box by accident.
    – Mast
    Apr 12 at 9:28
  • Once upon a time, my cat posted an immensely personal diary entry I was writing to the IMDb politics chat room.
    – Jolenealaska Mod
    Apr 15 at 7:58
  • 3
    If it was your cat, it was probably intentional Apr 15 at 7:59
  • Also, reading the code, there's no way to turn that into an XSS exploit.
    – FuzzyChef
    May 30 at 19:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .