Original: http://www.shadowandy.net/2012/03/asus-rt-n66u-tomatousb-firmware-flashing-guide.htm
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 time | |
import struct | |
import socket | |
import hashlib | |
import sys | |
from select import select | |
import re | |
import logging | |
from threading import Thread | |
import signal |
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
########################################################## | |
# How to NEVER use Lambdas. An inneficient and yet educa-# | |
# tonal guide to the proper misuse of the lambda constru-# | |
# ct in Python 2.x. [DO NOT USE ANY OF THIS EVER] # | |
# by: e000 (13/6/11) # | |
########################################################## | |
## Part 1. Basic LAMBDA Introduction ## | |
# Well, it's worth diving straight into what lambdas are. | |
# Lambdas are pretty much anonymous "one line" functions |
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
BEGIN { | |
FS=","; | |
OFS=","; | |
} | |
{ | |
COUNTS[$1] += 1; | |
TOTALS[$1] += $2; | |
} |
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
BEGIN { | |
RS = ORS = "\r\n" | |
HttpService = "/inet/tcp/8000/0/0" | |
while(1) { | |
_NR = 0 | |
while((HttpService |& getline) > 0) { | |
_NR += 1 | |
handle_header($0) | |
} | |
close(HttpService) |
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
# todo : | |
# Pouvoir doubler les bords ou le haut ex : ** | |
# Parser le html pour prendre que le affiché ex <a href="">titi</a> ne prendre que titi. | |
# ou encore recupérer la taille d'un formulaire. | |
# prevoir un systeme de ligne ou colonne aussi. | |
# Bussiere | |
string = ["totosdjfsdfsdfdsfsdfsdfsdfsdfsdft","titigsgsgsgsgsgsgs","tata"] | |
texte = """Qui n’a jamais eu besoin d’un coup de main, et aucune idée d’où trouver de l’aide ? |
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
# | |
# NB : this is not secure | |
# from http://code.activestate.com/recipes/266586-simple-xor-keyword-encryption/ | |
# added base64 encoding for simple querystring :) | |
# | |
def xor_crypt_string(data, key='awesomepassword', encode=False, decode=False): | |
from itertools import izip, cycle | |
import base64 | |
if decode: |
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 time | |
import struct | |
import socket | |
import hashlib | |
import base64 | |
import sys | |
from select import select | |
import re | |
import logging | |
from threading import Thread |
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 bash | |
. paver_autocomplete | |
. fabric_autocomplete |
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 scapy.all import * | |
ap_list = [] | |
def PacketHandler(pkt) : | |
if pkt.haslayer(Dot11) : | |
if pkt.type == 0 and pkt.subtype == 8 : |
OlderNewer