global security disclosure

wcp.html

wcp.html
Posted Aug 17, 1999

Copy URLs with netcat. Run it backgrounded.

systems | unix
MD5 | 162a9822d8a8e3f8023c9df6cb83ba58

wcp.html

Change Mirror Download
<title>Wcp: a simple HTTP URL copy</title>

<body bgcolor="ffffff">

<h4>wcp: a simple HTTP URL cp for UNIX</h4>

<hr>
More and more developers of applications/programs/other stuff on the
Internet are now beginning to distribute their files via HTTP only.
One drawback for people who do not have the fastest lines in the world,
is that you <i><b>cannot retrieve a document and have your proccess in
the background</b></i>.<p>

So I've built this simple but very helpful script named <i>wcp</i>
which simply copies the URL in question. It uses the <i>netcat</i>
program which is developed by:<a href="mailto: hobbit@avian.org">
*Hobbit* (hobbit@avian.org)</a>. <i>Netcat</i> is available from the
following URL:<a href ="ftp://ftp.avian.org/src/hacks/">
ftp://ftp.avian.org/src/hacks/</a>. If you
do not want to use <i>netcat</i> you may substitute <i>nc</i> with
<i>telnet</i>.<p>

<pre>
#!/bin/sh
# @(#)wcp.sh, copy web pages, adamo@dblab.ntua.gr

[ $# -ne 1 ] && {
echo Usage: wcp http://host:port/path/name
exit 1
}

proto=`echo $1 | cut -d: -f1`
host_port=`echo $1 | cut -d/ -f3`
host=`echo $host_port | cut -d: -f1`
port=`echo $host_port | cut -d: -f2`
pathname=`echo $1 | cut -d/ -f4-`
file=`echo $pathname | awk -F"/" '{print $NF}'`

exec 2>${file}.wcplog
exec 1>$file
echo GET /${pathname} | nc $host $port

exit $?
# end of file
</pre>

<a href="mailto: adamo@dblab.ntua.gr">-- adamo@dblab.ntua.gr -</a>.

</body>

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    37 Files
  • 2
    May 2nd
    53 Files
  • 3
    May 3rd
    33 Files
  • 4
    May 4th
    4 Files
  • 5
    May 5th
    10 Files
  • 6
    May 6th
    17 Files
  • 7
    May 7th
    19 Files
  • 8
    May 8th
    36 Files
  • 9
    May 9th
    34 Files
  • 10
    May 10th
    35 Files
  • 11
    May 11th
    20 Files
  • 12
    May 12th
    18 Files
  • 13
    May 13th
    11 Files
  • 14
    May 14th
    27 Files
  • 15
    May 15th
    58 Files
  • 16
    May 16th
    54 Files
  • 17
    May 17th
    25 Files
  • 18
    May 18th
    53 Files
  • 19
    May 19th
    9 Files
  • 20
    May 20th
    15 Files
  • 21
    May 21st
    25 Files
  • 22
    May 22nd
    32 Files
  • 23
    May 23rd
    35 Files
  • 24
    May 24th
    26 Files
  • 25
    May 25th
    25 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close