Skip to content

Instantly share code, notes, and snippets.

View AJNOURI's full-sized avatar
💭
I may be slow to respond.

AJ NOURI AJNOURI

💭
I may be slow to respond.
View GitHub Profile
@AJNOURI
AJNOURI / DHCPv6_attack
Created January 19, 2015 00:49
DHCPv6 Attack by faking SOLLICIT messages in RAPID commit.
# -*- coding: utf-8 -*-
#! /usr/bin/env python
# DHCPv6 fake attack
# Date: 28/10/11
# Author: AJ NOURI (cciethebeginning.wordpress.com)
from scapy.all import *
from netaddr import *
# or from netaddr.strategy.ipv6 import *
@AJNOURI
AJNOURI / 0_reuse_code.js
Last active August 29, 2015 14:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@AJNOURI
AJNOURI / javascript_resources.md
Last active August 29, 2015 14:19 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@AJNOURI
AJNOURI / php-file.php
Last active June 26, 2016 02:43
php inside html to detect ip address
<?php
header('Content-Type: text/plain');
echo "Server IP: ".$_SERVER['SERVER_ADDR'];
echo "\nClient IP: ".$_SERVER['REMOTE_ADDR'];
echo "\nX-Forwarded-for: ".$_SERVER['HTTP_X_FORWARDED_FOR'];
?>
@AJNOURI
AJNOURI / link 2 two nodes.sql
Created August 25, 2015 00:25
link 2 two nodes
@AJNOURI
AJNOURI / apache_ssl_install.sh
Last active August 27, 2018 13:53
Install Apache2 and create self-signed ssl certificate on Ubuntu 14.04
#!/bin/bash
commonname=apachehttps.lab
country=FR
state=IDF
locality=Panam
organization=cciethebeginning.wordpress.com
organizationalunit=IT
[email protected]
@AJNOURI
AJNOURI / CiscoKeyGen.py
Last active October 17, 2017 15:16 — forked from paalfe/CiscoKeyGen.py
Cisco IOU License Generator. Originally found at http://www.routingloops.co.uk/cisco/gns3-v1-1-install-on-ubuntu-14-04-lts/, I have done a few changes to it. Make the file executable with " chmod +x CiscoKeyGen.py " and execute it " ./CiscoKeyGen.py ".
#! /usr/bin/python
print "\n*********************************************************************"
print "Cisco IOU License Generator - Kal 2011, python port of 2006 C version"
import os
import socket
import hashlib
import struct
# get the host id and host name to calculate the hostkey
hostid=os.popen("hostid").read().strip()
hostname = socket.gethostname()
# Cleanup disk RUN rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/*
@AJNOURI
AJNOURI / Install GNS3 + Docker on Mint 18
Last active July 9, 2016 14:42
Install GNS3 + Docker on Mint 18
#!/bin/bash
#### GNS3 v1.5.0 from pip3
sudo apt install -y python-pip python3-pip python-setuptools python3-setuptools python3-dev xvfb x11vnc vncviewer
sudo pip3 install pyqt5
sudo pip3 install gns3-gui==1.5.0
sudo pip3 install gns3-server==1.5.0
#### Docker
sudo apt-get install -y apt-transport-https

Keybase proof

I hereby claim:

  • I am ajnouri on github.
  • I am ajnouri (https://keybase.io/ajnouri) on keybase.
  • I have a public key whose fingerprint is 7A8F C9A5 FE39 1082 16DD FF32 41CC DE15 11DF 0EB8

To claim this, I am signing this object: