Quote:
Originally Posted by shitboi
looks cool, i just downloaded it, but can't get it working.
PacketViewerUI requires some classes from Packet Logger project, thus i have dumped their packages into the same project.
Curently I still have some errors that i can't get past before i can test this. Please offer me some advices.
|
I can't really see if its right or not from ur thumb nail pic.. when i open it, i can't see the text. The image resolution is too low. Can u dump one on
and drop a link.
Step 1) File -> New Project...
Step 2) Netbeans Modules -> Netbeans Platform Application
Step 3) Copy the two folders in the zip into the same folder as your project.
Step 4) In netbeans, expand your project out. Right Click Modules -> Add Existing..., then add each the modules one at a time (the folder things, they will look like blue puzzle pieces)
Now you will have the packet ui window inside your app, but there is a few more steps to get data following in it.
Step 5) Right Click the Modules -> Add New... . Create a new Module called something like
NameOfMyProgramCore
Step 6) Expand the Module you have just made, Right Click Libraries -> Add Module Dependance. Start Typing in "Packet Logger API", then add it.
Step 7) Inside your new Core module, create a class called something like PacketLogCookieImpl that implements PacketLogCookie. Use alt-enter to help auto import PacketLogCookie interface and alt-enter again for it to put in the methods u need to implement. You'll also need to implement PacketObject as something like PacketObjectImp for use in PacketLogCookieImp, you may use a class in a class to cut down on the number of files if u wish.
For demo-ing it easily without hooking it up to a conquer client (i have other modules not provided that does this). Right click on ur Core projects packet and go "Add Window", this will create a TopComponent which will represent your hooked conquer client later on but not now.
Inside the code for your TopComponent construct your implementation of your PacketLogCookieImp with the class;
private PacketLogCookieImp packetLogCookie = new PacketLogCookieImp();
just in the class, not in any methods
Then inside the constructor of your TopComponent...
public MyWindowTopComponent() {
// some code here, leave it alone
.
.
.
// Then add this
associateLookup(Lookup.singleton(packetLogCookie)) ;
}
And thats it... assuming you have many windows open for many conquer clients later on. When you selected a different client window, it will automatically make the Packet UI window show the packets for the selected client, without you needing to tell it to switch to another client. (thats what associateLookup does)
There are other ways to do this too, by using InstanceContent and AbstractLookup, so you can make the packet ui window switch between clients as you selected different clients in a list (if u were doing a list of attached clients also, not just windows)
Following these tutorials though will really help
Doing those tuts will explain what im getting at, and how to use the two provided modules in your app. Like part 2 of the tutorial, the history window kinda represents the same idea as the packet ui window. and tut 3 tells ya about InstanceContent and AbstractLookup.
I may release a full project later complete with the modules, to make it easier to try out before using the individual modules.
--------------
Heres my current setup as of now
As you can see there are a few more reusable modules now.
- The PacketInterpreterAPI provides a service interface for all the packet interpreters for all versions of conquer. Like Conquer5886PacketInterpreter provides a service for PacketInterpreterAPI for conquer version 5886 styled packets, and when the packets change a new module will be made for that version of conquer ConquerXXXXPacketInterpreter where XXXX is the new conquer version. All packet interpreter modules will be kept even for old versions so they can be reused for old conquer's or spanish conquer client which may use older packets.
- The HookAPI provides a service interface for hooking packets of conquer clients. The modules that implement this service may be memory based packet proxies or actual packet encryption/decryption socket based proxies. The Core module only knows about HookAPI and not the services provided to/by it. The rest of the program does not need to be concerned if its memory based or packet based.
- MockHookAPI provides a fake conquer clients as a service for HookAPI for testing the user interface without needing to hook to a real conquer client. (You can see MockConquer.exe in the pic on the 1st post, those are for testing)
- Win32HookAPI the current hooking mechanism i'm using, its also a service for HookAPI. Later on I may get it to do pattern searching and get it to inform a range of conquer clients it will work on through some methods, then set up many modules in a similar style to the packet interpreters.
- Also others can make AppleHookAPI for the Apple version of conquer, and the rest of the code stays the same, allowing ya to use this bot for a Mac. I say "others", bcuz i dont own a mac and have no idea how to do remote process communication in a mac os. If later someone can provide just that one module, then its an instant mac conquer bot.
- RadarUI is the radar im currenting workin on.
- jna allows java to use kernel32 functions for the Win32Hooking module
And thats pretty much where im at so far. I will need a bot api module to allow people to make bots for it. I might do some Ruby & Python extension modules also, which will allow for some bots to be scripted.
Thats all i've got planned so far