Philippe Crama 91a02ce03d Followup to PR #1918: scoop-virustotal.ps1 fixes (#1934)
* Fix interpretation of response's status code to detect redirections

* Improve documentation of virustotal subcommand

- usage & configuration of virustotal_api_key
- special parameter '*' to test all installed apps
- make necessity of having a virustotal_api_key for --scan explicit
- show that it's possible to check several packages at once

* Never use virustotal_api_key to query if a package is safe

The URL in the code wasn't an API end-point anyway.

* Refactor logic to warn user about apps unknown to VirusTotal

* Warn once when virustotal_api_key's absence prevents VirusTotal submission

This is preparation for changes to come in the package submission logic.

* Use API to submit download link to VirusTotal, rate limited in EAFP fashion

This is a roundabout way to get the file to be scanned without having
to download & upload it ourselves.

Rate limiting is implemented using EAFP: if submission fails, we wait
at least 60s before retrying at most once.

* Color undecided VirusTotal information the same way as `dangerous' files

If the scanning is still in progress, VirusTotal returns 0 malicious,
0 suspicious and 0 undetected.  Err on the safe side and color this
the same way as `dangerous' files.

* Remove requirement to only verify installed apps

The initial use case for this feature was to scan packages to avoid
installing dangerous apps.  Assuming they are infected, we want if
possible to avoid downloading them at all.

* Check dependencies with VirusTotal, too (by default)

* Manually apply `Lint: PSAvoidUsingCmdletAliases' (see e1bb1e91, #2075)

This is to avoid conflicts when merging lukesampson:master

* Explain applist's return value transformation: drop `global' flag for each app

* Move variable declarations and apps list generation to the top

* Reformat code and comply to linted function names

* Reduce nesting, remove hacky hash/url retrieval

* Remove $global variables

* Fix regression bug in Search-VirusTotal()

* Remove applist() because it's irrelevant if app is installed globally
2018-03-14 19:04:18 +01:00
…
…
…
…
…

Scoop Build status Gitter chat

Scoop is a command-line installer for Windows.

Requirements:

  • PowerShell 3
  • PowerShell must be enabled for your user account e.g. set-executionpolicy remotesigned -s currentuser

To install:

iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

Once installed, run scoop help for instructions.

What does Scoop do?

Scoop installs programs from the command line with a minimal amount of friction. It tries to eliminate things like:

  • Permission popup windows
  • GUI wizard-style installers
  • Path pollution from installing lots of programs
  • Unexpected side-effects from installing and uninstalling programs
  • The need to find and install dependencies
  • The need to perform extra setup steps to get a working program

Scoop is very scriptable, so you can run repeatable setups to get your environment just the way you like, e.g.:

scoop install sudo
sudo scoop install 7zip git openssh --global
scoop install curl grep sed less tail touch
scoop install python ruby go perl

If you've built software that you'd like others to use, Scoop is an alternative to building an installer (e.g. MSI or InnoSetup)—you just need to zip your program and provide a JSON manifest that describes how to install it.

Documentation

Inspiration

What sort of apps can Scoop install?

The apps that install best with Scoop are commonly called "portable" apps: i.e. compressed program files that run stand-alone when extracted and don't have side-effects like changing the registry or putting files outside the program directory.

Since installers are common, Scoop supports them too (and their uninstallers).

Scoop is also great at handling single-file programs and Powershell scripts. These don't even need to be compressed. See the runat package for an example: it's really just a GitHub gist.

Support this project

If you find Scoop useful and would like to support ongoing development and maintenance, here's how:

S
Description
A command-line installer for Windows.
Readme Multiple Licenses
30 MiB
Languages
PowerShell 98.2%
C# 1.8%