
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
An easy interface for Microsoft Office 365 Oauth Device Code authentication.
pip install oauth_tools
::
from oauth_tools import AuthManager
import webbrowser
import creds
import os
if not os.path.exists('users.json'):
open('users.json', mode='wt').write(json.dumps({}))
authManager = AuthManager(
# Get your client/tenant ID by following these instructions:
# https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad-app
microsoftClientID=creds.clientID,
microsoftTenantID=creds.tenantID,
)
authManager.SaveIncompleteOACallback = lambda ID, data: open('incomplete.json', mode='wt').write(
json.dumps({ID: data}, indent=2))
authManager.GetIncompleteOACallback = lambda ID: json.loads(open('incomplete.json', mode='rt').read()).get(ID, None)
authManager.SaveToDBCallback = lambda ID, data: open('users.json', mode='wt').write(
json.dumps({ID: data}, indent=2))
authManager.GetFromDBCallback = lambda ID: json.loads(open('users.json', mode='rt').read()).get(ID, None)
MY_ID = 'Grant'
user = authManager.GetUserByID(MY_ID)
if user is None:
# the user has not authenticated before
d = authManager.CreateNewUser(MY_ID)
webbrowser.open(d['verification_uri'])
print('Enter the code', d['user_code'])
while True:
time.sleep(d['interval'])
status = authManager.CheckOAStatus(MY_ID)
print('status=', status)
if status == 'Success':
break
user = authManager.GetUserByID(MY_ID)
print('user=', user)
The output looks like
::
>>> Enter the code A4S4QS4EG
>>> status= Waiting for user to authenticate
>>> status= Success
>>> user= <User: ID=Grant, EmailAddress=grant@grant-miller.com, AccessToken=abcdefghijklm...>
FAQs
An easy interface for Microsoft Office 365 Oauth Device Code authentication.
We found that oauth-tools 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.