cursh
Protect your Linux PC from viruses using a safer alternative to curl ... | sh or wget ... | sh
Installation
cursh is only available on linux.
- Download the binary:
wget -O cursh https://github.com/itzmetanjim/cursh/raw/refs/heads/main/exec/cursh
- Make it executable
sudo chmod +x cursh
- Copy it to
/usr/bin/local/:
sudo cp ./cursh /usr/local/bin/
sudo chmod +x /usr/local/bin/cursh
How it works
It will use multiple verification steps. At any of these steps, if HTTPS/TLS auth fails, it will immediately abort. Also, if it has root priveleges, it will ALWAYS ask the user before executing, even if it determined it as safe. When asking the user, these are the options the user has:
- Check the script, maybe edit it, then run it.
- Save the script.
- Do nothing (dont run)
- Run anyway (not recommended)
- Check if the patterm matches
trusted.json(hosted here and updated). If so,- Check the version list. If the version also matches, then its trusted.
- If version does not match, ask the user first.
- If its not in
trusted.json,- Check for the first line containing
SHA256:. If found, check the URL for an SHA256 sum. If it matches, save the result to a variable. - Check for the first line containing
PGP/GPG signature:. If found, check the URL and see if the PGP is valid and matches the file. If so, save that to another variable. - Check what the domain is and look it up in some trusted domains API (unless its something like Github)
- Request the URL with different user agents. Check if they are the same as the result with the
curluser agent. - Display all these results to the user and let the user decide one of four options.
- Check for the first line containing
Files
trusted.json: database of trusted scriptscheck.py: check if all the URLs are valid.
Metadata
Release files for cursh 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cursh-1.0.6.tar.gz | 9.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cursh-1.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.6 kB
Release files / cursh-1.0.6.tar.gz
| Download URL | cursh-1.0.6.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da42adfd9092eca2e349c274fa7b84e4e86b9088c6ca8621422177c1cd666874
|
|
BLAKE2b-256 checksum How to use checksums |
f101d0e05ca10c49677c1c656656e2a524d447d8d0c8307f170797c13ff13d26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / cursh-1.0.6-py3-none-any.whl
| Download URL | cursh-1.0.6-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca2dac67718c9d234a1e33e4c43cc84df6998a9544da700d227fff7871af58f8
|
|
BLAKE2b-256 checksum How to use checksums |
ed8239328644d57fe626e5404506b4d6a419f3d1af17b2bdb152646338b74a42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|