Results 1 to 4 of 4

Thread: Quick and dirty file transfer with netcat and a browser.

  1. #1
    Guest

    Quick and dirty file transfer with netcat and a browser.

    I use this to transfer files sometimes in a pinch.
    It uses the tool netcat which is nc on the command line.

    To create a simple single file server:
    nc -l -p 1234 < file

    This example listens on port 1234 on knoppix, and when
    you connect to that port in a browser from another machine, the contents of the file named 'file' are sent to the client.

    Here is an example of when I used it to get an excel file.
    I went to the directory where the file exists, and typed in:

    nc -l -p 1234 < 10.xls

    then i go to my browser on the other machine
    http://<knoppix-box-ip>:1234
    then i let it load (it looked garbled, but thats what the actual text of an excel file looks like if you were to cat it) and I think you have to hit stop after you see it's done.
    I then go to file and save, and save it as 10.xls.
    I can then open it in excel on the client computer.

    I know there are about 1000 different ways I could have grabbed that file, and I can't promise that it will work in your situation, but this is tips & tricks and I think it's a cool trick.

    Here are some more netcat tips and tricks.
    http://is-it-true.org/pt/ptips21.shtml

    Enjoy!

  2. #2
    Member registered user
    Join Date
    Nov 2002
    Posts
    85

    humm....

    I wonder what happened, I posted this one, but it's showed up as a Guest post....
    oh well....

  3. #3
    Junior Member
    Join Date
    Jan 2003
    Location
    Warsaw, Poland
    Posts
    6

    polish translation of this article / polskie t?umaczenie

    polish translation of this article / polskie t?umaczenie tego artyku?u :

    http://debiandiary.aso.strefa.pl/vie...asc&highlight=

  4. #4
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    USA, IL
    Posts
    1,041

    Re: humm....

    --That is really cool! It only works once per invocation (if the file transfer gets stopped in the middle, netcat craps out; but you could put it in a loop I suppose) but it sure beats having to start up an FTP server for just one file.

    --It kind of acts like a mini-http server, but you have to know what to save the file as on the client side.

    --Nice hack!

    Quote Originally Posted by adamm
    I wonder what happened, I posted this one, but it's showed up as a Guest post....
    oh well....

Similar Threads

  1. gAIM and File Transfer
    By astump in forum Networking
    Replies: 1
    Last Post: 03-19-2005, 01:34 AM
  2. Simple file transfer
    By Level7 in forum Networking
    Replies: 2
    Last Post: 10-14-2004, 02:34 PM
  3. Question about KDE's file browser
    By yonatan in forum General Support
    Replies: 2
    Last Post: 09-26-2004, 04:54 PM
  4. Compiling netcat
    By Liquidant in forum General Support
    Replies: 2
    Last Post: 05-26-2004, 06:34 PM
  5. Konqueror file browser configuration...
    By twgray in forum Hdd Install / Debian / Apt
    Replies: 8
    Last Post: 06-01-2003, 11:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


HYUNDAI -- HY HYbook 14 inch Laptop, Intel Celeron N4020, 4GB RAM UHD 600 picture

HYUNDAI -- HY HYbook 14 inch Laptop, Intel Celeron N4020, 4GB RAM UHD 600

$95.00



A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G picture

A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G

$13.99



Team T-FORCE VULCAN Z 16GB (2 x 8GB) 288-Pin PC RAM DDR4 3200 (PC4 25600) XMP picture

Team T-FORCE VULCAN Z 16GB (2 x 8GB) 288-Pin PC RAM DDR4 3200 (PC4 25600) XMP

$35.99



HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin picture

HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin

$12.90



Crucial 16GB (2x 8GB) Kit DDR3L 1600MHz PC3-12800 UDIMM Desktop 240-Pin CL11 RAM picture

Crucial 16GB (2x 8GB) Kit DDR3L 1600MHz PC3-12800 UDIMM Desktop 240-Pin CL11 RAM

$23.33



Crucial DDR3L 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3 16G DDR3 picture

Crucial DDR3L 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3 16G DDR3

$21.50



8GB PC3L-12800S 1600MHz SODIMM DDR3 RAM | Grade A picture

8GB PC3L-12800S 1600MHz SODIMM DDR3 RAM | Grade A

$12.00



CORSAIR Vengeance RGB Pro 32GB (2 x 16GB) 288-Pin PC RAM DDR4 3600 (PC4 28800) picture

CORSAIR Vengeance RGB Pro 32GB (2 x 16GB) 288-Pin PC RAM DDR4 3600 (PC4 28800)

$79.95



Dell Desktop Computer PC i7, up to 64GB RAM, 4TB SSD, Windows 11 or 10, WiFi BT picture

Dell Desktop Computer PC i7, up to 64GB RAM, 4TB SSD, Windows 11 or 10, WiFi BT

$311.98



Dell Desktop Computer i5 PC SFF Up To 16GB RAM 2TB HD/SSD 24in Windows 10 Pro picture

Dell Desktop Computer i5 PC SFF Up To 16GB RAM 2TB HD/SSD 24in Windows 10 Pro

$164.04