NetPro: Packet Analysis and Visualization tool

Have you created a useful tool? or Do you want to get help building one? This is the right place!
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
SaveGame
Posts: 121
Joined: Thu Oct 30, 2014 9:54 pm

NetPro: Packet Analysis and Visualization tool

Post by SaveGame »

Hello fellow developers,

NetPro has gone open source!

Screenshots:
Image
Image
Image

Download link: http://netpro.revengineer.eu/1.7/l2emup ... 7-noecj.7z
JavaDoc: http://netpro.revengineer.eu/1.7/apidocs/ | http://netpro.revengineer.eu/1.7/l2emup ... avadoc.jar

Best regards,
SaveGame (MightyL2 / L2Faithless / VelceoL2)
Last edited by SaveGame on Sun Apr 09, 2017 7:45 pm, edited 17 times in total.
Image
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: NetPro: Packet Analysis and Visualization tool

Post by UnAfraid »

You know there is open source application that does the same thing and has pretty nice GUI and functionality its called Packet Samurai you can find it's source here https://github.com/l2jserver2/packetsamurai
Image
SaveGame
Posts: 121
Joined: Thu Oct 30, 2014 9:54 pm

Re: NetPro: Packet Analysis and Visualization tool

Post by SaveGame »

There's no problem with adding custom functionality by adding java source files under /script (main issue - no guide).
There's no problem to define any protocol/packet that comes in the future.
Basically, everything you need to use/customize this application is externalized (given on a silver platter).

P.S. I still assume all people know about packetsamurai. Aion was released ages ago, and even in that fork you can see that last changes (related to l2) were done over 3 years ago. Use of one or other tool will always boil down to personal preference; I have made this tool available because to me it looks like all packet sniffers (hlapex, l2phx, packetsamurai, etc) have been abandoned and left to rot. Some competition is better than none, isn't it?

P.P.S. This application runs as a transparent proxy. It does not require winpcap/winjpcap.
Image
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: NetPro: Packet Analysis and Visualization tool

Post by UnAfraid »

SaveGame wrote:There's no problem with adding custom functionality by adding java source files under /script (main issue - no guide).
There's no problem to define any protocol/packet that comes in the future.
Basically, everything you need to use/customize this application is externalized (given on a silver platter).

P.S. I still assume all people know about packetsamurai. Aion was released ages ago, and even in that fork you can see that last changes (related to l2) were done over 3 years ago. Use of one or other tool will always boil down to personal preference; I have made this tool available because to me it looks like all packet sniffers (hlapex, l2phx, packetsamurai, etc) have been abandoned and left to rot. Some competition is better than none, isn't it?

P.P.S. This application runs as a transparent proxy. It does not require winpcap/winjpcap.
Packet Samurai was initially created for L2 by KenM and Wooden (Former L2J Devs) https://www.assembla.com/code/PacketSam ... sion/nodes and Aion guys picked it from here and just implemented the Aion protocol which is identical to Lineage one
Image
Sdw
L2j Veteran
L2j Veteran
Posts: 855
Joined: Mon May 03, 2010 8:38 am
Location: France

Re: NetPro: Packet Analysis and Visualization tool

Post by Sdw »

The REAL question is : Can you reload the protocol data while sniffing, or loading a previous log :D
SaveGame
Posts: 121
Joined: Thu Oct 30, 2014 9:54 pm

Re: NetPro: Packet Analysis and Visualization tool

Post by SaveGame »

The tooltip is dated back to non-incremental loading, currently protocol definitions are reloaded as well (revision number, opcode table sizes and constant opcodes). This wording issue will be fixed in the next release:
Image

Also, in case you want to change the packet display configuration of a specific (active) protocol immediately after loading adjusted/new packet definitions, you may do so from the relevant dialog:
Image

@UnAfraid: Yes, thank you for further information (it does not contradict my statements).
Image
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: NetPro: Packet Analysis and Visualization tool

Post by jurchiks »

Looks very good, though I really can't stand the Java-style GUI. Not that it's your fault, obviously.

There is, however, the question of how long are you planning to support this application. If you're only making it in the hope that someone will use it, you will probably be disappointed since most users of such stuff never declare themselves, i.e. you will never know.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7005
Joined: Tue Aug 11, 2009 3:36 am

Re: NetPro: Packet Analysis and Visualization tool

Post by Zoey76 »

I was going to make a public sniffer, I guess there is no need now :wink:
Powered by Eclipse 4.30 ๐ŸŒŒ | Eclipse Temurin 21 โ˜• | MariaDB 11.3.2 ๐Ÿ—ƒ๏ธ | L2J Server 2.6.3.0 - High Five ๐Ÿš€

๐Ÿ”— Join our Discord! ๐ŸŽฎ๐Ÿ’ฌ
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: NetPro: Packet Analysis and Visualization tool

Post by jurchiks »

You can always share what you have.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
SaveGame
Posts: 121
Joined: Thu Oct 30, 2014 9:54 pm

Re: NetPro: Packet Analysis and Visualization tool

Post by SaveGame »

LoneRanger wrote:There is, however, the question of how long are you planning to support this application. If you're only making it in the hope that someone will use it, you will probably be disappointed since most users of such stuff never declare themselves, i.e. you will never know.
For a start, I am mainly asking for what features, based on the public opinion, would add the most value to this application. For example, you could say that manual packet injection (automated can be scripted) is very lacking, since you must use a single dialog, so alternating between packets requires you to cut/paste copy/paste, which is -_- (annoying). If there are no requests, I will continue at my own pace, so I will most probably write some guides, continue with old packet definition reviews (you may have noticed that almost all definition files are tagged with "auto generated" comments) to deal with the unbelievable mess caused due to the specifics of the old definition format (and no incremental loading).

Bear in mind that this application has been in development internally since Feb 2011 (if we include the time it was a part of L2JFree). Major overhauls were already executed when certain feature implementations didn't live up to expectations. So there you have it, over 3.5 years of on/off development hasn't killed this application off :)

In any case, I plan to maintain/support this application in the foreseeable future. The scope of this application is within limits where I can make these guarantees. In more concrete terms, another 3-5 years shouldn't be much of a problem. The codebase has already matured to a certain point; higher maturity = lower maintenance costs.
LoneRanger wrote:Looks very good, though I really can't stand the Java-style GUI. Not that it's your fault, obviously.
Well, currently the app forces Nimbus, mostly because I find that the backwards-compatible Metal is just too.. blocky? Round/Rounded components are associated with modern GUIs. However yes, that impedes your ability to select, for example, native L&F. I'll change the app to respect a manually set L&F, since that's the way it should work.

Technically, I have another application, which is skinned a lot better, but there are some inherent issues with Swing when it comes to font rendering and caret positioning. Some effects (like fractional metrics) will not be taken into account and the caret location is calculated deep deep inside JDK. Of course, I could add an agent to patch that method(s), like I did for the aforementioned app when Zip FS was/is broken in Java 7, but that is always a last-resort solution.
And I'd like to keep to standard Swing and/or JavaFX components. At least for now. So yeah, skinning is hardly an option for now. I will definitely take some time to look at Synth L&F feasibility, but those faulty methods will need patching. Let me first make a screenshot of what the UI would look like in that case...
Image
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7005
Joined: Tue Aug 11, 2009 3:36 am

Re: NetPro: Packet Analysis and Visualization tool

Post by Zoey76 »

LoneRanger wrote:You can always share what you have.
I haven't started, and I don't share unfinished work.
Powered by Eclipse 4.30 ๐ŸŒŒ | Eclipse Temurin 21 โ˜• | MariaDB 11.3.2 ๐Ÿ—ƒ๏ธ | L2J Server 2.6.3.0 - High Five ๐Ÿš€

๐Ÿ”— Join our Discord! ๐ŸŽฎ๐Ÿ’ฌ
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: NetPro: Packet Analysis and Visualization tool

Post by jurchiks »

>over 3.5 years of on/off development hasn't killed this application off
That's very good to hear :)
>Round/Rounded components are associated with modern GUIs.
Yes, but not Java style, they're TOO round, if you know what I mean.
Besides, lately the flat/square Microsoft UI has become popular, and I, for one, like it. The less fluff, the better.
>respect a manually set L&F
Where would one manually set that? In app configs? Or somewhere globally?
>Synth L&F...
Looks like a LOT of work.

@Zoey - then what was the point in posting about it?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
SaveGame
Posts: 121
Joined: Thu Oct 30, 2014 9:54 pm

Re: NetPro: Packet Analysis and Visualization tool

Post by SaveGame »

@LoneRanger:
You just set a system property, as usual with all java's overrides.
Alternatively, you can add a swing.properties file to each installed jvm/jre to force a certain default. This affects all applications run on that JVM (incl. applets, JWS, etc).
Alternatively, you may use the java control panel to set the aforementioned property in the default JVM arguments. Even though I have only tested that with applets. Unsure if 'real' apps inherit these JVM args.

Anyway, here's Synth LnF in action, after I patched various things (e.g. SwingUtilities2), mostly due to the fact that the JDK finds it a good idea to throw away FontMetrics set on the Graphics object and make a new, unconfigured FM object to pass for methods very deep in the call stack.
Of course, to save time I used full-class patching VS logic fixing (which means, any time those classes change, I must update the patched version & most likely break compatibility with all previous jdk versions). But lets not get ahead of ourselves:
Image

(I had to hide some strings, since this is an UI example and not an advertisement of tool prohibited by forum rules (it was discontinued, for example you can see that 'List' swing component does not have a background).
Image
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: NetPro: Packet Analysis and Visualization tool

Post by jurchiks »

Looks great, of course, but sounds like an awful lot of work. Considering the app will be used mostly on Windows, I'd opt for default Windows look.

Anyway, is this an open-source or a closed-source project? If it was open-source, you could put it on Github and use its issue tracker, and wiki for guides and such.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
SaveGame
Posts: 121
Joined: Thu Oct 30, 2014 9:54 pm

Re: NetPro: Packet Analysis and Visualization tool

Post by SaveGame »

Currently, the project is not open source, even though there are plans for eventual open-sourcing in the future. There are two main reasons for this. First of all, the application is a part of a larger project catalog, which is hosted on bitbucket as a closed git repository. That means additional trouble when migrating if the source code history is to be retained. Not to mention the need to reevaluate the use of dependent projects (as seen in libs) and their inclusion to/exclusion from this affair :).
The second reason should be rather familiar for you: there is no point in forking an application that hasn't matured enough to be released. But it is always tempting, hence the standard situation of someone silently (or publicly) forking l2jserver, starting doing the same things as all people who tried previously, then running out of steam and dying off. The result is clear: hundreds/thousands of man-hours wasted on the same things and no winner at all. Everyone loses.

To sum it up, open-sourcing is planned with the release of version 1.0 (non-snapshot). Currently we are at 0.8, which means that a lot of internally planned features are available, hence my call to the general public for ideas. Namely, what else should be implemented in a controlled fashion, before people are free to rely on internal implementation details, subject to change on any future commit at their leisure.

Basically, I am trying to build up a user base and make them familiar with what NetPro has to offer right now.
For example, the planned scripting guide will include details such as where to find the javadoc, as well as how the example scripts were written, one step at a time, as well as what can/should and what cannot be achieved with scripting.

But then again, you could just say that I don't trust that people can implement features efficiently. Still, my experience in the open source field shows that people are content with/biased towards the first implementation provided, even if it is half-baked. And especially in l2j/l2jfree, you can see countless examples where simple methods maliciously refrain from doing what their name implies. The biggest laugh was naturally about the l2jfree's scripting engine (which was pretty much the same as l2jserver's). You would think that script_load/reload builder commands load or reload a script, but you would be wrong. One example (of countless I had come up with to disprove the fact that it has ever worked) is trying to reload a script class that is not a leaf in the class hierarchy (best if it is abstract and has many child classes, that's just gold).

To sum it up: NetPro will go open-source and I will continue maintaining it, but only when I deem the application/code base has matured enough.

P.S. There are also plans for proper localization, as done in L2JFree's Petition Manager and Vanity L2. Basically, localization with support for languages that are naturally more expressive than the English language, so that strings would not need to be artifically dumbed down when localizing the application, and thus the feel would be more natural for native speakers.
Image
Post Reply