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.
A library that:
Did you ever design a form by scribbling something like this in your editor::
Text to transform: [ Text_ ]
Select transformation:
(x) Uppercase
( ) Lowercase
( ) Title-case
[ OK ] [ Cancel ]
... and wished that you could be done with design and start coding? Wish no longer::
from ascii_designer import AutoFrame
class TextTransformer(AutoFrame):
f_body='''
| <-> |
Text to transform: [ Text_ ]
Select transformation:
(x) Uppercase
( ) Lowercase
( ) Title-case
[ OK ] [ Cancel ]~
'''
def ok(self):
text = self.text
if self.uppercase:
text = text.upper()
elif self.lowercase:
text = text.lower()
elif self.titlecase:
text = text.title()
print(text)
self.close()
def cancel(self):
self.close()
if __name__ == '__main__':
TextTransformer().f_show()
Some comments, incidentally highlighting the features of this library:
AutoFrame
. The
f_show
call triggers rendering of the form. All the reserved attributes
are prepended with f_
to get out of your way when subclassing.<
/ >
chars are just
decoration.){
character.close
and quit
are already
there for your convenience.f_show()
captures all the usual boilerplate and simply f***ing shows
the frame. It can be used for both the toplevel and additional frames..f_title
.form["widget_id"]
(or
form.f_controls["widget_id"]
).The general philosophy is to not paint everything over with wrappers. Instead, the library focuses on specific tasks - building the layout, event-/value binding - and lets you do everything else with the API you know and (maybe) love.
::
pip install ascii_designer
Requirements: Python >= 3, attrs
. To use the Qt toolkit you need qtpy
.
Please proceed to http://ascii_designer.readthedocs.io/en/latest/index.html
MIT License: https://github.com/loehnertj/ascii_designer/blob/master/LICENSE
Alpha-state software, mostly working.
Test coverage is lacking, politely spoken.
This is a hobby project. If you need something quick, open an issue or send a pull request.
FAQs
Builds dialogs from ASCII art definition.
We found that ascii-designer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.