Skip to content

Instantly share code, notes, and snippets.

@dimo414
dimo414 / index.php
Created April 29, 2013 21:19
How To Identify The Requested Page In PHP
<code><pre>
<?php
echo "__FILE__: ".__FILE__."\n";
echo "PHP_SELF: ".$_SERVER['PHP_SELF']."\n";
echo "SCRIPT_NAME: ".$_SERVER['SCRIPT_NAME']."\n";
echo "REQUEST_URI: ".$_SERVER['REQUEST_URI']."\n";
echo "parse_url(REQUEST_URI): ".parse_url($_SERVER['REQUEST_URI'],PHP_URL_PATH)."\n";
?>
@postmodern
postmodern / rails_rce.rb
Last active March 5, 2025 00:46
Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156)
#!/usr/bin/env ruby
#
# Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156)
#
# ## Advisory
#
# https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion
#
# ## Caveats
#
@haad
haad / gist:4237509
Created December 7, 2012 23:28
ASA 5510 OID list
ASA-5510-2# sh snmp-server oidlist
-------------------------------------------------
[0] 1.3.6.1.2.1.1.1. sysDescr
[1] 1.3.6.1.2.1.1.2. sysObjectID
[2] 1.3.6.1.2.1.1.3. sysUpTime
[3] 1.3.6.1.2.1.1.4. sysContact
[4] 1.3.6.1.2.1.1.5. sysName
[5] 1.3.6.1.2.1.1.6. sysLocation
[6] 1.3.6.1.2.1.1.7. sysServices
@RaVbaker
RaVbaker / readme.md
Created March 30, 2012 20:12
[HOWTO] Rewrite all urls to one index.php in Apache

Redirect All Requests To Index.php Using .htaccess

In one of my pet projects, I redirect all requests to index.php, which then decides what to do with it:

Simple Example

This snippet in your .htaccess will ensure that all requests for files and folders that does not exists will be redirected to index.php:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d