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

How it will work

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.2.tar.gz (8.1 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.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cursh-1.0.2.tar.gz
  • Upload date:
  • Size: 8.1 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.2.tar.gz
Algorithm Hash digest
SHA256 b40e8069f2e576e8da793374279486d7b0a15531ed0f78a7949cd0814f816096
MD5 d11f26d4b914a21fbbee679a39849bf5
BLAKE2b-256 373c4d9f41d00d29a81ac3d393f0b5d3ac99beb0e4806c32257a112989d94876

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cursh-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e2ea0e70cad0458a870454c86b2bd4c4d9def7c209a178bf2c8d156714210af4
MD5 7310076a1edd96d66b76116e4f5ee480
BLAKE2b-256 2cb2a170470c1460ff214bb2ed8342f4f8b2208efbba5d749b4e31d46d3db52d

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