Skip to content

Instantly share code, notes, and snippets.

View jxlil's full-sized avatar
🎯
Focusing

Jalil SA jxlil

🎯
Focusing
View GitHub Profile
{
"array": [
1,
2,
3
],
"boolean": true,
"null": null,
"number": 123,
"object": {
from requests import Session
session = Session()
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.5",
"Connection": "keep-alive",
"Upgrade-Insecure-Requests": "1 ",
"Sec-Fetch-Dest": "document",
@jxlil
jxlil / browser.py
Last active November 24, 2021 16:34
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium import webdriver
from time import sleep
options = Options()
options.headless = True
from time import sleep
import webbrowser
import pyautogui
def open_new_browser_tab(url: str) -> None:
#chrome_path = r"C:\Program Files\Google\Chrome\Application\chrome.exe"
#webbrowser.register("chrome", None, webbrowser.BackgroundBrowser(chrome_path))
#webbrowser.get(using="chrome").open_new_tab(url=url)
@jxlil
jxlil / verify_hotmail_accounts.py
Last active July 30, 2022 08:13
Verify hotmail accounts
import requests
import re
# we obtain the necessary data to make the query
session = requests.session()
resp = session.get("https://login.live.com/login.srf")
url = re.findall(r"bh:.([a-z:/.A-Z?0-9=&-]*)", resp.text)[0]
token = re.findall('name="PPFT" id=".+?" value="(.+?)"', resp.text)[0]
cookies = resp.cookies
@jxlil
jxlil / github_ssh.sh
Last active May 18, 2021 14:56
Generate a new SSH key for Github
#/usr/bin/env bash
# check args
if [[ $# -eq 0 ]]; then
echo -e "\033[33m[!] you need to specify an email\033[0m"
echo " example: bash ./github-shh.sh [email protected]"
exit
fi
echo -e "\033[32m[+] generate a new SSH key\033[0m"
@jxlil
jxlil / abrr_number.py
Last active June 24, 2020 19:26
Abbr numbers
def abrr_number(number, decimals=2):
scales = {
pow(10, 24): "Y",
pow(10, 21): "Z",
pow(10, 18): "E",
pow(10, 15): "P",
pow(10, 12): "T",
pow(10, 9): "G",
pow(10, 6): "M",