0


Thumbs Up |
Received: 0 Given: 0 |
Dear A2S,
I saw that there where a few HTTP Bots written in java I also want to build 1 but how to start of with the HTTP Request.
Can I build a easy method for it or is there one? How should I start with building the bot? Is there someone that can give me a start?Similar Threads:
Thumbs Up |
Received: 44 Given: 50 |
There is no easy way to do this.
You can look into this https://a2s.in/botting/1866-unibot-c...lkthrough.html
Or if you want to learn about http requests in C# I can find well explained ebook
Basicly I'm using this 2 classes for my Http requests:
Honoki | Java HTTP Wrapper
I edited them both a lot to fit my needs, but you can start with it. They have some disadvantages regarding cookies because the cookies are globally saved, not per domain.
I'm still new to screwing with http requests in java but maybe I can help you a little. (or confuse you :P)
This might be difficult to grasp if you don't already understand http requests and what they are made of. You will need some way of viewing the http requests that are being sent before you can send one in java. Download Fiddler, or some tool, or use a network analyzer in your browser. Google Chrome has one built in if you look at the Network tab of inspect element. I use an add-on for Firefox called HttpFox. I like the way it's organized. :P
I don't know how much you understand about http at the moment so here are some posts from @atheus that may help you understand. (or confuse you)
HTTP Requests and GET and POST
The best way to learn is probably just to screw around with it yourself. Look at http requests with Google Chrome(inspect element -> network) and try to understand how they are structured and what everything means. Once you think you understand HTTP requests you might be able to start using java to send these yourself.
Here's a simple example on how you would send an http request in java and catch a response:
This is a very simple example and doesn't involve sending any http headers along with it.
It might be annoying since you probably don't understand what a URLConnection object is or a BufferedReader but you just need to screw around with it and this will become very easy for you.
I hope I didn't confuse you haha :P
Thumbs Up |
Received: 0 Given: 0 |
It's not my code xD
I stole it from the java documentation https://docs.oracle.com/javase/tutor...ngWriting.html
Thumbs Up |
Received: 0 Given: 0 |
But how would you invoke clicking buttons? Example your warofclicks bot.
I will talk to Chillivanilli about this situation in java. I hope I can contribute something ASAP also thanks for your offer in C# the only thing is I have more expierence in Java atm and for C# I need to download that heavy Visual Studio and Java is easy to run with eclipse for GUI or console
Thumbs Up |
Received: 0 Given: 0 |
Bookmarks