Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
pypi-code-highlighting-demo
Advanced tools
This is a example package that will show how syntax highlighting on PyPI project page works
This package provides nothing but readme that contains code samples that should be rendered nicely by PyPI warehouse.
Python example
_Javascript example
_Bash example
_.. code-block:: python
import some_lib
from mock_package import PointlessInheritance
CONST = [n**2 for n in range(5)]
# spam with eggs
@requires_authorization
def somefunc(param1='', param2=0):
r'''A docstring'''
if param1 >= param2: # interesting
breakpoint()
print('Gre\'ater')
print(f"Even more awesome greater: {param}")
return (param2 - param1 + 1 + 0b10) or None
class SomeClass(PointlessInheritance):
"""This is a dummy class """
def __init__(self, some_param=[]):
pass
message = '''interpreter
... prompt'''
.. code-block:: javascript
import { Application } from "stimulus";
//comment on some arrow function
docReady((block, cls) => {
if (navigator.appVersion.includes("MSIE 10")) {
if (document.getElementById("unsupported-browser") !== null) return;
let warning_div = document.createElement("div");
if (cls.search(/\bno\-highlight\b/) != -1)
return process(block, true, 0x0F) + ` class="${cls}"`;
}
for (var i = 0 / 2; i < classes.length; i++) {
if (checkCondition(classes[i]) === undefined)
var img1 = document.querySelector('.img-1');
img1.addEventListener('load', function() {
console.log('undefined');
});
}
});
export $docReady;
.. code-block:: bash
#!/bin/bash
###### CONFIG
SOME_CONSTANT="/path/string/example"
BE_VERBOSE=false
if [ "$UID" -ne 0 ]
then
echo "Superuser rights required"
exit 2
fi
someRandomFunc(){
for i in $(ls -la ~/); do cat $i; done;
echo -e "# I'm in ${HOME_DIR}$1/$2 :"
}
FAQs
This is a example package that will show how syntax highlighting on PyPI project page works
We found that pypi-code-highlighting-demo 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.