Skip to content

Instantly share code, notes, and snippets.

View jossef's full-sized avatar
🌶️

Jossef Harush Kadouri jossef

🌶️
View GitHub Profile
@jossef
jossef / get_pypi_events.py
Last active March 28, 2024 09:29
script to get pypi package events (last 100k)
import datetime
import xmlrpc.client
import csv
client = xmlrpc.client.ServerProxy('https://pypi.org/pypi')
serial = client.changelog_last_serial()
serial = serial - 50000
events = client.changelog_since_serial(serial)
with open('events.csv', 'w+', newline='') as csvfile:
csvwriter = csv.writer(csvfile)
@jossef
jossef / deluge-add-torrent.py
Created October 13, 2023 01:00
add torrent to deluge rest api python script
import requests
import os
import sys
BASE_URL = 'http://10.0.1.100:49155/'
DELUGE_PASSWORD = os.environ.get('DELUGE_PASSWORD', 'deluge')
REQUEST_ID = 0
@jossef
jossef / main.py
Created August 28, 2023 12:04
vscode marketplace api list all extensions + download artifacts
import requests
from requests.adapters import HTTPAdapter, Retry
def get_vscode_extensions(max_page=10000, page_size=100,
include_versions=True, include_files=True, include_category_and_tags=True, include_shared_accounts=True, include_version_properties=True,
exclude_non_validated=False, include_installation_targets=True, include_asset_uri=True, include_statistics=True,
include_latest_version_only=False, unpublished=False, include_name_conflict_info=True, api_version='7.2-preview.1', session=None):
if not session:
session = requests.session()
@jossef
jossef / repos.csv
Created May 28, 2023 15:36
Mass Scanning of Popular GitHub Repos for CI Misconfiguration
Repo Repo Stars
https://github.com/kong/insomnia 28262
https://github.com/mattermost/focalboard 15181
https://github.com/baidu/amis 13949
https://github.com/shopify/liquid 10258
https://github.com/fullstorydev/grpcurl 8665
https://github.com/dagger/dagger 8340
https://github.com/draios/sysdig 7271
https://github.com/pinterest/ktlint 5581
https://github.com/shopify/polaris 5346
@jossef
jossef / get_all_pypi_user_accounts.py
Created February 13, 2023 19:15
part of a research to hunt attacker's activity
import concurrent
import csv
import logging
from concurrent.futures import ThreadPoolExecutor
from io import BytesIO
import requests
from bs4 import BeautifulSoup
from requests.adapters import HTTPAdapter
from tqdm import tqdm
@jossef
jossef / typosquatting.csv
Last active February 11, 2023 00:20
400+ Typosquatting Campaign
Published owners Package Name Version Package Type
Feb 10, 2023 @ 20:48:07.779 pypi/stason070788 aiohtt 0.1 pypi
Feb 10, 2023 @ 20:48:06.439 pypi/stason070788 aiohhttp 0.1 pypi
Feb 10, 2023 @ 20:48:06.301 pypi/stason070788 aiohttpp 0.1 pypi
Feb 10, 2023 @ 20:48:05.879 pypi/stason070788 aioohttp 0.1 pypi
Feb 10, 2023 @ 20:48:05.542 pypi/stason070788 aaiohttp 0.1 pypi
Feb 10, 2023 @ 20:48:05.359 pypi/stason070788 aihottp 0.1 pypi
Feb 10, 2023 @ 20:48:04.659 pypi/stason070788 aohttp 0.1 pypi
Feb 10, 2023 @ 20:48:03.639 pypi/stason070788 iaohttp 0.1 pypi
Feb 10, 2023 @ 20:48:03.300 pypi/stason070788 aiohtpt 0.1 pypi
@jossef
jossef / readme.md
Created February 3, 2023 11:47
Insta360 X3 serial number download studio

Sharing my serial number for the Insta360 X3 camera. The company's poor website design requires proof of ownership to use the editor software, which makes no sense as only those who bought the camera would want to download it. 🤦‍♂️

image

This is my Insta360 X3 S/N. You're welcome to use it to workaround that annoying prompt:

IAQEB2208SEC7T
@jossef
jossef / publish-drafts.js
Created January 28, 2023 21:40
a fork of niedzwiedzw/youtube-publish-drafts
(() => {
const MODE = 'publish_drafts';
const DEBUG_MODE = true;
const MADE_FOR_KIDS = false;
const VISIBILITY = 'Unlisted';
const SORTING_KEY = (one, other) => {
return one.name.localeCompare(other.name, undefined, {numeric: true, sensitivity: 'base'});
};
const TIMEOUT_STEP_MS = 20;
const DEFAULT_ELEMENT_TIMEOUT_MS = 10000;
@jossef
jossef / readme.md
Created January 24, 2023 08:16
Install python via pyenv on ubuntu 20.04

Install debian dependencies

sudo apt-get install aria2 build-essential curl git libbz2-dev libffi-dev liblzma-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev llvm make tk-dev wget xz-utils zlib1g-dev --yes

Install pyenv

curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash