problem about netcat-Collection of common programming errors


  • user2307181
    android tcp raspberry-pi iptables netcat
    Hello im new in linux and android programming , my idea is send packet data from Raspberry Pi to Android Phone via TCP socket. .When connection started, the data stream well , after few data sent the streaming sometimes “jammed”. My android phone IP 192.168.43.1 My static Raspberry IP 192.168.43.5I try to change the port number but the connection still jammed, I try to reduce the size of the packet data but also still jammed .I assume the raspberry firewall (if it exist) is the problem Or maybe

  • baptx
    sockets unix debian netcat
    This question is following this one: Sockets working in openSUSE do not work in Debian?When working with sockets on my Debian system, I have to use nc -l -p port_number to simulate the server I want to talk with. If I’m using nc -l port_number, it will fail when using the socket connect function and strerror(errno) will say “Connection refused”.Netcat without -p option is working great on other Linux distributions, what should I change on my configuration?

  • FighterWks
    shell syntax syntax-error sh netcat
    Hello i have a problem in this script This feature is apparently bad but how to fix it?nc -z -v ip adress port if connect to ip adress port 13000 (tcp) failed: Connection refused then cd /usr/home/game/ ./game else exit fierror :5: Syntax error: “(” unexpected (expecting “then”)

  • Luis Daniel Rubiera
    linux scripting netcat busybox
    Im new in netcat, but im trying to use the same line in the busybox, as i do in my pc, i want to know how can i change de redirection operator.nc -w 30 IP 3031 -e <<<“info”this is the error-sh: syntax error: redirection unexpectedi think it doesnt like <<<, but should i switch it for what :/ ?many thanks!btw this script trows the information it get to the screen, by sending “info”

  • heavyd
    linux udp netcat
    I am using netcat on some Linux machines (see this other question), but seeing some unexpected behavior.Unlike the guide in the accepted answer, I am not using UDP tunneling to do DNS queries. I have a remote server that I can log into, but not install software on, and I’m trying to tunnel UDP traffic from my computer to the server, and then setup a separate tunnel to send UDP responses back from the server to my machine.The tunnel going from my machine to the server is working perfectly, howev

  • Zek
    linux centos relay netcat
    I have a legacy database application that can be accessed via ODBC on port 3000. I have set up a simple netcat relay on a bastion host so that this ODBC access can be done via the bastion host:while true ; do nc -n 192.168.1.2 -l 3000 0<backpipe | nc -n 192.168.1.3 3000 1>backpipe ; done 192.168.1.2: bastion host (CentOS 6.x [64]) 192.168.1.3: legacy server with ODBC service on port 3000 (Redhat EL 3.x)It works (kinda), but it is not reliable. What happens is that I often get errors and

  • smagch
    node.js sockets tcp netcat
    I want to compile some markdown posts thorough netcat. Here is Makefile.# Makefileall: $(POSTS)$(POST_DEST_DIR)/%.html: $(POST_SRC_DIR)/%.md | $(POST_DEST_DIR)@nc localhost 3000 < $< > $@@echo ‘compiled $@’.DELETE_ON_ERROR: $(POSTS)When TCP server exit with error, nc exit without error while Node.js nc wrapper exit with error. Here is a Node.js wrapper script.// nc.jsvar client = require(‘net’).connect(3000); process.stdin.pipe(client); client.pipe(process.stdout); client.on(‘error’, fu

  • A.Rashad
    c makefile aix netcat
    I have been trying to compile netcat.c on AIX for some time (using the command make aix), but the compiler gives me some weird feedback such as :”netcat.c”, line 117.12: 1506-275 (S) Unexpected text ‘int’ encountered.when checked the file netcat.c at line 117, I would find the line (second line in code below):#ifdef HAVE_BIND extern int h_errno; /* stolen almost wholesale from bsd herror.c */even if I changed the int into char for the same of testing, save the file and re-run the command I get t

  • Striketh
    centos kernel netcat kernel-panic
    I’ve gotten netconsole setup on a server that’s been having a variety of kernel panics lately and I’m trying to log kernel messages to another server. I’ve tested netconsole after setting it up on the host server by start a netcat session and typing in some random bits of data. These arrive on the capturing server without any issue and I’m able to view the text in the log file I have setup.However, nothing that is being logged in dmesg (i.e. kernel messages) is being forwarded to the capturing s

  • scttnlsn
    sockets node.js tcp telnet netcat
    I am issuing newline-separated text commands to a custom protocol TCP server. In the example below I issue 2 commands and receive a response written back. It works as expected in telnet and netcat:$ nc localhost 1234 command1 command2 theresponseThe same workflow is not working when connecting with Node.js:var net = require(‘net’); var client = net.connect(1234, ‘localhost’);client.on(‘data’, function(data) {console.log(‘data:’, data.toString()); });client.on(‘error’, function(err) {console.lo

  • Grezzo
    linux port nmap netcat
    I’m trying to get netcat to listen on port 4444, but it doesn’t seem to be working. I am checking to see if the port is open using nmap, but it doesn’t pick it up and I can’t figure out why. I have tried various ports with no joy.Here is a copy of my terminal so you can see what I am doing and what I have tried:#iptables -LChain INPUT (policy ACCEPT) target prot opt source destinationChain FORWARD (policy ACCEPT) target prot opt source destinationChain OUTPUT

  • Frank Science
    vim lisp scheme netcat
    My operating system is Debian Squeeze. Here’s the vim version:VIM – Vi IMproved 7.2 (2008 Aug 9, compiled Jul 12 2010 02:29:33)I read a tutorial on http://kovisoft.bitbucket.org/tutorial.html and tried to start REPL for MIT-Scheme. Unfortunately, I failed to start.When I pressed “,c”, it started a terminal window loading mit-scheme. Nothing showed in the REPL buffer of vim. Some errors showed in the terminal:Listening on port: 4005 ;netcat: “4005: inverse host lookup failed: Unknown host” ;To co

  • Michael Foukarakis
    image bash http netcat
    I’m trying to write a little HTTP server using netcat. For plain text files this works fine but when I try to send a picture, the browser displays only the icon for broken images. What I do is extracting the mime-type and size of a requested file and cat it to the client. The header of a request of my example picture looks like this:HTTP/1.0 200 OK Content-Length: 197677 Content-Type: image/jpegThis is my bash script which I launch with -e option of the netcat tool:#!/bin/bash# — OPTIONS index

Web site is in building