views:

282

answers:

3

We have a legacy system that is essentially a glorified telnet interface. We cannot use an alternative telnet client program to connect to the system since there are special features built into the client software they have provided us.

I want to be able to screen scrape from this program, however that's proving very difficult.

I have tried using WindowSpy and Spy++ to check the window text and it comes up blank. It's a custom C program written by the vendor (they have even disabled selecting text). I'm really looking for a free option and something I may perhaps be able to use in conjuction with a scripting language.

It seems the only ways to grab text is directly from the Windows GDI or from memory, but that seems a little extreme.

Can anyone recommend any software/DLLs that might be able to accomplish this? I'd be extremely appreciative.

A: 

The following won't work if the data stream is encrypted, and check your licenses, to make sure it's legal. Why don't you just connect to it through a proxy that logs all the data transfers.

If it's really just working with text, this should be trivial.

A less desirable approach is to do screen captures and run OCR to capture the text. There are plenty of solutions available for both approaches, but I don't have any specifics that I can recommend.

lief79
A: 

I had a similar problem with a windows application using a custom text field that I couldn't copy. Luckily, it was a monospace font. Getting the data was as easy as grabbing a screen shot and writing a small python program to loop over each character in the image, convert to a string of 1s and 0s, and then use it as a key to a dictionary where I stored the mapping from bitmap->letter.

Of course, if you can use wireshark to reverse engineer the protocol, then that's worlds better.

Paul
A: 

I ended up simply opening the software running in memory in a hex editor (I used WinHex) and then found where the text resides in memory.
I then got memory scraping code for AutoHotKey and AutoIt which will read text of however many characters from a particular memory address.

Mrgreen