
Security News
/Research
npm Phishing Email Targets Developers with Typosquatted Domain
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.
pip install ppauth
import ppauth
ppauth.auth(
host="127.0.0.1", port=8080,
username="admin", password="admin123",
# Optional TOTP code (used if two-factor authentication is enabled).
# Note: If using TOTP, the server should issue a token with a minimum 1-day expiration.
# As a developer, you should provide a new TOTP code each time the token expires.
totp="56845",
timezone="Europe/Paris"
)
token = ppauth.token()
token = ppauth.token(renew=True) # Automatically re-authenticates and returns a new token if the previous one has expired.
lease_token = ppauth.lease_token()
print({"token": token, "expire_at": lease_token})
# result
# {"expire_at": 16500,"token":"ZoHAauGmCyxjq6+1sfVbqy..."}
# for easy use method GET
# Use the route defined in routes.yml within your backend delivery.
# You don't need to manually include the token in the headers it's handled automatically
headers = {"user-agent": "ppauth/0.1.1"}
params = {"params_key": "my_send_request_params_via_get"}
ppauth.get(
"/app", # The API route (relative path) to call on the authenticated backend
headers=headers, # Optional custom HTTP headers (Python dict), e.g. {"X-User": "admin"}
params=params, # Optional query parameters (Python dict), e.g. {"limit": "10"}
verify=False, # Disable TLS certificate verification (useful for self-signed certs)
timeout=5, # Max duration (in seconds) to wait for a response before failing
retry=5 # Number of retry attempts if the request fails (timeout or server error)
)
# result
# 'ok'
# you are similar for POST method
headers = {"user-agent": "ppauth/0.1.1"}
body = {"body_key": "my_send_request_data_via_post"}
json = {"json_key": "my_send_request_json_data_via_post"}
ppauth.post(
"/app", # The API route (relative path) to call on the authenticated backend
headers=headers, # Optional custom HTTP headers (Python dict), e.g. {"Content-Type": "application/json"}
body=body, # (If implemented) Optional raw body content (usually a string or bytes)
json=json, # Optional JSON body (Python dict) that will be serialized and sent as application/json
timeout=5, # Max duration (in seconds) to wait for a response before raising a timeout error
verify=False, # Disable TLS certificate verification (useful for self-signed certificates)
retry=2 # Number of retry attempts if the request fails (e.g., timeout or 5xx server errors)
)
# result
# 'ok'
FAQs
Python bindings for ProxyAuth authentication via Rust
We found that ppauth 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
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.
Security News
Knip hits 500 releases with v5.62.0, refining TypeScript config detection and updating plugins as monthly npm downloads approach 12M.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.