Tracking network calls from a Desktop application

121 views
Skip to first unread message

pathankhan salman

unread,
Mar 11, 2014, 11:13:46 PM3/11/14
to wncc...@googlegroups.com
Hi,

Say there is a desktop application, which is used to enter the data into a remote DB. The application asks for table name (drop down) and values to enter (text box). I want to automate the procedure. I want to know, once I enter the data, what is the network call the application is making, so I can make the call myself and add the data through a script.

Thank you,
Salman Khan,

My details : About me

Pritam Baral

unread,
Mar 12, 2014, 6:35:52 AM3/12/14
to wncc...@googlegroups.com
I'm assuming whatever DB you're using doesn't have an API, protocol, or any clients. But on the off chance you are mis-informed, I'd suggest looking for them online first.


If you really, really want to debug an undocumented protocol on-the-wire:

Wireshark jumps to mind, and it is very powerful tool, if used properly.
Usual "improper"-nesses would be noise from other network using applications, custom protocols over TCP/UDP, and (worst of all) SSL/TLS.

The former can be simply handled by not running other processes, (a cooler way would be to use your firewall in conjuction with Wireshark, but I guess that's far too technical for OP)



 

Regards,
Chhatoi Pritam Baral



--
--
The website for the club is http://wncc-iitb.org/
To post to this group, send email to wncc...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Web and Coding Club IIT Bombay" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wncc_iitb+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

aman mangal

unread,
Mar 12, 2014, 6:54:48 AM3/12/14
to wncc iitb
Hi,

Generally, languages have mock libraries which are used for testing purposes. You can install one for yourself and it will block any network call made by the application. Let me give you an example.

I developed an application in Ruby and it used to make some REST calls to external servers. For the purpose of unit testing, I used 'webmock' & 'mocha' to intercept these calls and return some artificial responses to the calls made by the application. If I didn't use to specify the response, it used to throw errors. In fact, I used to wait to see these errors and then used to specify my response to any call.

I believe there will be similar libraries for other languages as well. Such kind of testing is very basic and famous but the idea of different libraries could be different.

Aman Mangal
final year Undergraduate Student
Department of Computer Science & Engineering
IIT Bombay
www.cse.iitb.ac.in/~amanmangal

Dilawar Singh

unread,
Mar 12, 2014, 7:10:19 AM3/12/14
to wncc_iitb
I am assuming that you want to learn how to integrate an client with remote database such as writing a script to send files to google-drive or something like that.
 
Usually buttons and mouse clicks in an application creates "queries" and they are sent to database server, remote or local. Database responds to these queries by either modifying data or returning some of it. Remote database servers are usually hidden from users, and many times only "read only" access is given to users. And that is a recommended practice else it is much easier to screw the whole setup. For example, google provides interface library (Application Programming Interface - API) to access its database so you can try locating which API your desktop application is using. Railways also gives you access to its database through web-browser. 

See if some SQL-db providers gives you a free database hosting service. You can play around with them using scripts. But I am not sure if IITB proxy will allow you.

Nonetheless, you can play with sqlite3 or some other XML based database. On this group, I shared a script which keeps count of accessed directories and returned the most accessed one when asked: it uses sqlite3. All SQL based database have similar looking query structures. I'd suggest to set up a MYSQL database on your machine, and do some basic querying with it. Once you are comfortable doing it, rest will immediately follow.

-
Dilawar



On Wed, Mar 12, 2014 at 8:43 AM, pathankhan salman <pathankh...@gmail.com> wrote:

--
--
The website for the club is http://wncc-iitb.org/
To post to this group, send email to wncc...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Web and Coding Club IIT Bombay" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wncc_iitb+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Dilawar
NCBS Bangalore
Reply all
Reply to author
Forward
0 new messages