Networking :: Sending Test Data From File To Port And IP
Apr 23, 2009
I'm working on testing some software, and I have a question. We have several files of binary data that we need to push through our application to test. It communicates via simple TCP sockets. Is there a way I can send this data to the socket from the command line? I tried doing something like this, but telnet never picked up the data.
I have an application where I am sending data via serial port from PC1 (Java App) and reading that data in PC2 (C++ App). The problem that I am facing is that my PC2 (C++ App) is not able to read complete data sent by PC1 i.e. from my PC1 I am sending 190 bytes but PC2 is able to read close to 140 bytes though I am trying to read in a loop.Below is code snippet of my C++ AppOpen the connection to serial port
I would like to send a data using one thread and receive a data using other thread by using a same socket connection using USD sockets. The calls i am using for sending and receiving are send(), recv(). let me know is it possible to send and receive the data parallel (Full duplex communication)?
I am trying to redirect connection to port 8980 to execute a telnet command to a local machine by issuing the following command : In Server 1 : socat TCP-LISTEN:8980,fork EXEC:/myscript,reuseaddr
My script contains #!/bin/bash telnet 192.168.20.12 //local Server 2
I am sending Binary data from the client to Server 2 via Server 1. So it happens that I have some characters in Hex translated to special characters in ASCII like open brackets or Commas etc.. and that closed the socket between the two machines.
I am writing a code in Python where a socket client changes data with the server. That works nice if the connection is up. However it is also supposed to work offline. So I need to be able to detect if the connection is up before sending data, but I was not able to do so. A summary of the code is like that:
if connected: data = "some data byte" try: socket.send(data) except: connected=False socket.close()
If I unplug the cable after the connection is ready then the socket sends data and does not detect the connection failure. What is amazing is that the client detects the connection failure just after the cable has been plugged again. Of course there is a loop in the code above and always that connected==False a new connection is made. How could the program detect the connection failure before sending data and then lead the code to an exception?
is it possible using a perl script to test for a socket listening on a UDP port on a remote host ?I work in an environment where netcat is not allowed and from time to time I need to see if a UDP port is open on a remote host.
trying read serial COM port and want to write that received data to file, now its writing only one sentence, but i want to write full file which coming on serial port, as i'm sending file from hyper terminal and reading on linux pc, If i put while loop its not writing anything,without while loop its writing only one line and if send big file then application terminates and then writes to file.But i need do write any size which coming on serial port.Finally i want write full file which is coming on hyper terminal, after writing the file it has wait for next data. This is my code,
I am trying to send text data from one PC to other using Serial cable. One of the PC is running linux and I am sending data from it using write(2) system call. The log size is approx 65K bytes but the write(2) system call returns some 4K bytes (i.e. this much amount of data is getting transferred). I tried breaking the data in chunks of 4K but write(2) returns -1.My question is that "Is there any buffer limit for writing data on serial port? or can I send data of any size?. Also do I need to continously read data from other PC as I write 4K chunk of data"Do I need to do any special configuration in termios structure for sending (huge) data?
I am trying to install mysql 5.1.44..so i downloaded the binary package, i extracted it and then followed the instructions that were in the manual but i keep getting this error when running this command
I have configured my router to behave like a wireless access point. I'm using hostapd as the utility to manage the access point. I am able to connect to the access point from my android phone.Now i need to send a file to the android phone from the access point.
Sent an email by using telnet on port 25 from the terminal. Telnet states my message was sent but I never got it. Is it on the hard disk somewhere. Is there a log file? Where did my email go? Did it go into the ehter? I opened port 25 on my firewall through gnome by selecting 25/smpt checkbox as a trusted service.
I would like to be able to test that a network mounted cifs(samba) share is actually mounted in a script file to do backups. I want to do this so that when my automatic backups run they actually go to the remote location or fail. Currently, if there is a network problem that prevents the network share from mounting, the files simply get copied to the folder (e.g. /media/backupmount) and end up filling up my small local hard drive.
In the firewall, I opened port 5900 for TCP traffic. Now the console is displaying packet information whenever a connection is made. Why does it send a message to stdout/stderr for an allowed connection? How can I stop it? Logging level is set to critical only, and not-accepted packets should only be logged for the internal and DMZ zones.
Here the description of the issue I am having.I am writing a bash test script which reads lines from a file, builds ISO messages, sends them to a server, reads the response with response code and reports the result of the test to a file or on the screen.The message that I need to send is 94 characters long.Here's the portion of a code that I initially wrote:
#~ Open socket. exec 3<>/dev/tcp/172.26.0.25/9991 #~ Send msg.
I have a question regarding Bluetooth with Bluedevil. Finally I got a connection working in one direction: sending files from my mobile (Google Nexus One with Android 2.3.3) to the computer. But I can not send files from my computer to the phone. I also tried to send files from my desktop to my Laptop and it fails. I also tried it the other way around: from Laptop to Desktop... fail.
What is it? Is it still a bug in Bluedevil and all I can do is wait? Or is there some package missing? The following packages (regarding bluetooth) are installed:
I am using centos 5, want to send a sets of binary data to other bluetooth device I know how to sent a file but dont know how to sent raw data. My case is like this I have a bluetooth device I need to send data to then after it process I need to get it back, I plan to do this all using terminal is that possible?
I want to do a simple port redirect, i.e. whatever comes trough whatever interface on port AAAA will get redirected to port BBBBI thought that iptables -t nat -I PREROUTING --source 0/0 --destination 0/0 -p tcp --dport AAAA -j REDIRECT --to-ports BBBBhowever it doesn't work, e.g. nc -v -w2 -z localhost AAAA gives:
nc: connect to localhost port AAAA (tcp) failed: Connection refused while nc -v -w2 -z localhost BBBB
I build a new test machine where i need to bring data from live machine. the data is kind of flat files and some propreitary application axigen mail server.
now what i am suffering from, which commands to do first practise. there is remote site with 1mps speed of wireless between live and test machine. on daily basis aprox 14gb .tar.gz files it need to move it.
i found scp,rcp,rsync,sftp etc. which is fastest way to replicate or copy to remote machines.
the data is on live machine /var/opt/application and on remote same directory too /var/opt/application
i try using scp it take aprox 8-10 hours to copy single 14gb file.
if possible where to see such commands logs results, if anything get down error discontinue while copying.
I have a desklet that, occasionally after toying with network stuff, will tell me that large amounts of data are being sent/received. What's a good way to determine what processes are occupying these resources?!
Since today morning we are getting this error, could not track down the cause
We are running : Postfix Amavist and Clam
70A6C45A1CE: to=<firstname.lastname@example.org>, relay=none, delay=0, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while sending end of data -- message may be sent more than once).