Reading Network Traffic - network-programming

I want to intercept all network traffic coming and going from a specific application on a Windows XP. How do I get started doing this?
The goal would be to reverse engineer the API used between the local software and the remote software and implement the same API in my own software package.
I can program in anything, Java is the easiest however.

Just use Wireshark, no need of programming anything.

Related

MQTT protocol on Ingenico's terminal e.g. iCT220

Is there any way to implement MQTT protocol on Ingenico's POS devices? I am currently working on iCT220 on which I want to implement IOT project. In this project, I will be sending some bytes (may be 400-1000 bytes) of data to the broker (server).
There are lots of source codes for the library available in the internet, but all make use of Linux or Windows socket libraries, where as Ingenico's devices come with proprietary libraries.
Have anyone implemented similar project on the same devices? Can anyone guide me to the process of implementation?
Thanks in advance,
Pankaj
Surely, you will need to build it from source.
I had a look at several client libraries and it looks that dependencies come mostly from IP stack, so there's very little to be implemented to have it running.
You should expect the proprietary OS issues to be thing of the past in short time - newer terminal lines are based on linux.

Tiny WiFi connected relay - where to start

I'm trying to get some initial info on my very first IoT project. I want to build a * tiny * wifi connected relay to control, let's say, lights. I'm a newbie in the hardware and electronics field though, but I'm a pro developer, so programming is not a problem.
Now, I've looked at different options and I can't seem to find really small components for the task. It might be I overlooked something, so please help me with available options.
Look at the ESP8266 devices. They have WiFi on chip and can be programmed using the Arduino environment. You basically write code in C++ to do whatever you need.
Here is an Amazon search for some examples:
https://www.amazon.com/s?k=esp8266
I recently did a project using a Linknode R4 (similar to above but with 4 relays) and programmed it as a web server with REST API. Then I built a front end with ASP.NET Core to that talks to the REST API for the devices on my network. The Arduino sketch for the web server is posted on Github at https://github.com/SteveInCO/LinknodeR4. I would assume it would work with little modification on the device I linked above.
The default program for the R4 allows controlling it via their website or iOS/Android apps, though I could never get it to work out of the box. Their model uses a polling method so the relays continually ask the server what to do next.
Windows IoT doesn't run on these small devices yet, but no reason you can't front end the Arduino API with a UWP app running under Windows IoT on a Raspberry Pi instead of the web app like I did. I think the eventual plan is for ASP.NET Core to be able to run on an ARM based system like a Raspberry Pi, but last I checked it wasn't quite there yet.

Implementing ospf topology collector

I need to implement a software module that is able to retrieve the topology of an autonomous system.
Looking at the various protocol that are implemented in Cisco routers i concluded that the only two alternatives to obtain topology are smnp and ospf.
The first one is a workaround and i don't want to use it, this leads to ospf.
I haven't found library in c, java and python that are usable; this one ( http://www.ospf.org/ )is probably the most complete but comes without documentation and i don't have enough time to analyze all the code.
So i found quagga that can implement a software ospf router; seems the perfect alternative since it can work with both real network and simulated network in gns3.
But it's possible to obtain the ospf routing table from quagga since everything is from command line?
This are my conclusions and doubts if someone can suggest something better or help me with the next step it would be appreciated since i'm stuck at the moment.
Use quagga's ospfclient feature. There is already an example provided in the ospfclient directory (see ospfclient.c) which will show you how to retrieve the LSA database from a quagga/ospfd instance. For this solution to work you need to attach a PC to one of your OSPF backbone routers and configure quagga/ospfd on it to successfully learn the routes then you start your ospfclient to retrieve any information you need.

Determine proxy type in Delphi XE7

I am currently working on an application which have to determine the type (CONNECT, Socks4, Socks5 etc.) of one or more given proxies and connect through them.
Unfortunately I have no approach to reach my goals and hope somebody can help me.
I saw in a tool (GSA SEO Indexer) that this bahvior is somehow possible. The tool has a built-in proxy finder and checker which is able to determine the proxy type:
I am using Delphi XE7 w/ Indy.
There are proxy detection protocols available, such as WPAD. You can use that to obtain details about proxies on a WPAD-enabled network, and then you can connect to them as needed.

Porting Windows demo apps to WinCE/XP Embedded

We have a range of PC demonstration programs for our microcontroller products. The programs typically connect to a USB HID chip on the microcontroller board. The USB chip acts as a communications bridge, allowing the programs to communicate with the micros over SPI/I2C/UART. The programs can configure the micros, and get back status information to display to the user.
We are now looking to build some standalone demonstrations using single board PCs. We would like to reuse as much as possible of our existing demo app source code. Ideally, we could just run them as-is.
Does anybody have any advice on the best way forward? The basic options seem to be WinCE or XP Embedded boards. WinCE boards seem to pull less power, which would be an advantage from a battery life point of view.
Our existing demos are built either in C++ under Borland Builder, or in Delphi.
Thanks in advance.
EDIT: see my answer below with info from a board vendor.
Free Pascal/Lazarus can compile some forms of Delphi apps to WiNCE/arm. Even visual ones.
There isn't a Delphi version for WinCE, so you would need to rewrite the applications. The same applies for the Borland Builder's control libraries. Only if you have used plain Win32 API, you would be able to port your application to WinCE easily. You may also encounter problems with the hardware access part. The Serial Port driver may not work as is. Also, you need to find a WinCE board that can act as USB host and provides HID drivers (this isn't very common).
In conclusion, I believe that you would be better of with Windows XP Embedded boards. These should run your applications as they are.
As an update, and for future reference, I thought I'd post the results of our discussions with a WinCE board vendor here. Caveat: I haven't actually tried any of this.
The bottom line is that there isn't a straightforward way to do what we were hoping for (i.e., re-compile our existing demo applications to run under WinCE). The reason is that the generic HID drivers and standard APIs that exist in desktop flavours of Windows just aren't there in WinCE.
To talk to HID devices in WinCE you need to implement a custom HID driver. This needs to support an interface allowing user mode applications to communicate with the driver, and to construct HID reports to be sent to the physical device. As this interface would itself be custom, application code needs to be updated accordingly.
WinCE application development is generally done using Visual Studio and the Microsoft compilers. The approach recommended to us was:
Create a custom HID class driver. This could be based on, for instance, the Microsoft keyboard HID driver.
Create an API for talking to the driver.
Use .net to create our GUI applications, and use PInvoke to actually talk to the API.
The end result of all this head-scratching is that to avoid the time and learning curve associated with this approach, we're going to go for a board running XP. We can then use our existing demo applications straight out of box. The trade-off is that we'll have to live with substantially reduced battery life.

Resources