Skip to content

Instantly share code, notes, and snippets.

View s3rgeym's full-sized avatar
🏴‍☠️
Анархия - основа Интернета

[object Object] s3rgeym

🏴‍☠️
Анархия - основа Интернета
View GitHub Profile
#!/usr/bin/env python
import pathlib
import re
directories = []
for file in pathlib.Path("./output").glob("**/*"):
if file.is_dir():
directories.append(file)
if not file.is_file():
continue
@s3rgeym
s3rgeym / googlemaps_extract_links.py
Created July 16, 2024 09:36
Скрипт, который запускает гуглокарты в браузере, перехватывает запросы и собирает ссылки на сайты компаний
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 403 (Forbidden)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/brandi
@s3rgeym
s3rgeym / ssh_pwn3r.py
Last active July 14, 2024 23:32
check ssh accounts, add your public key to remote server and generates config entries
#!/usr/bin/env python3
"""
Example:
torify ./ssh_pwnr.py -m '2019-02-26 01:23:45' -k ~/.ssh/pwn_key.pub -p 'pwned-' -i ssh_accs.txt >> ~/.ssh/config
"""
import argparse
import os
import sys
import typing
#!/bin/bash
mapfile -t sitemap_urls < <(curl -s "https://mergr.com/sitemap.xml" | grep -oP '[^>]+-companies[^<]+')
overview_urls=()
for url in "${sitemap_urls[@]}"; do
echo "$url" >&2
temp=($(curl -s "$url" | grep -oP '(?<=<loc>)[^<>]+'))
overview_urls+=("${temp[@]}")
for package in $(yay -Qqs python); do
echo "Remove $package (y/[n])?"
read answer
if [[ "$answer" =~ ^[Yy] ]]; then
yay -Rns $package
fi
done
In [10]: f = open('/dev/nvme2n1p2', 'rb')

In [11]: data = f.read()

In [12]: len(data)
Out[12]: 16777216

In [13]: data[0]
Out[13]: 0
In [5]: list(map(2 .__add__, [1, 2, 3]))
Out[5]: [3, 4, 5]
#!/bin/bash
USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
parse_sitemap() {
curl -sA "$USER_AGENT" "$1" | grep -oP '(?<=<loc>)[^<>]+'
}
parse_website() {
curl -sA "$USER_AGENT" "$1" | grep -oP '(?<=Required&#039;\);"> )[^<>]+'
}