public static String toHTML(String s) { s = Misc.string_replace(">", ">", s); s = Misc.string_replace("<", "<", s); s = Misc.string_replace(" ", " ", s); s = Misc.string_replace(" ", "\t", s); s = Misc.string_replace("<br>", "\n", s); return s; }
public void sendXHeader() throws IOException { StringBuffer header1 = new StringBuffer(); StringBuffer header2 = new StringBuffer(); int lengthOfXA = param.getRandomLengthOfXA(); int lengthOfXB = param.getRandomLengthOfXB(); for (int i=0 ; i<lengthOfXA ; i++) { header1.append(Misc.getRandomByte()); } for (int i=0 ; i<lengthOfXB ; i++) { header2.append(Misc.getRandomByte()); } socket.getOutputStream().write(("X-" + header1.toString() + ": " + header2.toString() + "\r\n").getBytes()); socket.getOutputStream().flush(); }
public void sendPOSTBodyRandomByte() throws IOException { socket.getOutputStream().write(Misc.getRandomByte()); socket.getOutputStream().flush(); }