Skip to content

Instantly share code, notes, and snippets.

@mccabe615
mccabe615 / phpdangerousfuncs.md
Last active April 21, 2024 17:04
Dangerous PHP Functions

Command Execution

exec           - Returns last line of commands output
passthru       - Passes commands output directly to the browser
system         - Passes commands output directly to the browser and returns last line
shell_exec     - Returns commands output
\`\` (backticks) - Same as shell_exec()
popen          - Opens read or write pipe to process of a command
proc_open      - Similar to popen() but greater degree of control
pcntl_exec - Executes a program
@mccabe615
mccabe615 / AngularTI.md
Last active April 18, 2024 11:37
Angular Template Injection Payloads

1.3.2 and below

{{7*7}}

'a'.constructor.fromCharCode=[].join;
'a'.constructor[0]='\u003ciframe onload=alert(/Backdoored/)\u003e';
@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

@mccabe615
mccabe615 / OhShitGit.md
Last active January 10, 2024 20:59
Oh Shit Git

Oh shit, I committed and immediately realized I need to make one small change!

make your change

git add .
git commit --amend

follow prompts to change or keep the commit message

now your last commit contains that change!

# 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 / gist:8411428
Created January 14, 2014 01:25
GenyMotion ARM Fix
Genymotion is a Virtual Android Environment built on x86 and Virtualbox. It's not an ARM emulator so it's performance is way better than the Android SDK Emulator. However in their latest update they've removed both ARM Translation and Google Play Apps. (This is what causes the "INSTALL_FAILED_CPU_ABI_INCOMPATIBLE" errors) Many Devs and Users still find these features very useful for various reasons and their removal has forced people to look for alternatives to Genymotion.
This guide is for getting back both ARM Translation and Google Play apps in your Genymotion VM.
UPDATE-v1.1: I've gotten more up-to-date builds of libhoudini and have updated the ZIP. This fixes a lot of app crashes and hangs. Just flash the new one and it should work.
Download the following ZIPs:
ARM Translation Installer v1.1 - http://goo.gl/JBQmPa(Mirrors) ON DROPBOX
Download the correct GApps for your Android version:
Google Apps for Android 4.3 - http://goo.im/gapps/gapps-jb-20130813-signed.zip ON DROPBOX
Google Apps for Android 4.2
@mccabe615
mccabe615 / dangerouspythonfunc.md
Created April 19, 2016 19:20
dangerous python function

• commands.getoutput • commands.getstatus • commands.getstatusouput • compile • cPickle.load • cPickle.loads • eval • exec • execfile • marshal.load

@mccabe615
mccabe615 / capybara cheat sheet
Created November 22, 2015 18:47 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@mccabe615
mccabe615 / iterm2-solarized.md
Created February 2, 2019 21:53 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k