Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
pick is a small python library to help you create curses based interactive selection list in the terminal.
Basic | Multiselect |
---|---|
$ pip install pick
pick comes with a simple api:
>>> from pick import pick
>>> title = 'Please choose your favorite programming language: '
>>> options = ['Java', 'JavaScript', 'Python', 'PHP', 'C++', 'Erlang', 'Haskell']
>>> option, index = pick(options, title)
>>> print(option)
>>> print(index)
outputs:
>>> C++
>>> 4
pick multiselect example:
>>> from pick import pick
>>> title = 'Please choose your favorite programming language (press SPACE to mark, ENTER to continue): '
>>> options = ['Java', 'JavaScript', 'Python', 'PHP', 'C++', 'Erlang', 'Haskell']
>>> selected = pick(options, title, multiselect=True, min_selection_count=1)
>>> print(selected)
outputs:
>>> [('Java', 0), ('C++', 4)]
options
: a list of options to choose fromtitle
: (optional) a title above options listindicator
: (optional) custom the selection indicator, defaults to *
default_index
: (optional) set this if the default selected option
is not the first onemultiselect
: (optional), if set to True its possible to select
multiple items by hitting SPACEmin_selection_count
: (optional) for multi select feature to
dictate a minimum of selected items before continuingscreen
: (optional), if you are using pick
within an existing curses application set this to your existing screen
object. It is assumed this has initialised in the standard way (e.g. via curses.wrapper()
, or curses.noecho(); curses.cbreak(); screen.kepad(True)
)position
: (optional), if you are using pick
within an existing curses application use this to set the first position to write to. e.g., position=pick.Position(y=1, x=1)
quit_keys
: (optional), if you want to quit early, you can pass a key codes.
If the corresponding key are pressed, it will quit the menu.pickpack: A fork of pick
to select tree data.
FAQs
Pick an option in the terminal with a simple GUI
We found that pick demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.