Heres the working/not working mystery code, I suspect I am just sending the wrong thing, but I tried sending every kind of way of posting variables to a page, I dont know how close I got at all.
A = URLField.getText();
B = textarea.getText();
F = oneliner.getText();
C = param2.getText();
try {
URL url = new URL(A);
URLConnection con = url.openConnection();
con.setDoOutput(true);
OutputStreamWriter writer = new OutputStreamWriter(con.getOutputStream());
F = URLEncoder.encode(F, "UTF-8");
writer.write(F);
System.out.println(F);
String line;
DataInputStream in = new DataInputStream (con.getInputStream ());
while ((line = in.readLine()) != null) {
G=G + line;
}
textarea.setText(G);
writer.close();
in.close();
}
I will proly have to save the cookies afterwards to win the hack this challenge, but I know that a 403 error is a sure sign it did not work, I have a practice code too, sending variables to that does get me a reply in form format, but it doesnt change the variable, or at least its not visable
What does this display? I have a feeling that this is your problem - you should only url encode the "name" and the "value", the & and = should not be encoded.
Okay, this is my practice script, the one on "hackthis.co.uk" is hard to find
1 2 3 4 5
<html>
<body>
YOU ARE THAT <?php echo $_POST ["myname"];?> CHARACTER AINT YOU!
<body>
</html>
Its also on http://mejeef.tk/myscript.php, which is my practice website for messing about on, one day I will make a website and challenge you all to deface it!
I guess your approach is wrong. Your problem is not Java. Your problem is basic understanding how Internet works. Go and figure out first how to do that with pure telnet, and before you have a success there, don't ever touch any coding.
I didn't even know that telnet was a thing so I guess it will be a while till im coding again, but KK if you believe it would be helpful why wouldn't I take your advice? :P
If everyone wants to get really technical it is not allowed: http://www.cplusplus.com/forum/lounge/6/#msg6
admin wrote:
In this forum, users can to talk about topics other than programming
Well even that is showing people's interpretation and it can be taken either way. If you look for synonyms for the words barring (to exclude) you find other than and if you look for the synonym for besides (in addition to) you again see other than. So it depends on how the person interprets admin's line as it could mean either (leaving in unneeded 'to'):
In this forum, users can to talk about topics barring programming.
In this forum, users can to talk about topics excluding programming.
or
In this forum, users can to talk about topics besides programming.
In this forum, users can to talk about topics in addition to programming.