Skip to content

Instantly share code, notes, and snippets.

View JnuSimba's full-sized avatar

s1mba JnuSimba

View GitHub Profile
#!/usr/bin/env perl
use strict;
use warnings;
sub file_contains ($$);
my $version;
for my $file (map glob, qw{ *.lua lib/*.lua lib/*/*.lua lib/*/*/*.lua lib/*/*/*/*.lua lib/*/*/*/*/*.lua }) {
# Check the sanity of each .lua file
<?php
include './htmLawed.php';
$m1=array("'","\""," ","");
$m2=array("","","\"","'","<","","","","","","","","");
$mag=array("'","\""," ","</div>","/*","*/","\\","\\\"","\\\'",";",":","<",">","=","<div","\r\n","","&#","/","*","expression(","w:expression(alert(9));","style=w:expression(alert(9));","");
for($i=0;$i<10000;$i++)
{
$fname = "tc\\hush".$i.".html";
$fp = fopen($fname, "a");
$mtotran = "";
#/usr/bin/env python3.4
#Analyse the /etc/auth.log files to get
# 1) how many failed login trials
# 2) how many succeeded login trials
# 3) how many IP's where the login trials comes from and what they are
# 4) how many invalid usernames are tested and what they are
#
# usage:
# analyse <filename>
# note: - for standard input stream
<?php
/**
* PHP 富文本XSS过滤类
*
* @package XssHtml
* @version 1.0.0
* @link http://phith0n.github.io/XssHtml
* @since 20140621
* @copyright (c) Phithon All Rights Reserved
*
@JnuSimba
JnuSimba / shellcode.c
Last active June 11, 2017 11:05
usage: ./shellcode_generator /bin/bash
/*
[] Shellcode Generator null byte free. []
[] Author: certaindeath []
[] Site: certaindeath.netii.net (at the moment under construction) []
[] This program generates a shellcode which uses the stack to store the command (and its arguments). []
[] Afterwords it executes the command with the system call "execve". []
[] The code is a bit knotty, so if you want to understand how it works, I've added an example of assembly at the end. []
*/
#include <stdio.h>
#include <stdlib.h>
@JnuSimba
JnuSimba / LogForensics.pl
Created November 6, 2017 13:09
Perl LogForensics.pl -file logfile -websvr (nginx|httpd) [-ip ip(ip,ip,ip)|-url url(url,url,url)]
#!/usr/bin/perl -w
use Getopt::Long;
use Tie::File;
my $version=2014102301;
print "\t\t\tWeb log forensics\n";
print "\t\t\tby Xti9er\n";
$|=1;
#Author:D4Vinci
def ip2long(ip):
ip = ip.split("/")[0].split(":")[0]
p = ip.split(".")
return str( ( ( ( ( int(p[0]) * 256 + int(p[1]) ) * 256 ) + int(p[2]) ) * 256 ) + int(p[3]))
#p[0] + "." + str( ( ( ( int( p[1] ) * 256 + int( p[2] ) ) * 256 ) + int( p[3] ) ) * 256 ),
#p[0] + "." + p[1] + str( ( int( p[2] ) *256 ) + int( p[3] ) )
def ip2hex(ip):
# -*- coding: utf-8 -*-
from termcolor import colored
import time
import MySQLdb
import pymongo
import socket
import ftplib
import optparse
from termcolor import colored
<#
Spect
# # # # # # # # #
# # # # # #
# # # # # # #
# # # # # # # #
# # # # # # #
beta version
Author : A-mIn3
#Program Name :- Windows Auditor Based on CIS Benchmark
#Program Name :- Windows Auditor Based on CIS Benchmark
#Benchmark File used :- CIS_Microsoft_Windows_Server_2012_Benchmark_v1.0.0
#Author : Kaustubh Padwad
#copyright : copyright (c) 2015 Kaustubh Padwad
#Licnse :- Gnu-GPL-3
Set-ExecutionPolicy -ExecutionPolicy restricted -force
echo "1 Checks for Computer Configuration"
echo "1.1 Security Settings"
echo "1.1.1 Account Policies" > audit.txt