A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

Anyone want to help me with more code?

1.1k views · started by 323 ·
#1
Anyone want to help me with more code?
I ask for help so much, it's pitiful. But then again, there's always that saying: "If you know what you're doing, you aren't doing it good enough."

But anyway, I'm getting "No protocol" errors in my compiler, but in Isonyx's HTTPRequest I can't find anything even relating to protocols.


import java.io.UnsupportedEncodingException;

class ZimbraCracker
{
public static void main(String[] args) throws UnsupportedEncodingException
{
HTTPRequest request = new HTTPRequest();
//Get URL
String source = request.get("http://zimbra.earlham.edu/zimbra");
//Print source
System.out.println("Page Source: " + source);

//Create variables for username and password
String username = "";
String password = "";

//Populate Post Data
String postData = "?loginOp" + "=" + "login" +
"&" + "username" + "=" + username +
"&" + "password" + "=" + password;
//Set URL
request.setURL("http://zimbra.earlham.edu/zimbra");
//Send post data
request.post("", postData);
//Get new source and print it to the screen
System.out.println("New Source:" + request.get(""));
}
}


EDIT: I just went to the page and noticed it automatically switches to HTTPS when you try to log in, could that be why? I'm guessing these HTTP wrappers don't support SSL.
#2
Nope, doesn't look like those wrappers support HTTPS.

Isonyx sucks. You should probably consider learning a different language for bot making.
#3
Nope, doesn't look like those wrappers support HTTPS.

Isonyx sucks. You should probably consider learning a different language for bot making.


I should find a way to add HTTPS support for them, haha. That is, as long as it's possible without other libraries that I have to download.

And yeah, I've been tempted to try bot making in Python or Visual Basic or something like that, but I really wanted to try to finish this in Java. Oh well, time to learn another language I guess. I have to learn Python for another project I'm working on, would it be a worthwhile language to try to make a bot in?
#6
Study the code a little bit.

Artificial is using built-in libraries for that login--urllib/urllib2. These are standard Python libraries in version 2.7.x. They're for web tasks like HTTP requests.

Everything you need is already there.

class HTTP:
def __init__(self):
self.cookiejar = cookielib.CookieJar()
self.opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookiejar))

def request(self, url, data = []):
return self.opener.open(url, urllib.urlencode(data)).read()

def setHeader(self, name, val):
self.opener.addheaders = [(name, value)]



This is essentially a wrapper in the form of a Class in the context of his code.

But if you want something more extensive, then try these ones made by Riddled a while back:

http://logicalgamers.com/files/python/3.2/score_sender/files/httpClient.py
#7
Study the code a little bit.

Artificial is using built-in libraries for that login--urllib/urllib2. These are standard Python libraries in version 2.7.x. They're for web tasks like HTTP requests.

Everything you need is already there.

class HTTP:
def __init__(self):
self.cookiejar = cookielib.CookieJar()
self.opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookiejar))

def request(self, url, data = []):
return self.opener.open(url, urllib.urlencode(data)).read()

def setHeader(self, name, val):
self.opener.addheaders = [(name, value)]



This is essentially a wrapper in the form of a Class in the context of his code.

But if you want something more extensive, then try these ones made by Riddled a while back:

http://logicalgamers.com/files/python/3.2/score_sender/files/httpClient.py


Sounds awesome, thanks a ton. Hopefully I'll be able to start releasing some stuff in python within a month or so.
#8
TU you program?
#9
ya bish wrote:
TU you program?


The Unintelligible is a fairly experienced programmer, he just doesn't post many programs or anything due to the fact that he was without a computer before. I think he got a new laptop now though, so hopefully we'll see some cool new programs coming from him.
#10
Yeah, haven't looked too far into implementing HTTPS into the wrapper, but seems like it'd be a real hassle, depending on the supporting modules I'd be using.

This JAVA sample program shows how to POST to an HTTPS (SSL) website

Is probably where I'd start from. Sorry for the lack of HTTPS support, but I'm not sure when or if I'll be implementing it.

Python is definitely the way to go, python comes equipped with its own HTTP wrappers that are very comprehensive.
A few other languages come equipped with native HTTP wrappers, Java really isn't the best language for making bots, in my opinion. Python seems like the way to go.

The Unintelligible is a fairly experienced programmer, he just doesn't post many programs or anything due to the fact that he was without a computer before. I think he got a new laptop now though, so hopefully we'll see some cool new programs coming from him.


Naaaaaaaaaaaaaaaa.
#11
I'm a programmer, yes. But I haven't touched any real code in almost a year now due to a lack of a computer.

I have one now. But I'm still pretty busy with things. I should be producing more by Summer time.