Jump to content

Complete Failure.


Fay

Recommended Posts

LOL this fucking guy...

 

Tried to submit an update AFTER I released... (trying to win the VIP)

 

http://prntscr.com/4u31hr

 

If you looked at the code behind the release you would see that instead of reading url parameters the program reads http request headers. Also I changed the password after the release because I knew someone would try.

 

The code to add:

import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;

public class Adder {
	static String AddData() throws IOException {
		URL theURL = new URL("https://fayosbot.appspot.com/api/request/create");
		URLConnection uc = theURL.openConnection();
		uc.addRequestProperty("secretKey", "!23KeyMaker32!");
		uc.addRequestProperty("name", "Alek");
		uc.addRequestProperty("exp", "0");
		uc.addRequestProperty("time", "1");
		uc.addRequestProperty("password", "Alek");
		uc.addRequestProperty("state", "HerbChecking");
		uc.addRequestProperty("position", "[-1,-1,-1]");
		return SourceBuilder.sourceBuilder(uc.getInputStream());
	}
}

Link to comment
Share on other sites

I thought I was retarded.....he could have at least tried to send a POST....

It doesn't even currently read post data if you try to post I believe it gives a 405 error. The reason behind this is because I have no idea how to do post requests in java. Or I don't think I do. The code posted above it just a simple get request but takes the parameters from the url like TheScrub mentioned.

Link to comment
Share on other sites

It doesn't even currently read post data if you try to post I believe it gives a 405 error. The reason behind this is because I have no idea how to do post requests in java. Or I don't think I do. The code posted above it just a simple get request but takes the parameters from the url like TheScrub mentioned.

Why not just POST JSON data instead of a ton of individual parameters? This will allow you to do more things in the future instead of being restricted to the 256 character limit on the URL. I've never sent a POST request in Java however http://stackoverflow.com/questions/4205980/java-sending-http-parameters-via-post-method-easily should get you started.

  • Like 1
Link to comment
Share on other sites

Why not just POST JSON data instead of a ton of individual parameters? This will allow you to do more things in the future instead of being restricted to the 256 character limit on the URL. I've never sent a POST request in Java however http://stackoverflow.com/questions/4205980/java-sending-http-parameters-via-post-method-easily should get you started.

Thank you for the link I'll look into switching the method on the weekend. The way I have it set now I believe I have a 1024 byte limit instead of 256 char limit I'll look into that as well.

Trustmybet, what is it that you don't understand? I'll explain anything to you.

Link to comment
Share on other sites

Why not just POST JSON data instead of a ton of individual parameters? This will allow you to do more things in the future instead of being restricted to the 256 character limit on the URL. I've never sent a POST request in Java however http://stackoverflow.com/questions/4205980/java-sending-http-parameters-via-post-method-easily should get you started.

 

Looked into the limit and incoming requests when posted in the request headers are up to 16kb.

 

http://stackoverflow.com/questions/15280027/is-there-a-size-limit-for-http-response-headers-on-google-app-engine

 

I need to get started on writing the documentation for how to implement my website into the scripts. 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...