Skip to content

Instantly share code, notes, and snippets.

View Tester2009's full-sized avatar
💭
breathing

Мухаммад Алифф Муаззам Tester2009

💭
breathing
View GitHub Profile
@ryujaehun
ryujaehun / sync.py
Created October 15, 2018 04:57
my rsync python script
# /usr/bin/python3
import argparse
import subprocess
import os
parser = argparse.ArgumentParser(description='Jaehun\'s ssh script')
parser.add_argument('--destination','-d', type=str,default='ti', required=False, help="ssh destination")
parser.add_argument('--docker','-o',action='store_true', required=False, help="docker port activation")
parser.add_argument('--file','-f', type=str, required=True, help="file path")
args = parser.parse_args()
destination_list={'dell':'git.deepmi.me', 'ti':'163.180.172.26','v':'163.180.172.118','1':'163.180.118.160','5':'163.180.118.155','6':'163.180.118.156','7':"163.180.118.157"}
@nazmulmithu006
nazmulmithu006 / base64.py
Created October 15, 2018 04:56 — forked from jsundram/base64.py
base64 encoding for integers. To make long numbers (i.e. hashes) more readable. Not as cool as RFC 1751, but less code.
ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_'
TABLE = {c: i for (i, c) in enumerate(ALPHABET)}
def decode(s, b=64):
"""Interpret the input string as a base b number"""
i, multiplier = 0, 1
for c in reversed(s):
i += multiplier * TABLE[c]
multiplier *= b
return i
// 電気が消え、かつスイッチが押されるとモーターがまわる
#define cdsPin 1 //光センサーが1番ピン
#define buttonPin 12 //スイッチが12番ピン
#include <Servo.h> //サーボモーターを動かす関数を用意します
#define moterPin 3 //モーターが3番ピン
bool buttonState = 0;
@rust-play
rust-play / playground.rs
Created October 15, 2018 04:47
Code shared from the Rust Playground
use std::cell::RefCell;
use std::collections::BinaryHeap;
use std::collections::binary_heap::PeekMut;
#[derive(Ord, PartialOrd, Eq, PartialEq)]
struct Task(u32);
struct Foo {
heap: RefCell<BinaryHeap<Task>>,
}
@mackwage
mackwage / windows_hardening.cmd
Last active April 25, 2026 12:28
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
@cryptolok
cryptolok / dbm2m.py
Last active February 13, 2025 09:33
convert WiFi signal strength (dBm) to distance (meters)
#!/usr/bin/env python2
# a simple script for one of my articles - https://cryptolok.blogspot.com/2017/08/practical-wifi-hosts-triangulation-with.html
from math import log10
MHz=raw_input('MHz FREQUENCY (2417, 5200, ...) : ')
MHz=int(MHz)
dBm=raw_input('dBm TRANSMITTER POWER (23, 63, ...) : ')
@worawit
worawit / eternalblue8_exploit.py
Last active March 16, 2024 18:38
Eternalblue exploit for Windows 8/2012
#!/usr/bin/python
# This file has no update anymore. Please see https://github.com/worawit/MS17-010
from impacket import smb, ntlm
from struct import pack
import sys
import socket
'''
EternalBlue exploit for Windows 8 and 2012 by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)
#define _CRT_SECURE_NO_WARNINGS
#include "targetver.h"
#include <stdio.h>
#include <tchar.h>
#include <Windows.h>
#include <Wincrypt.h>
@worawit
worawit / eternalblue7_exploit.py
Last active January 26, 2026 15:44
Eternalblue exploit for Windows 7/2008
#!/usr/bin/python
# This file has no update anymore. Please see https://github.com/worawit/MS17-010
from impacket import smb
from struct import pack
import sys
import socket
'''
EternalBlue exploit for Windows 7/2008 by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)
@nickoala
nickoala / 0_python_email.md
Last active March 2, 2026 05:58
Use Python to send and receive emails

Use Python to:

  • send a plain text email
  • send an email with attachment
  • receive and filter emails according to some criteria