{"id":19265833,"url":"https://github.com/eze-kiel/shaloc","last_synced_at":"2025-10-14T01:14:45.298Z","repository":{"id":56103678,"uuid":"315385018","full_name":"eze-kiel/shaloc","owner":"eze-kiel","description":"LAN-scoped command line sharing tool with cool features: zip archives, AES-256, download limits...","archived":false,"fork":false,"pushed_at":"2020-11-26T17:58:01.000Z","size":115,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-14T01:14:41.639Z","etag":null,"topics":["aes","cli","encryption","go","golang","http","lan","share","zip"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eze-kiel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-23T17:07:09.000Z","updated_at":"2022-04-16T03:34:19.000Z","dependencies_parsed_at":"2022-08-15T13:10:48.189Z","dependency_job_id":null,"html_url":"https://github.com/eze-kiel/shaloc","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/eze-kiel/shaloc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eze-kiel%2Fshaloc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eze-kiel%2Fshaloc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eze-kiel%2Fshaloc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eze-kiel%2Fshaloc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eze-kiel","download_url":"https://codeload.github.com/eze-kiel/shaloc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eze-kiel%2Fshaloc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017452,"owners_count":26086081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aes","cli","encryption","go","golang","http","lan","share","zip"],"created_at":"2024-11-09T19:48:58.444Z","updated_at":"2025-10-14T01:14:45.271Z","avatar_url":"https://github.com/eze-kiel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eshaloc\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\u003cb\u003eSHA\u003c/b\u003ere files \u003cb\u003eLOC\u003c/b\u003eally !\u003c/p\u003e\n\n`shaloc` is a LAN-scoped sharing tool. With only 2 main commands, it is designed to be intuitive, easy and fast to use.\n\nIt has some cool features: URI randomization, AES-256 encryption/decryption, archive creation...\n\n\u003cp align=\"center\"\u003e\n\n  \u003ca href=\"https://goreportcard.com/badge/github.com/eze-kiel/shaloc\"\u003e\n    \u003cimg src=\"https://goreportcard.com/badge/github.com/eze-kiel/shaloc\" alt=\"Go Report Card\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/eze-kiel/shaloc/releases\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/eze-kiel/shaloc\" alt=\"Releases\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/eze-kiel/shaloc/actions\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/workflow/status/eze-kiel/shaloc/Release%20Go%20project\" alt=\"Build\"\u003e\n  \u003c/a\u003e\n\n\u003c/p\u003e\n\n- [Getting started](#getting-started)\n- [Usage](#usage)\n  - [Share a single file](#share-a-single-file)\n  - [Share a folder](#share-a-folder)\n  - [Share something a limited number of times](#share-something-a-limited-number-of-times)\n  - [Share an encrypted file/folder](#share-an-encrypted-filefolder)\n  - [Clean shaloc garbage](#clean-shaloc-garbage)\n  - [Update shaloc](#update-shaloc)\n- [Completion](#completion)\n  - [Bash](#bash)\n  - [Zsh](#zsh)\n  - [Fish](#fish)\n- [Security note](#security-note)\n- [License](#license)\n\n## Getting started\n\nThere is multiple ways to get `shaloc` on your machine. You can either:\n\n* Clone the repo and build it yourself:\n\n```\n$ git clone https://github.com/eze-kiel/shaloc.git\n$ cd shaloc\n$ go build .\n```\n\nAnd then move `shaloc` somewhere in the range of your PATH.\n\n* Download the latest release depending on your architecture.\n\nThe releases are [here](https://github.com/eze-kiel/shaloc/releases).\n\n## Usage\n\nThis section will cover typical use cases. If you need a more in-depth explaination about commands and flags, check [the wiki](https://github.com/eze-kiel/shaloc/wiki).\n\n### Share a single file\n\nThe minimal command to share a single file is the following:\n\n```\n$ shaloc share -f myfile.txt\nSharing myfile.txt on http://0.0.0.0:8080/myfile.txt\n```\n\nNote that you can choose the IP and the port (respectively `-i` and `-p`). With the flag `-r`, you can randomize the URI with a given length. For example :\n\n```\n$ shaloc share -f picture.png -i 192.168.25.33 -p 1337 -r 15\nSharing picture.png http://192.168.25.33:1337/sbChTqWQqPOiFqz\n```\n\nTo receive a file, you can enter:\n\n```\n$ shaloc get -u http://127.0.0.1:8080/myfile.txt\nDownloaded: myfile.txt from http://127.0.0.1:8080/myfile.txt\n```\n\nOr use whatever tool you want (`wget`, `curl`, your favorite browser...).\n\nThe content will be wrote in a file called as the file name in the url, but you can change the name with the flag `-o`:\n\n```\n$ shaloc get -u http://127.0.0.1:8080/myfile.txt -o better-name.txt\nDownloaded: better-name.txt from http://127.0.0.1:8080/myfile.txt\n```\n\n### Share a folder\n\nThis command is the minimal command to share a folder:\n\n```\n$ shaloc share -F /home/user/sup3r-f0ld3r\nINFO[0000] Zipping /home/user/sup3r-f0ld3r into /tmp/sup3r-f0ld3r.zip... \nSharing /tmp/sup3r-f0ld3r.zip on http://0.0.0.0:8080/sup3r-f0ld3r.zip\n```\n\nYou can also specify the IP addresse to share on, as well as the port with the same flags as before (`-i` and `-p`), and randomize the URI as well with `-r`.\n\nYou can receive the zip file using the same command as for a single file.\n\n### Share something a limited number of times\n\nBy default, the file can be downloaded an unlimited amout of times. If you want your file to be downloaded only a certain number of times, you can specify it thanks to the `-m` flag. If it is a negative value (which is the default case), your file will be available until server shutdown. Elsewhere, the value of the flag defines the number of times it can be downloaded. Here is an example:\n\n```\n$ ./shaloc share -f foobar.txt -m 2\nSharing foobar.txt on http://0.0.0.0:8080/foobar.txt\nINFO[0003] Downloads remaining: 1                       \nINFO[0006] Downloads remaining: 0                       \nINFO[0006] Max number of downloads reached, shutting down the server.\n```\n\nIt works for both `-f` and `-F` flags.\n\n### Share an encrypted file/folder\n\nYou can easily share an encrypted file/folder :\n\n```\n$ shaloc share -F /home/user/folder --aes\nType encryption key:\nINFO[0001] Zipping /home/user/folder into /tmp/folder.zip... \nSharing /tmp/folder.zip on http://0.0.0.0:8080/folder.zip\n```\n\nTo receive it, just launch:\n\n```\n$ shaloc get -u http://127.0.0.1:8080/folder.zip --aes\nDownloaded: out from http://127.0.0.1:8080/folder.zip\nType decryption key:\nDecrypted out in out.dec\n```\n\n`shaloc` uses AES-256 encryption. To generate the 32 bytes key, it hashes the provided password with SHA256.\n\nIf you forgot to use `--aes` to download the file, don't worry ! You can still decrypt your file using this command:\n\n```\n$ shaloc decrypt file.txt\n```\n\n### Clean shaloc garbage\n\nWhen compressing folders, `shaloc` creates temporary files in your OS default temporary folder (for example /tmp with Linux). Those files are the ones that are shared. They are not deleted automatically when sharing ends, so there is the `clean` command that will wipe everything that has \"shaloc\" as prefix in your OS default temporary folder. It is super easy to use:\n\n```\n$ shaloc clean\nWARN[0000] Wiped /tmp/shaloc722022099\n```\n\nObviously, this is optionnal: in most OS, this folder is cleaned when the computer reboots.\n\n### Update shaloc\n\nThe command `update` allow you to easily keep `shaloc` up to date.\n\n* Update to the latest version:\n\n```\n$ shaloc update latest\n```\n\n* Update to a specified version (for example v1.4.1):\n\n```\n$ shaloc update v1.4.1\n```\n\n* List all the available versions:\n\n```\n$ shaloc update list\n```\n\n## Completion\n\nCompletion is supported on multiple shells.\n\n### Bash\n\n```\n$ source \u003c(shaloc completion bash)\n```\n\nTo load completions for each session, execute once:\n\nLinux:\n\n```\n$ shaloc completion bash \u003e /etc/bash_completion.d/shaloc\n```\n\nMacOS:\n\n```\n$ shaloc completion bash \u003e /usr/local/etc/bash_completion.d/shaloc\n```\n\n### Zsh\n\nIf shell completion is not already enabled in your environment you will need to enable it.  You can execute the following once:\n\n```\n$ echo \"autoload -U compinit; compinit\" \u003e\u003e ~/.zshrc\n```\n\nTo load completions for each session, execute once:\n\n```\n$ shaloc completion zsh \u003e \"${fpath[1]}/_shaloc\"\n```\n\nYou will need to start a new shell for this setup to take effect.\n\n### Fish\n\n```\n$ shaloc completion fish | source\n```\n\nTo load completions for each session, execute once:\n\n```\n$ shaloc completion fish \u003e ~/.config/fish/completions/shaloc.fish\n```\n\n## Security note\n\nBy default, nothing is encrypted in `shaloc` which make it vulnerable to eavesdropping attacks such as [MITM](https://en.wikipedia.org/wiki/Man-in-the-middle_attack). Also, anyone with the link to your file can download it. If you want to send encrypted files, **please use the flag `--aes`**. It will ask you for a passphrase that will be needed by the receiver to decrypt the file.\n\nIf you plan to share something that should not be guessed, use the `-r` flag to randomize the URI with a random string of the length you want.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feze-kiel%2Fshaloc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feze-kiel%2Fshaloc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feze-kiel%2Fshaloc/lists"}