#!/usr/local/bin/python2
from scapy.all import *
os.system("iptables -A OUTPUT -p tcp -o eth0 --sport 1:65535 --tcp-flags RST RST -j DROP")
def packet(pkt):
if pkt[TCP].flags == 2:
print('SYN packet detected port : ' + str(pkt[TCP].sport) + ' from IP Src : ' + pkt[IP].src)
send(IP(dst=pkt[IP].src, src=pkt[IP].dst)/TCP(dport=pkt[TCP].sport, sport=pkt[TCP].dport,ack=pkt[TCP].seq + 1, flags='SA'))
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
(gdb) bt 15 | |
#0 0x00007ffff79bd32c in ?? () from /usr/lib/libc.so.6 | |
#1 0x00007ffff796c6c8 in raise () from /usr/lib/libc.so.6 | |
#2 0x00007ffff79544b8 in abort () from /usr/lib/libc.so.6 | |
#3 0x00007ffff7c9ca6f in __gnu_cxx::__verbose_terminate_handler () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/vterminate.cc:95 | |
#4 0x00007ffff7cb011c in __cxxabiv1::__terminate (handler=<optimized out>) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48 | |
#5 0x00007ffff7cb0189 in std::terminate () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:58 | |
#6 0x00007ffff7cb03ed in __cxxabiv1::__cxa_throw (obj=<optimized out>, tinfo=0x5555555ba4b8 <typeinfo for boost::wrapexcept<boost::multi_index::detail::bad_archive_exception>>, | |
dest=0x55555557c240 <boost::wrapexcept<boost::multi_index::detail::bad_archive_exception>::~wrapexcept()>) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_throw.cc:98 | |
#7 0x000055555557c33e in boost::throw_exception<boost::multi_index::detail::bad_archive_excep |
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
#------------------------------------------------- | |
# | |
# Project created by QtCreator 2017-08-25T22:40:16 | |
# | |
#------------------------------------------------- | |
CONFIG += c++11 | |
QT += core gui quick qml location |
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
#------------------------------------------------- | |
# | |
# Project created by QtCreator 2017-08-25T22:40:16 | |
# | |
#------------------------------------------------- | |
CONFIG += c++11 | |
QT += core gui quick qml location |
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
var PORT = 6798; | |
var HOST = '0.0.0.0'; | |
var dgram = require('dgram'); | |
var request = require('request'); | |
var server = dgram.createSocket('udp4'); | |
server.on('listening', function () { | |
var address = server.address(); |
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
hessiancln::DataSourceBrowser browser("https://127.0.0.1/api"); | |
hessiancln::net_item_info_list list; | |
try{ | |
list = browser.networkDiscovery("network"); | |
}catch(hessiancln::invoke_exception& ex){ | |
qDebug() << "DSClientConfigurationMaps::populateGroup" << "Caught Exception: " << QString::fromStdString(ex.what()); | |
} | |
foreach(hessiancln::net_item_info item_info, list){ | |
qDebug() << "DSClientConfigurationMaps::populateGroup" << QString::fromStdString(item_info.name) << " " << item_info.type; | |
} |
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 <QtCore/QCoreApplication> | |
#include <stdio.h> | |
#include <assert.h> | |
#include <windows.h> | |
#include <lm.h> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <iostream> | |
#include <string> |
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
struct AbstractBucketPrinter{ | |
protected: | |
std::ostream& _stream; | |
public: | |
AbstractBucketPrinter(std::ostream& stream): _stream(stream){} | |
std::ostream& stream() const{return _stream;} | |
}; | |
template <typename T, int DepthN> |
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 <iostream> | |
namespace meta{ | |
template <int Begin, int End, bool done = false> | |
struct iterator{ | |
template<typename F> | |
static void iterate(F f){ | |
f(); | |
iterator<Begin, End-1, Begin == End-1>::iterate(f); | |
} |
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
namespace util{ | |
template <class Type, class Param> | |
class has_operator_round_brackets_with_parameter{ | |
public: | |
BOOST_CONCEPT_USAGE(has_operator_round_brackets_with_parameter){ | |
_t(_p); | |
} | |
private: | |
Type _t; | |
Param _p; |
NewerOlder