
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Spend $10 to interact with a dead forum from Python.
[!CAUTION] Using this library without being funny may lead to your account being permanently banned.
Let's be honest, here: That's probably a net positive.
This package is available via PyPi as pyawful
and can be installed via your package manager of choice.
import os
from pyawful import AuthenticatedAwfulSession
USERNAME = os.environ["SA_USERNAME"]
PASSWORD = os.environ["SA_PASSWORD"]
with AuthenticatedAwfulSession(USERNAME, PASSWORD) as client:
response = client.get_forum_threads(273)
for thread in response.threads:
print(thread.title)
[!WARNING] Ignore this advice if you want to pay $10 again
Limit the number of sessions you create - if you're making lots of requests or otherwise doing something regularly you should persist the session cookies and restore them.
from datetime import datetime
import json
import os
from pyawful import AuthenticatedAwfulSession, AwfulCookies
USERNAME = os.environ["SA_USERNAME"]
PASSWORD = os.environ["SA_PASSWORD"]
session = AuthenticatedAwfulSession(USERNAME, PASSWORD)
try:
with open("./session.json", "r") as session_file:
cached_session = json.load(session_file)
cookies = AwfulCookies(**cached_session["cookies"])
expiration = datetime.fromtimestamp(cached_session["expiration"])
session.resume_session(cookies, expiration)
except Exception:
pass
with session as client:
cookies = session.get_cookies()
expiration = session.get_expiration().timestamp()
with open("./session.json", "w") as session_file:
json.dump(
{ "cookies": cookies, "expiration": expiration },
session_file
)
Licensed under the MIT License.
FAQs
Pay ten dollars to get access to a dead forum.
We found that pyawful 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.