LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News
User Name
Password
Syndicated Linux News This forum is for the discussion of Syndicated Linux News stories.

Notices


Reply
  Search this Thread
Old 01-27-2014, 02:10 PM   #1
LXer
LXer NewsBot
 
Registered: Dec 2005
Posts: 128,329

Rep: Reputation: 118Reputation: 118
LXer: Useful netcat examples on Linux


Published at LXer:

Often referred to as the "swiss army of knife" for TCP/IP networking, Netcat is an extremely versatile Linux utility that allows you to do anything under the sun using TCP/UDP sockets. It is one of the most favorite tools for system admins when they need to do networking related troubleshooting and experimentation. This tutorial presents a few useful netcat examples, although the sky is the limit when it comes to possible netcat use cases.

Read More...
 
Old 01-27-2014, 02:37 PM   #2
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I believe the sending a file example may be wrong. From all other sites I see that the '-l' listen command is used for the server sending the file.
http://peppoj.net/2012/09/how-to-sen...rmerly-netcat/
http://www.binarytides.com/netcat-tu...for-beginners/
 
Old 01-27-2014, 03:07 PM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
i copied this from someone elses signature:
Code:
[schneidz@hyper ~]$ cat ./stuff/netcat.com
#!/bin/bash
PL=$(find /root/user/music -name "*.mp3")
NUM=$(echo $PL |wc -w)
{
while true; do
r=$(($RANDOM%$NUM))
s=$(echo $PL |cut -d ' ' -f$r)
echo "HTTP/1.0 200 OK\nContent-Type: audio/x-mp3stream\n\n"
dd if=$s bs=1024
done
} | nc -l -s address -p 8020
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Benchmark network connectivity in Linux using Netcat LXer Syndicated Linux News 1 01-13-2014 08:25 PM
LXer: 10 Useful Chaining Operators in Linux with Practical Examples LXer Syndicated Linux News 0 12-15-2013 11:31 PM
LXer: Linux rsync command with practical examples LXer Syndicated Linux News 0 10-27-2013 11:01 PM
LXer: Linux shell: understanding Umask with examples LXer Syndicated Linux News 0 12-05-2012 11:12 PM
LXer: 2 practical examples of Expect on the Linux CLI LXer Syndicated Linux News 0 04-18-2012 03:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News

All times are GMT -5. The time now is 06:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration