Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mccabe615
mccabe615 / System Prompts.md
Created February 8, 2024 02:49 — forked from pyotam/System Prompts.md
System Prompts for GPT-4 and multiple Popular GPTs (as of February 2024)

1) GPT-4 System Prompt:

You are ChatGPT, a large language model trained by OpenAI, based on the GPT-4 architecture. Knowledge cutoff: 2023-04 Current date: 2024-02-07

Image input capabilities: Enabled

Tools

# Setup Basic Lab
#use key you generated when prompted
terraform plan
#use key you generated when prompted
terraform apply
# SSH into Lab and Setup Listener
ssh ec2-user@<output IP> -i <location of your generate keys>
sudo yum install nc
@mccabe615
mccabe615 / remote-exec.tf
Created July 19, 2023 13:06
Remote exec example
resource "aws_instance" "example" {
ami = "ami-06ca3ca175f37dd66"
instance_type = "t2.micro"
associate_public_ip_address = true
provisioner "remote-exec" {
inline = [
@mccabe615
mccabe615 / helperpaths.txt
Created July 14, 2022 18:11
helper paths
/Users/guptagr/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.40/aws/arn/arn.go
/Users/guptagr/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.40/aws/awserr/error.go
/Users/guptagr/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.40/aws/awserr/types.go
/Users/guptagr/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.40/aws/awsutil/path_value.go
/Users/guptagr/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.40/aws/awsutil/prettify.go
/Users/guptagr/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.40/aws/client/client.go
/Users/guptagr/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.40/aws/client/default_retryer.go
/Users/guptagr/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.40/aws/client/logger.go
/Users/guptagr/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.40/aws/config.go
/Users/guptagr/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.40/aws/context_background_1_7.go
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC9A4kmSHmyhncSssfXAuEFIQ8bLExiXxwolr6wrx9NhyQa9229FTuLJmztF+QP755njtLFsV/hx8jlKYtBseEBV2M5DKZLloCP8ucyUmF1ZNS/qZoNQbMNCBLfsEExrD51f17f5aqbH6AeSLDJDn9YhPoZQYYURl3GIK06fn3NoL3gDXL95aLzU0b16WSbgPoTkszvo/LS8r468AalC5npAfyQ8eOpDwcBgJI/4WIXNPYMBr6eN2nYKlJlm5cIgvfEfft1hgrU4lyJFQB0US11vTRIJUOQ+ZLm7P9Axeu2iDSc5QMB1fmpnGJOaIvxr/5Io9x2JOZ5R9PIBBab8TOsL1nCyjZYuqw0mS/RucDyvA001MZUDHJBwnMNzDrp6pkZ9+Owj1rQTJCcnshP7B9H+9IxVW0tTpCGOGVr0v4CV3cTxzgjw1C6W4bn4MWDvuQnVMU2uMmJqFwy9ooo8SCXd3esFMnznvekhBlMDtPVnDhmgeH4G0eroYXxfn/SUE0= rhodes@mdm
import boto3, json
print("Account: ", end = '')
print(boto3.client('sts').get_caller_identity()['Account'])
client = boto3.client('config')
print()
print("Getting non-compliant config results")
print()

ssh in

apt-get update

scp Nessus-8.7.2-ubuntu1110_amd64.deb root@204.48.31.211:/tmp

cd /tmp

dpkg -i Nessus-8.7.2-ubuntu1110_amd64.deb

@mccabe615
mccabe615 / delete-lambda.sh
Last active January 27, 2020 16:27
Bash script to download the lambda code and delete it
#Script to delete lambdas after downloading the code
#Accepts a new line delimited file with lambda names or ARNs
#Usage: log into the AWS account on the command line
# delete-lambda.sh <filename>
while IFS="" read -r p || [ -n "$p" ];
do
if [ -z $1 ]; then
echo "Error: must supply a filename with line delimited values"
@mccabe615
mccabe615 / android-burp-cert.sh
Created September 25, 2019 18:02 — forked from vavkamil/android-burp-cert.sh
One Liner For Installing Burp Certificate Into Android Nougat and Later
# https://securitychops.com/2019/08/31/dev/random/one-liner-to-install-burp-cacert-into-android.html
#
curl --proxy http://127.0.0.1:8080 -o cacert.der http://burp/cert \
&& openssl x509 -inform DER -in cacert.der -out cacert.pem \
&& cp cacert.der $(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0 \
&& adb root \
&& adb remount \
&& adb push $(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0 /sdcard/ \
&& echo -n "mv /sdcard/$(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0 /system/etc/security/cacerts/" | adb shell \
&& echo -n "chmod 644 /system/etc/security/cacerts/$(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0" | adb shell \
@mccabe615
mccabe615 / hosts.sh
Created February 3, 2019 02:31
Determine number of hosts for subnet from file
while IFS="" read -r p || [ -n "$p" ];
do
printf '%s' "$p -- Hosts: ";
subnetcalc $p|grep "Max. Hosts"|awk '{ print $4 }';
done < hosts.txt
# while IFS="" read -r p || [ -n "$p" ]; do printf '%s' "$p -- Hosts: "; subnetcalc $p|grep "Max. Hosts"|awk '{ print $4 }'; done < hosts.txt