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.
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.Code: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("")); } }
Results 1 to 12 of 12
- 22 Mar. 2013 04:52pm #1
- Join Date
- Apr. 2010
- Location
- When freedom is outlawed only outlaws will be free
- Posts
- 5,113
- Reputation
- 195
- LCash
- 6.59
Anyone want to help me with more code?
- 22 Mar. 2013 07:00pm #2
Nope, doesn't look like those wrappers support HTTPS.
Isonyx sucks. You should probably consider learning a different language for bot making.
- 22 Mar. 2013 07:32pm #3
- Join Date
- Apr. 2010
- Location
- When freedom is outlawed only outlaws will be free
- Posts
- 5,113
- Reputation
- 195
- LCash
- 2.52
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?
- 22 Mar. 2013 07:42pm #4
Yes
Edit: Also, http://forum.logicalgamers.com/progr...ine-login.html
Check that out.
- 22 Mar. 2013 07:52pm #5
- Join Date
- Apr. 2010
- Location
- When freedom is outlawed only outlaws will be free
- Posts
- 5,113
- Reputation
- 195
- LCash
- 0.68
- 22 Mar. 2013 08:05pm #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.
PHP Code: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/pytho.../httpClient.py
- 22 Mar. 2013 08:29pm #7
- Join Date
- Apr. 2010
- Location
- When freedom is outlawed only outlaws will be free
- Posts
- 5,113
- Reputation
- 195
- LCash
- 0.82
- 22 Mar. 2013 10:51pm #8
TU you program?
Ya Bish
__________Contributions-
[How to make a FMP] • [FLP Guide] • [Gaia Gold FLP] • [Exchanging Guide]
[My Store] • [My Forum]
- 22 Mar. 2013 10:58pm #9
- Join Date
- Apr. 2010
- Location
- When freedom is outlawed only outlaws will be free
- Posts
- 5,113
- Reputation
- 195
- LCash
- 1.55
- 23 Mar. 2013 01:59am #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.
Naaaaaaaaaaaaaaaa.I don't get tired.
- 23 Mar. 2013 02:09am #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.
- 24 Mar. 2013 05:34pm #12
Use this library for Python: 20.5. urllib ? Open arbitrary resources by URL — Python v2.7.3 documentation
I'm not sure if my old wrapper will work with HTTPS.