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
#!/bin/bash | |
lien="$1" | |
dossier="" | |
exclure="$2" | |
wget -nv -nc -nd -X $exclure -r -linf -A zip,rar $lien | |
for file in `ls` do | |
if ( expr "$file" : .*rar$ ) > /dev/null | |
then |
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/python | |
#-*- coding: iso-8859-15 -*- | |
################################################################### | |
# macinfo by unixtrem # | |
# # | |
# this script shows the vendor of a mac address # | |
# you can use different syntaxes to get the result and the script # | |
# automatically parses your entered MAC for more speed. # | |
# # |
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> | |
int main () { | |
unsigned char m[2+4], rpill[] = "\x0f\x01\x0d\x00\x00\x00\x00\xc3"; | |
*((unsigned*) & rpill[3]) = (unsigned)m; | |
((void(*)()) & rpill)(); | |
printf ("idt base: %#x\n", *((unsigned*) & m[2])); | |
if (m[5]>0xd0) { | |
printf ("Inside Matrix!\n", m[5]); |
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 jython | |
#-*- encoding:utf-8 -*- | |
from java.lang import System | |
from javax.swing import JFrame, JButton, JLabel | |
from java.awt import BorderLayout | |
# Exit application | |
def exitApp(event): | |
System.exit(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 html.parser import HTMLParser #Import the parser | |
class HeadingParser(HTMLParser): #create a subclass of HTMLParser which will overload handle.. | |
inHeading = False | |
def handle_starttag(self, tag, attrs): #Triggered when an opening tag is encountered | |
if tag == "h1": #if the tag is <h1> | |
self.inHeading = True #Change a variable which says we are in an header | |
print("Found a Heading 1") | |
def handle_data(self, data): #Triggered when data found (the content of the tag) | |
if self.inHeading: #Useless, used just to filter content of h1's |
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
def RC4(data, key): | |
x = 0 | |
s = range(256) | |
for i in range(256): | |
x = (x + s[i] + ord(key[i % len(key)])) % 256 | |
s[i], s[x] = s[x], s[i] | |
x = y = 0 | |
out = "" | |
for c in data: | |
x = (x + 1) % 256 |
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 unittest | |
class Test1 (unittest.TestCase): #Define a class which extend unittest | |
def runTest(self): | |
self.failIf (1+1 != 2, '1+1 failed !') | |
def suite(): | |
suite = unittest.TestSuite() #create an object testsuite | |
suite.addTest(Test1()) | |
return suite |
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 | |
#-*- encoding: utf-8 -*- | |
import SocketServer | |
class EchoRequestHandler(SocketServer.BaseRequestHandler): | |
def setup(self): | |
print self.client_address, 'connected!' | |
self.request.send('hi ' + str(self.client_address) + '\n') |
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 pydbg import * | |
from defines import * | |
import struct | |
import random | |
def printf_randomizer(dbg): | |
# Read in the value of the counter at ESP + 0x8 as a DWORD | |
parameter_addr = dbg.context.Esp + 0x8 | |
counter = dbg.read_process_memory(parameter_addr,4) #will be trigger when counter=4 |
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
''' | |
#This commented program is vulnerable to a buffer overflow (copy it in a separate file) | |
from ctypes import * | |
msvcrt = cdll.msvcrt | |
raw_input("Once the debbuger is attached press any key") # Give the debugger time to attach, then hit a button | |
buffer = c_char_p("AAAAA") # Create the 5-byte destination buffer |
OlderNewer