Skip to content

Instantly share code, notes, and snippets.

@nstarke
nstarke / php-vulnerability-egrep.sh
Last active October 4, 2016 22:15
PHP Vulnerability egrep
# this command searches all PHP files in a directory for vulnerable shell functions
egrep -r --include "*.php" -e "(system|exec|popen|pcntl_exec|proc_open)\(" .
# this command searches all PHP files in a directory for certain vulnerable php execution functions
egrep -r --include "*.php" -e "(eval|assert|preg_replace)\(" .
# this command returns instances where variables are echoed out without htmlspecialchars()
# it can be useful for finding XSS vulnerabilities in PHP code
egrep -r --include "*.php" -e "echo\s*\\$.*;" .
@jedi4ever
jedi4ever / gist:7677d62f1414c28a1a8c
Last active November 20, 2020 07:28
Some notes on travisci remote debugging via ssh or screenshot or remote desktop of Mac VM builds
Some notes on remote debugging mac builds on Travisci. It's hard to tell when something hangs what the cause it. Trial and error via commits is tedious. And on Mac , sometimes it's the gui asking for input. So I worked my around to get the access I needed for faster debugging a build.
#################################################
# Enable remote ssh access to travisci build for debugging
#################################################
# Add a key so we can login to travisci vm
- cat ssh/travisci.pub >> ~/.ssh/authorized_keys
- chmod 600 ssh/travisci
# Install netcat
@Swop
Swop / AnnotatedDescription.php
Last active May 10, 2020 21:19
Annotation reader in Symfony
<?php
namespace Foo\Annotations;
/**
*@Annotation
*/
class AnnotatedDescription
{
public $value;