Skip to content

Instantly share code, notes, and snippets.

import socket
import time
import ast
def main():
backlog = open("eternalblue.replay").read().split("\n\n")
backlog = [ast.literal_eval(i) for i in backlog]
connections = []
start = time.monotonic()
for i in backlog:
@und3fined
und3fined / eternalblue7_exploit.py
Created May 22, 2017 15:18 — forked from worawit/eternalblue7_exploit.py
Eternalblue exploit for Windows 7/2008
#!/usr/bin/python
from impacket import smb
from struct import pack
import os
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)
@und3fined
und3fined / eternalblue8_exploit.py
Created May 22, 2017 15:27 — forked from worawit/eternalblue8_exploit.py
Eternalblue exploit for Windows 8/2012
#!/usr/bin/python
from impacket import smb
from struct import pack
import os
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)
@und3fined
und3fined / nightmare-on-amazon-linux.MD
Created June 9, 2017 16:54 — forked from dimkir/nightmare-on-amazon-linux.MD
How to run nightmare on Amazon Linux

Running nightmare on Amazon Linux

You may have thought of running nightmare on AWS Lambda. But before we can run it on Lambda, we need first to make it run on Amazon Linux.

Provision instance which replicates Lambda environment

According to AWS Documentation on Lambda Execution Environment and available Libraries we would need this AMI image with this alias amzn-ami-hvm-2016.03.3.x86_64-gp2. Keep in mind that AMI-image-id for this instance would be different in different regions (eg):

  • In eu-west-1 - ami-f9dd458a
  • In us-east-1 - ami-6869aa05
@und3fined
und3fined / gist:212a5cfca6e82f734c13a19decb5b665
Created June 29, 2017 17:23
How to install 64-bit Google Chrome on 64-bit RHEL/CentOS 7
#! /bin/bash
# Google Chrome Installer/Uninstaller for 64-bit RHEL/CentOS 6 or 7
# (C) Richard K. Lloyd 2017 <rklloyd@gmail.com>
# See https://chrome.richardlloyd.org.uk/ for further details.
# Barring bug fixes, this is the final version of the script!
# Google Chrome 59+ will *not* work on RHEL/CentOS 6, so users
# on that platform should not upgrade beyond version 58.

Bí mật cho giấc ngủ hoàn hảo và thức dậy dễ dàng mỗi sáng

Mỗi đêm bạn ngủ thế nào? Bạn chìm sâu vào giấc ngủ hay lăn lộn suốt đêm dài? Làm thế nào để bạn thức dậy dễ dàng hay đó là một thử thách cho bạn?

Nhấn nút <STAR - sao> nếu bạn từng gặp khó khăn như vậy khi thức dậy vào mỗi sáng?

sleep cover

Giấc ngủ ngon là một khía cạnh quan trọng của cuộc sống, thậm chí thay đổi chất lượng giấc ngủ lành mạnh cũng quan trọng như ăn uống lành mạnh và chơi thể thao.

@und3fined
und3fined / Sample Apollo GraphQL with Github API.md
Last active May 5, 2019 04:56
Sample Apollo GraphQL with Github API
@und3fined
und3fined / let's encrypt.md
Created November 30, 2019 17:04
Config let's encrypt for nginx server with 9 step

1. Install certbot

Flow command:

1 wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

2 yum install epel-release-latest-7.noarch.rpm

If you are using ec2 you can enable optional channel by running:

@und3fined
und3fined / ssh.pub
Created January 17, 2020 04:30
my pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDexsqEMv5M/+ahxtE4DamQmPqH0rVEGO4OAQQR6DbAbI89gGFqz2GdT05wEq2JCbenBnlENtZV79Eo9AH0tKjb9RihVteQr0IyDPIbB1LrBbzsSojRBWlzGNqUgpxl4LQHysWQ+FYVmhHgkEAFCZly99rUD5SK0mVoPxDU0luX5WnqKkmB/myiW/AGeZWR894VbS3QzuTeih1/feJYqeoR6qW+bF0XewCyjIZYNF+lPo6Df13t+whCkqKTogZMRK1ztoszwWlnVmQD6vzE0Uv80VNRpI74EWtta5NwHkcNUMwue9mdsTV79N6aV9Kv7hAeLAU6F8IhEV5v+CZg2DH7 und3fined@und3finedOS.local
@und3fined
und3fined / wg-manager.sh
Last active July 20, 2020 06:11
Wireguard manager script
#!/bin/bash
# wireguard user manager
WG_CONFIG="/etc/wireguard/wg0.conf"
WG_CONFIG_USER="/etc/wireguard/user.d"
function get_free_ip {
local ip=$(shuf -i 2-254 -n 1)
wg show | grep "10.0.0.$ip" > /dev/null
if [[ $? == 1 ]] ; then