exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

wcp.html

wcp.html
Posted Aug 17, 1999

Copy URLs with netcat. Run it backgrounded.

systems | unix
SHA-256 | 1da4239e5ef07b19f601025a0e1b9848bf2517afca1fa2d3835bbeba38093f62

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>
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    16 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close