Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Using ncat to read TCP stream --> send HTTP GET request
From: Elias Home <brianelias433 () comcast net>
Date: Mon, 16 May 2011 12:12:08 +0000 (UTC)


Hello, 

I'm attempting to get two devices to communicate with each other on my network.  The first device (sender) is able to 
send plain text via TCP to an IPAddress:Port when an event occurs.  The second device (receiver) is triggered by 
receiving an HTTP GET request; it then closes the socket as it should.  The problem is that the transmitter does not 
expect the socket to be closed after the string is sent - it is designed to send to a simple "open TCP port" that just 
monitors for TCP plain text traffic and doesn't respond (and certainly doesn't close the socket). 

I am able to send the following from the transmitter via TCP:  GET /rest/programs/0071/runThe n 
HTTP/1.1[CRLF]Authorizatio n: Basic xxxxxxxxxx[CRLF][CRLF] 

This works perfectly, however the HTTP server (receiver) replies with a 200 and then closes the socket.  The 
transmitter doesn't know how to hand this, and nothing works until I reset the socket connection. 



So, here's what I'm looking to accomplish: 

1.  Open a port on a Windows PC and listen for TCP plain text data; socket connections should NOT be closed on this 
port after data is received 

2.  When a particular plain text string is received over this port, an HTTP GET command must be issued to a different 
IP address:port.  It should be expected that this socket will be closed by the HTTP server. 

3.  The utility performing this task must be able to run in the background and be available to repeat this process for 
an indefinite number of triggers 


Is this possible with ncat?  Any help with an appropriate syntax (or other ideas on how to accomplish this) would be 
greatly appreciated. 





P.S.  I'm happy to provide specifics on what I'm trying to accomplish, but it seemed like it would make things even 
more long-winded.... 




Thanks, 


- Brian
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
AlienVault