This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python2 | |
| # | |
| # DEPS: nmap, notify-send | |
| # | |
| import subprocess | |
| import re | |
| import time | |
| import sys | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SimpleHTTPServer, SocketServer, sys | |
| #SET THE PORT VARIABLE TO COMMAND-LINE ARGUMENT | |
| PORT = sys.argv[1] | |
| def RunServer(): | |
| try: | |
| httphandler = SimpleHTTPServer.SimpleHTTPRequestHandler | |
| httpd = SocketServer.TCPServer(("", int(PORT)), httphandler) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys | |
| import check_versions, csv_report | |
| HOST = sys.argv[1] | |
| USER = "jars" | |
| PASSWORD = "jars" | |
| def check_arguments(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import syslog | |
| print """ | |
| Enter a number and press [Enter]: | |
| 1 - Emergency | |
| 2 - Alert | |
| 3 - Critical | |
| 4 - Error | |
| 5 - Warning | |
| 6 - Notics |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import _winreg | |
| explorer = _winreg.OpenKey( | |
| _winreg.HKEY_CURRENT_USER, | |
| "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer") | |
| # list values owned by this registry key | |
| i = 0 | |
| try: | |
| while 1: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import win32serviceutil, time | |
| def service_info(action, machine, service): | |
| if action == 'stop': | |
| win32serviceutil.StopService(service, machine) | |
| print '%s stopped successfully' % service | |
| time.sleep(3) | |
| elif action == 'start': | |
| win32serviceutil.StartService(service, machine) | |
| print '%s started successfully' % service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import win32net | |
| #print users | |
| users = win32net.NetUserEnum('localhost', 0) | |
| print "USERS" | |
| print "==========" | |
| for user in users[0]: | |
| print user['name'] | |
| print "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| ipconfig /all>>”C:\WINNT\Debug\1.txt” | |
| net start>>”C:\WINNT\Debug\1.txt” | |
| tasklist /v>>”C:\WINNT\Debug\1.txt” | |
| net user >>”C:\WINNT\Debug\1.txt” | |
| net localgroup administrators>>”C:\WINNT\Debug\1.txt” | |
| netstat -ano>>”C:\WINNT\Debug\1.txt” | |
| net use>>”C:\WINNT\Debug\1.txt” | |
| net view>>”C:\WINNT\Debug\1.txt” | |
| net view /domain>>”C:\WINNT\Debug\1.txt” |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Usage: perl invalidate-signing-certs.pl <in.pdf >out.pdf | |
| binmode(STDIN); | |
| binmode(STDOUT); | |
| $/ = "\0"; | |
| while(<>) { | |
| s#(/Perms<</DocMDP.*?>>)#' ' x length $1#ge; | |
| s#(/Ff 1)(?=.*?/Lock )#' ' x length $1#ge; | |
| s#(?<=/Lock)(.*?)(/Ff 1)#"$1" . ' ' x length $2#ge; | |
| s#(/Lock .*?)(?=/)#' ' x length $1#ge; | |
| s#( obj<<)([^>\rendobj)#$1 . (‘ ‘ x length $2) . $3#ge; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # macbook with no ethernet port, en0 is usually airport | |
| # | |
| # those with ethernet port will probably use en1 for airport | |
| # | |
| # be sure to note the default address before beginning | |
| # set the mac to something specific | |
| sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z | |
| sudo ifconfig en1 ether 00:11:22:33:44:55 |