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
define(["dojo/_base/declare","dojo/dom", | |
"dijit/_Widget", "dijit/_TemplatedMixin", | |
"dojo/text!./templates/MainViewWidget.html", | |
"dijit/layout/TabContainer", "dijit/layout/ContentPane","dijit/layout/BorderContainer","dijit/form/TextBox", "dijit/layout/AccordionContainer"], | |
function(declare, dom, _Widget, _TemplatedMixin, template){ | |
return declare("package.MainViewWidget", [_Widget, _TemplatedMixin], { | |
// widgetsInTemplate: true, /*keep this false, otherwise data-dojo-attach-event attribute is a pain in the ass!*/ | |
templateString: template, | |
constructor: function(){ |
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
# built application files | |
#*.apk | |
*.ap_ | |
# files for the dex VM | |
*.dex | |
# Java class files | |
*.class |
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 * | |
import multiprocessing | |
import time,re | |
class MITM: | |
packets=[] | |
offset=0; | |
modifier='s' | |
diff_len=1 | |
def __init__(self,victim=("192.168.56.129","00:0c:29:d1:aa:71" ),node2=("192.168.56.1", "00:50:56:c0:00:08")): | |
self.victim=victim |
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 re | |
from scapy.all import * | |
def psize(packet): | |
#assume 20 from http://stackoverflow.com/questions/6639799/calculate-size-and-start-of-tcp-packet-data-excluding-header | |
return packet[IP].len-packet[IP].ihl*4-4*packet[TCP].dataofs | |
def groupPacketsByFlow(packets): | |
flows={} | |
print flows | |
print type(packets) |
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
3 | |
3 3 0 1 | |
0 1 | |
1 2 | |
0 2 | |
4 5 0 3 | |
0 1 | |
1 3 | |
0 2 | |
2 3 |
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
// Ideone_Language_Id:1 | |
/* Don"t remove the first line! */ | |
#include <iostream> | |
#include <string.h> | |
#include <stdio.h> | |
#include <algorithm> | |
#include <vector> | |
#include <set> | |
#include <map> | |
#include <cmath> |
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
// Ideone_Language_Id:1 | |
/* Don"t remove the first line! */ | |
#include <iostream> | |
#include <string.h> | |
#include <stdio.h> | |
#include <algorithm> | |
#include <vector> | |
#include <set> | |
#include <map> | |
#include <cmath> |
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
// Ideone_Language_Id:1 | |
/* Don"t remove the first line! */ | |
#include <iostream> | |
#include <string.h> | |
#include <stdio.h> | |
#include <algorithm> | |
#include <vector> | |
#include <set> | |
#include <map> | |
#include <cmath> |
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 indent(in_stream,out_stream): | |
indent=0; | |
def split(line): | |
return list(x.strip() for x in line.split(';')) | |
def printsplit(line): | |
lines = split(line) | |
if len(lines)==1 and lines[0].strip()=='': | |
return | |
print lines | |
if lines[-1].strip()=='': |
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 <iostream> | |
#include <string.h> | |
#include <algorithm> | |
#include <vector> | |
#include <set> | |
#include <map> | |
/*more #includes. Don't write "using namespace std" here*/ | |
#ifdef __WIN32__ | |
#define getchar_unlocked getchar |