This file contains hidden or 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/module.h> | |
#include <linux/kernel.h> | |
#include <linux/fs.h> | |
#include <asm/uaccess.h> | |
#define DRIVER_AUTHOR "Dave B. <[email protected]>" | |
#define DRIVER_DESC "Rickroll ;)" | |
#define DEVICE_NAME "chardev" | |
MODULE_LICENSE("GPL"); |
This file contains hidden or 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 socket | |
f = open('/proc/net/arp', 'r') | |
data = f.readlines() | |
#print data | |
f.close() | |
def get_hostname(ip): | |
try: | |
return socket.gethostbyaddr(ip)[0] |
This file contains hidden or 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
from scapy.all import * | |
from scapy.config import conf | |
from scapy.themes import DefaultTheme | |
def more_info(packet): | |
print packet.summary() | |
if packet.haslayer('IPv6'): | |
print "%s " % packet.show() | |
#else: | |
#print packet.summary() |
This file contains hidden or 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 sys | |
import socket | |
def return_red(string): | |
return "\033[1;31m" + string + "\033[m" | |
console = open("/dev/console", "w") | |
while True: | |
f = open("/proc/kmsg", 'r') |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <sys/un.h> | |
#include <syslog.h> | |
#include <string.h> | |
int morespammy(void); |
This file contains hidden or 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
#!/usr/bin/env python | |
from lxml import etree | |
def main(): | |
doc = etree.parse("scan.xml") | |
for x in doc.xpath("//host[ports/port[state[@state='open']]]"): | |
for addr in x.xpath("address/@addr"): | |
print addr | |
for openz in x.xpath("ports/port[state[@state='open']]"): | |
print ' ',' '.join([str(items) for items in openz.attrib.values()]) |
This file contains hidden or 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.math.BigInteger; | |
public class hahaha | |
{ | |
public static void main(String[] args) | |
{ | |
BigInteger a = new BigInteger("0"); | |
BigInteger b = new BigInteger("1"); | |
float number = 1000000; | |
while(number-- > 1) |
NewerOlder