topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday October 31, 2024, 6:34 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Croc: Command-line secure file transfer tool  (Read 4706 times)

Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 3,021
    • View Profile
    • Donate to Member
Croc: Command-line secure file transfer tool
« on: September 13, 2021, 03:47 PM »
Yes, there are tools like Mongoose, Civetweb, and Woof, and I have used them all and think they are very cool tools.  Croc is a little different...

Croc - secure and easy data transfer
https://schollz.com/software/croc/
croc.jpg
croc is a tool that allows any two computers to simply and securely transfer files and folders. AFAIK, croc is the only CLI file-transfer tool that does all of the following:

  • allows any two computers to transfer data (using a relay)
  • provides end-to-end encryption (using PAKE)
  • enables easy cross-platform transfers (Windows, Linux, Mac)
  • allows multiple file transfers
  • allows resuming transfers that are interrupted
  • local server or port-forwarding not needed
  • ipv6-first with ipv4 fallback
  • can use proxy, like tor

croc.gif

More details at the Github site: https://github.com/schollz/croc
Neato!


Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,937
    • View Profile
    • Donate to Member
Re: Croc: Command-line secure file transfer tool
« Reply #1 on: September 13, 2021, 10:27 PM »
Give  CarrotDAV a whirl. 

It works better if you have a webserver (Apache, NginX, IIS (6+), LightHTTP etc.) running, but the software is capable of activating a very minimalistic webserver itself for transferring files. And it does this through port 80 or 443. Ports that are open on almost all computers, firewalls etc. It doesn't encrypt or compress, you will have to do that yourself before transferring. But transferring is very simple.

Open the CarrotDAV GUI client and open connection to your (local) webserver or DropBox or Google Drive or OneDrive or FTPS server or Box server or IMAP server or Amazon Cloud server or SFTP server or SugarSync server or Swift server or file (LAN) server or iCloud server or Hubic server. Once connected, a window opens. Whatever you wish to transfer, you just drag-n-drop and done. (you can use it to transfer all your data from one service to another directly as well). There is even an command line client nowadays.

HTTP allows by default for 6 connections in a session, so if you are the only one using this during that session, transfers are really fast. 

Example:
For work I need to transfer archives from one continent to another. Using FTPS that takes just over an hour. With CarotDAV (and my locally running, internet facing webserver) just under 10 minutes. My webserver is an old Intel Core DUO (E8200) on a rather poor quality cable internet connection. Google throws way more hardware against the problem with Google Drive using a way, way better internet connection. Through their service I need about 8 and a half minutes for the transfer. I cannot automate the transfer sequence using Google Drive. With CarrotDAV automation (completely) is no problem.

Every developer (local/remote) just activates a build script after they submitted their changes remotely and about 10 minutes later the archives have arrived on my local server, ready for a whole sleuth of regression tests. Which also start automatically once the new build has been detected. A report regarding any of the regression tests which might have failed or underperform is usually already generated for those (local/remote) that start work early in the morning. So they can start fixing any problem that the night/shift (local/remote) might have introduced. Took a while to setup, but saves so much time in the long run.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,768
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Croc: Command-line secure file transfer tool
« Reply #2 on: September 14, 2021, 11:02 AM »
Thanks for bringing Croc to my attention! I've been happily using Woof for a few years for transferring files within my LAN. But this looks like it could be useful as a replacement or supplement to Woof, such as if I need to transfer a file to a remote computer. :Thmbsup:

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,188
    • View Profile
    • Donate to Member
Re: Croc: Command-line secure file transfer tool
« Reply #3 on: September 14, 2021, 11:14 AM »
Thanks for bringing Croc to my attention! I've been happily using Woof for a few years for transferring files within my LAN. But this looks like it could be useful as a replacement or supplement to Woof, such as if I need to transfer a file to a remote computer. :Thmbsup:

Agreed!

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,768
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Croc: Command-line secure file transfer tool
« Reply #4 on: October 10, 2021, 04:49 PM »
I used Croc for the first time today. It worked perfectly. Thanks again for mentioning it! :Thmbsup:

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: Croc: Command-line secure file transfer tool
« Reply #5 on: October 12, 2021, 11:01 AM »
A similar tool: magic wormhole
Some discussion of both here https://news.ycombin...com/item?id=27262193
Croc had some vulnerabilities earlier this year but are fixed now.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,188
    • View Profile
    • Donate to Member
Re: Croc: Command-line secure file transfer tool
« Reply #6 on: October 12, 2021, 11:57 AM »
Thanks for the info on Magic Wormhole. Love the fact that it has a gui and a mobile client!

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,937
    • View Profile
    • Donate to Member
Re: Croc: Command-line secure file transfer tool
« Reply #7 on: October 19, 2021, 10:11 PM »
As I was in need of transferring a rather large file (about 400 GByte) from a remote location a problem was encountered. None of the computers I normally use for file transfer is able to cope with such a large file. So, I was tempted to try out croc to transfer the file directly to my workstation.

The remote computer is not a "weakling" by any stretch of imagination (16 GByte RAM, 3 year old Intel Xeon CPU, fast drive), but waiting 7+ hours now for a code to be generated by croc (to actually start the transfer) is rather long. Even when the file is about 400 GByte.

And installing Python on both the remote PC and my workstation just to make Magic WormHole work, seems less than ideal as well. 

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,188
    • View Profile
    • Donate to Member
Re: Croc: Command-line secure file transfer tool
« Reply #8 on: October 20, 2021, 10:21 AM »
As I was in need of transferring a rather large file (about 400 GByte) from a remote location a problem was encountered. None of the computers I normally use for file transfer is able to cope with such a large file. So, I was tempted to try out croc to transfer the file directly to my workstation.

The remote computer is not a "weakling" by any stretch of imagination (16 GByte RAM, 3 year old Intel Xeon CPU, fast drive), but waiting 7+ hours now for a code to be generated by croc (to actually start the transfer) is rather long. Even when the file is about 400 GByte.

And installing Python on both the remote PC and my workstation just to make Magic WormHole work, seems less than ideal as well. 


I didn't have to install Python to get Magic Wormhole to work. There's a self contained exe.

https://magic-wormho.../latest/welcome.html

Or install Wormhole William - https://github.com/p.../releases/tag/v1.0.5

Or Wormhole Gui - https://github.com/Jacalz/wormhole-gui

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,768
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Croc: Command-line secure file transfer tool
« Reply #9 on: October 20, 2021, 02:28 PM »
As I was in need of transferring a rather large file (about 400 GByte) from a remote location a problem was encountered. None of the computers I normally use for file transfer is able to cope with such a large file. So, I was tempted to try out croc to transfer the file directly to my workstation.

The remote computer is not a "weakling" by any stretch of imagination (16 GByte RAM, 3 year old Intel Xeon CPU, fast drive), but waiting 7+ hours now for a code to be generated by croc (to actually start the transfer) is rather long. Even when the file is about 400 GByte.

It sounds like it uploads the file to the proxy before generating the code.

If both PCs are running Windows, I would still recommend an older version (1.x) of BitTorrent Sync (BT Sync) for transferring large files. It's direct peer-2-peer with no intermediary server, and does it in little parts using BitTorrent. So transfers can start almost immediately and if the connection gets interrupted partway through, it can resume without issue once the connection is re-established.