This file contains 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
--- | |
# Remediate WinVerifyTrust Signature Validation Vulnerability | |
# URL https://msrc.microsoft.com/update-guide/vulnerability/CVE-2013-3900 | |
- hosts: win | |
tasks: | |
- name: Create registry path Wintrust | |
ansible.windows.win_regedit: | |
path: HKLM:\Software\Microsoft\Cryptography\Wintrust\ | |
- name: Create registry path Config |
This file contains 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
# smb.conf | |
# Fix seLinux perms | |
# semanage fcontext -a -t samba_share_t '/etc/samba/smb.conf' | |
# restorecon -v '/etc/samba/smb.conf' | |
[global] | |
workgroup = SAMBA | |
server role = standalone server | |
restrict anonymous = 0 | |
guest account = ftp # map guest access to a low privileged user |
This file contains 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 re | |
import argparse | |
parser = argparse.ArgumentParser(description='Mimic Linux grep command for Python') | |
parser.add_argument('pattern', type=str, help='The pattern to search for') | |
parser.add_argument('file', type=str, help='The file to search in') | |
parser.add_argument('-i', '--ignore-case', action='store_true', help='Perform case-insensitive search') | |
args = parser.parse_args() |
This file contains 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
From_Base64('A-Za-z0-9+/=',true,false) | |
Decode_text('UTF-16LE (1200)') | |
Regular_expression('User defined','[a-zA-Z0-9/+=]{30,}',true,true,false,false,false,false,'List matches') | |
From_Base64('A-Za-z0-9+/=',true,false) | |
Gunzip() | |
Regular_expression('User defined','[a-zA-Z0-9/+=]{30,}',true,true,false,false,false,false,'List matches') | |
From_Base64('A-Za-z0-9+/=',true,false) | |
XOR({'option':'Decimal','string':'35'},'Standard',false) |
This file contains 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 os | |
# mimic Unix tree command in python | |
# runs on Windows and Nix | |
# run from current directory for tree output | |
def tree(cwd): | |
print(f"+ {cwd}") | |
for root, dirs, files in os.walk(cwd): | |
level = root.replace(cwd, '').count(os.sep) | |
indent = ' ' * 4 * (level) | |
print(f"{indent}+ {os.path.basename(root)}/") |
This file contains 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 secrets | |
numbers = [] | |
while len(numbers) < 5: | |
n = secrets.choice(range(1, 69)) | |
if n not in numbers: | |
numbers.append(n) | |
numbers.sort() | |
powerBall = secrets.choice(range(1, 26)) | |
print(*numbers, sep=", ", end='') | |
print(" PowerBall", powerBall) |
This file contains 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
<HTML> | |
<HEAD> | |
<TITLE>HTA Demo</TITLE> | |
<HTA:APPLICATION ID="oHTA" | |
APPLICATIONNAME="myApp" | |
BORDER="thin" | |
BORDERSTYLE="normal" | |
CAPTION="yes" | |
ICON="" | |
MAXIMIZEBUTTON="yes" |
This file contains 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 python3 | |
import socket | |
import datetime | |
import time | |
HOST = '0.0.0.0' | |
PORT = 8080 | |
def listener(): |
This file contains 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
msbuild project.sln /p:Configuration=Release /p:Platform="Any CPU" | |
msbuild project.sln /p:Configuration=Release /p:Platform=AnyCPU |
This file contains 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 python3 | |
# Author raresteak | |
# basic leetspeak converter | |
# Converts plain text | |
import sys | |
userInput = sys.argv[1:] | |
if len(userInput) == 0: | |
print("USAGE: " + sys.argv[0] + " plain text") | |
sys.exit() | |
text=str(' '.join(userInput)) |