
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
github.com/eliasmeireles/go-pdf-generator
This service generates PDFs from HTML content served by a web provider. It uses a headless Chrome instance to render the HTML and convert it to a PDF.
Endpoint: GET
-> /api/pdf-generator/v1/pdf
Description: Generates a PDF from the HTML content at the specified URL.
Query Parameters:
url
(required): The URL of the HTML content to convert to PDF.class
(optional): A list of element classes to wait for before generating the PDF. The service ensures these
elements are visible before proceeding.id
(optional): A list of element IDs to wait for before generating the PDF. The service ensures these elements are
visible before proceeding.fileName
(optional): The desired name of the generated PDF file. If not provided, an uuid will be used.appendText
(optional): Append the provided text to the PDF. Nice to test with parallel execution.Response:
Content-Disposition
header set for download.curl
CommandTo generate a PDF from a URL:
mkdir .out
curl -o ./.out/output.pdf "http://localhost:8080/api/pdf-generator/v1/pdf?url=https://go.dev/doc"
You can also pass the query param url as a base64 just provided a new query param base64=true
mkdir .out
curl -o ./.out/output.pdf "http://localhost:8080/api/pdf-generator/v1/pdf?url=aHR0cHM6Ly9nby5kZXYvZG9j&base64=true"
To generate a PDF and wait for specific elements to be visible:
mkdir .out
curl -o ./.out/output.pdf "http://localhost:8080/api/pdf-generator/v1/pdf?url=https://go.dev/doc/tutorial/getting-started&id=prerequisites&id=nav"
The service is designed to run in a Docker container alongside a web provider service (e.g., Nginx) that serves the HTML content.
web-provider-app
:
3000
on the host.pdf-generator-app
:
8080
for the API and port 9223
for Chrome's remote debugging.Build and start the services:
docker-compose up --build
Access the services:
http://localhost:3000
http://localhost:8080/api/pdf-generator/v1/pdf
FAQs
Unknown package
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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.