Skip to content

Instantly share code, notes, and snippets.

View MohamedAlaa's full-sized avatar

Mohamed A. Hassan MohamedAlaa

View GitHub Profile
@alexstone
alexstone / slack_notification.php
Created March 3, 2014 06:54
Fire a Slack Notification via CURL
<?php
// (string) $message - message to be passed to Slack
// (string) $room - room in which to write the message, too
// (string) $icon - You can set up custom emoji icons to use with each message
public static function slack($message, $room = "engineering", $icon = ":longbox:") {
$room = ($room) ? $room : "engineering";
$data = "payload=" . json_encode(array(
"channel" => "#{$room}",
"text" => $message,
@phikshun
phikshun / netgear_upnp_csrf.rb
Created March 18, 2014 23:44
Netgear UPnP CSRF
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpServer::HTML
def initialize(info = {})
super(update_info(info,
'Name' => 'NetGear UPnP CSRF',
@phikshun
phikshun / netgear_telnet_enabler.rb
Created March 18, 2014 23:49
Netgear Telnet Enabler
require 'msf/core'
require 'crypt/blowfish' # sorry, openssl is limited to 16-byte key size :(
# add gem 'crypt', '1.1.4' to Gemfile
module ::Crypt
class Blowfish
def setup_blowfish()
@sBoxes = Array.new(4) { |i| INITIALSBOXES[i].clone }
@pArray = INITIALPARRAY.clone
keypos = 0
@zkareemz
zkareemz / jquery-attached-events
Last active August 29, 2015 14:18
Get all jquery attached events
// This is a simple function to get all the attached jquery events on all the DOM elements
// you will find a new data attribute on the elements that has events attached to it.
(function() {
if (window.jQuery) {
var elms = [],
elm = {},
attrs = "",
evTypes = 0,
evCounter = 0,
elmCounter = 0,