Skip to content

Instantly share code, notes, and snippets.

@opnchaudhary
opnchaudhary / pentestTools.sh
Last active August 9, 2018 02:25
This script will download the security tools needed for pentesting in fedora
#!/bin/sh
#Reconnaissance
yum install dsniff hping3 nc6 nc ncrack ngrep nmap nmap-frontend p0f sing scanssh scapy socat tcpdump unicornscan wireshark-gnome xprobe2 nbtscan tcpxtract firewalk hunt dnsenum iftop argus ettercap ettercap-gtk packETH iptraf pcapdiff etherape lynis netsniff-ng tcpjunk ssldump yersinia net-snmp openvas-client openvas-scanner
#Forensics
yum install ddrescue gparted hexedit testdisk foremost sectool-gui scanmem sleuthkit unhide examiner dc3dd afftools srm firstaidkit-plugin-all ntfs-3g ntfsprogs
#Web Application Testing
yum install httping nikto ratproxy lbd skipfish
@opnchaudhary
opnchaudhary / makebacktrack.sh
Created December 20, 2012 01:12
adds backtrack repository to your ubuntu
#!/bin/sh
wget -q http://all.repository.backtrack-linux.org/backtrack.gpg -O- | sudo apt-key add -
sudo sh -c "echo 'deb http://all.repository.backtrack-linux.org revolution main microverse non-free testing' >> /etc/apt/sources.list"
sudo apt-get update
sudo apt-get upgrade
@opnchaudhary
opnchaudhary / fedora-post-installation.sh
Last active September 12, 2016 12:38
fedora post installation script
#!/bin/sh
#Install RPMFusion, free and non-free repository
yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm -y
#Configure yum : disable gpg checking, enable caching, keep metadata for 9 days
#vi /etc/yum.conf
#If the wireless device is not supported out of the box, and if it is a Broadcom WLAN device
#yum install kmod-wl -y
@opnchaudhary
opnchaudhary / MY_Upload.php
Created January 22, 2013 12:53
codeigniter multiple file uploader by : Romaldy Minaya
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
*//**
* CodeIgniter
*
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author Romaldy Minaya
* @copyright Copyright (c) 2011, PROTOS.
@opnchaudhary
opnchaudhary / facebookHelper.php
Created February 5, 2013 08:38
Simple library to assist in getting the Facebook Fan Page Id
<?php
/**
* A simple library to assist in getting the Facebook Fan Page Id
* @author Paras Nath Chaudhary
* @copyright CopyLeft (ↄ) 2013, writephp.blogspot.com
* @license GPL
* @since Version 1.0
* @version 1.0
Implementation
@opnchaudhary
opnchaudhary / numbertoword.js
Last active December 2, 2018 08:36
Converts Numbers to Words
// Convert numbers to words
// copyright 25th July 2006, by Stephen Chapman http://javascript.about.com
// permission to use this Javascript on your web page is granted
// provided that all of the code (including this copyright notice) is
// used exactly as shown (you can change the numbering system if you wish)
/*
Documentation: Usage
=====================
1. Import the javascript file:
@opnchaudhary
opnchaudhary / Numbertowords.php
Created February 6, 2013 11:18
A codeigniter library to convert number into words
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Numbertowords {
function convert_number($number) {
if (($number < 0) || ($number > 999999999)) {
throw new Exception("Number is out of range");
}
@opnchaudhary
opnchaudhary / csv_helper.php
Created February 9, 2013 10:31
A helper class to assist in exporting data to csv file.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// ------------------------------------------------------------------------
/**
* CSV Helpers
* Inspiration from PHP Cookbook by David Sklar and Adam Trachtenberg
*
* @author Jérôme Jaglale
* @link http://maestric.com/en/doc/php/codeigniter_csv
@opnchaudhary
opnchaudhary / rand_helper.php
Last active April 18, 2018 03:52
Random String Generator : Helper File for Codeigniter
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// ------------------------------------------------------------------------
/**
* Random String Generator : Helper File for Codeigniter
*
* @author Paras Nath Chaudhary
* @link https://gist.github.com/opnchaudhary/4995012
*
*/
// ------------------------------------------------------------------------
@opnchaudhary
opnchaudhary / gmaps_3.html
Created July 5, 2013 04:26
Get latitude and longitude from google maps
<!doctyp html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Get Latitude and Longitude</title>
<script src="http://maps.google.com/maps/api/js?libraries=places&region=uk&language=en&sensor=true"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
</head>
<body>