I have an application where some software talks via TCP/IP to some hardware but there are issues with the communication.
I need to quickly knock together a desktop application (initially running on Windows unfortunately but that's temporary so cross platform is important) that will run on the PC and to start with simply pass the messages back and forth whilst logging them, but will then need to start manipulating the messages as they pass through.
So instead of <software> <-> <hardware> I'll have <software> <-> <my app> <-> <hardware>
In effect I'm putting together a (legitimate!) man in the middle "attack".
What tools would anyone here use?
Node.js comes to mind (i have no experience of it). Probably Python with a suitable socket library (again, no experience...). The result needs to be fairly reliable (so will need to sensibly handle dropped connections, and not leak memory or lock up after a few hours/days). Obviously that depends on me doing things right but some tools make that easier than others...
My app doesn't need a GUI; a hand edited text file to provide configuration will suffice. But the ability to add one if it becomes useful would be handy.
node should be fine for that:
https://nodejs.org/api/net.html
I've not coded socket connections myself but have used it extensively with http (API server) and it's been rock solid.
A browser-based GUI could be added by using a HTTP framework to listen on a different port. Then maybe a script or shortcut to launch the browser pointing at localhost. Or if you prefer there are Qt and gtk bindings for node, it's probably worth investigating their stability if a non-browser UI is a requirement.
Neil
On 13/10/15 18:04, Mark Rogers wrote:
I have an application where some software talks via TCP/IP to some hardware but there are issues with the communication.
I need to quickly knock together a desktop application (initially running on Windows unfortunately but that's temporary so cross platform is important) that will run on the PC and to start with simply pass the messages back and forth whilst logging them, but will then need to start manipulating the messages as they pass through.
So instead of <software> <-> <hardware> I'll have <software> <-> <my app> <-> <hardware>
In effect I'm putting together a (legitimate!) man in the middle "attack".
What tools would anyone here use?
Node.js comes to mind (i have no experience of it). Probably Python with a suitable socket library (again, no experience...). The result needs to be fairly reliable (so will need to sensibly handle dropped connections, and not leak memory or lock up after a few hours/days). Obviously that depends on me doing things right but some tools make that easier than others...
My app doesn't need a GUI; a hand edited text file to provide configuration will suffice. But the ability to add one if it becomes useful would be handy.
On 13 October 2015 at 20:04, Neil Sedger alug@moley.org.uk wrote:
node should be fine for that:
https://nodejs.org/api/net.html
I've not coded socket connections myself but have used it extensively with http (API server) and it's been rock solid.
Thanks, it looks like it's one I should add to the mental toolbox so I'll go and explore!