Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Notice française : https://q37.info/s/rhj9qmb9.
This library is like termcolor, but with all the text formatting possibilities of CSS.
Install (pip install term2web
), import (from term2web import *
) on the top of your program, and all print(…)
and input(…)
will be redirected to a web page.
You can also launch:
git clone http://github.com/epeios-q37/term2web-python
,cd term2web-python
,python3 main.py
(or directly python3 Basic.py
or python3 WithCSS.py
).Online demonstration: https://q37.info/s/kjjcfcp3.
There are three other functions available.
set_property(name,value)
applies the CSS property of name name
and value value
.
Example:
set_property("font-style", "italic")
set_properties(properties)
applies the CSS properties stored in properties
which is a dictionary whose keys are property names, and values the corresponding property values.
Example:
set_properties({
"text-decoration-line": "line-through",
"text-decoration-style": "wavy",
"text-decoration-color": "red"
})
reset_properties()
removes all the CSS properties set by above functions.
Basic.py
is an example with calls to print(…)
and input(…)
, but without CSS formatting. Comment out the import * from term2web
for the program to run in the usual way in a terminal.
WithCSS.py
shows how CSS rules can be used to format the displayed text.
You can still use the default print(…)
and input(…)
after an import builtins
with builtins.print(…)
and builtins.input(…)
.
Unlike other programs based on the Atlas toolkit, on which this library is based, it is not possible to simultaneously launch two or more instances of a program based on the term2web library. This is intentional, in order to keep this library simple to use.
FAQs
Toolkit which overloads 'print(…)' and 'input()' to redirect them to a web page.
We found that term2web 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.