Skip to main content

Protect your Linux PC from viruses using a safer alternative to `curl ... | sh` or `wget ... | sh`

Project description

cursh

Protect your Linux PC from viruses using a safer alternative to curl ... | sh or wget ... | sh

Installation

cursh is only available on linux.

  1. Download the binary:
wget -O cursh https://github.com/itzmetanjim/cursh/raw/refs/heads/main/exec/cursh
  1. Make it executable
sudo chmod +x cursh
  1. 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)
  1. 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.
  2. If its not in trusted.json,
    1. 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.
    2. 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.
    3. Check what the domain is and look it up in some trusted domains API (unless its something like Github)
    4. Request the URL with different user agents. Check if they are the same as the result with the curl user agent.
    5. Display all these results to the user and let the user decide one of four options.

Files

  • trusted.json: database of trusted scripts
  • check.py: check if all the URLs are valid.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cursh-1.0.5.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cursh-1.0.5-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file cursh-1.0.5.tar.gz.

File metadata

  • Download URL: cursh-1.0.5.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for cursh-1.0.5.tar.gz
Algorithm Hash digest
SHA256 9ba909f1cd187f2ec855bc3df7444bb193721041d2468b4378c410ea21aa84c4
MD5 814e53d3c01063454c5c3ef8d69a4e0e
BLAKE2b-256 67ee31f784a6f79ead93b9d1d5d3d58484be76502432b709f53f3aa67e337d44

See more details on using hashes here.

File details

Details for the file cursh-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: cursh-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for cursh-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 406710dbfd573cf4dc15612728907329bafc081acbc20c8103d2a971baacc92f
MD5 5603f6f8ebc2fee5795513687b4091c4
BLAKE2b-256 86af0f0cd36397702a4785514e32b0f94598e591069207c02b8345ad58e021be

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page