Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

ITT:a prog posts its own source to prog

Name: Anonymous 2009-04-09 3:13

import java.io.*;
import java.net.*;
import java.util.*;
public class StackOverflow {
    public static void main(String[] args) throws Exception{
        Socket sock=new Socket("dis.4chan.org",80);
        String com="[code]";
        Scanner sc=new Scanner(new File("StackOverflow.java"));
        while(sc.hasNextLine())
            com+=sc.nextLine()+"\r\n";
        com+="
";
        com=URLEncoder.encode(com,"UTF-8");
        String data="bbs=prog&id=1239260575& lol what 2&subj=ITT:a+program+that+posts+its+own+source+to+prog&kotehan=&meiru=&com="+com+"&email=";   
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(sock.getOutputStream()));
        out.write("POST /post HTTP/1.1\r\n"+
                "Host: dis.4chan.org\r\n"+
                "User-Agent: Gibson/9000\r\n"+
                "Referer: http://dis.4chan.org/book/\r\n"+
                "Content-Type: application/x-www-form-urlencoded\r\n"+
                "Content-Length: "+data.length()+"\r\n\r\n"
                +data);
        out.flush();
        BufferedReader in = new BufferedReader(new InputStreamReader(sock.getInputStream()));           
        String str;       
        while ((str = in.readLine()) != null)               
            System.out.println(str);              
        in.close();
        out.close();
        sock.close();
    }
}
[/code]

Name: Anonymous 2009-04-09 4:27

>>6
Hi OP,
You must be under the incorrect impression that there are people here who couldn't write their own bot if they so wished, and that they will use your ugly peice of shit as a template. I suggest you fuck off back to /pr/.1
________________________________________________

1. In hindsight, what with /pr/ being down as of late my first comment is probably fallicious, however the conclusion is still valid, and now has a tang of irony as well.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List