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 socket | |
class Server(object): | |
def __init__(self,host,port): | |
self._host = host | |
self._port = port | |
def __enter__(self): | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR,1) | |
sock.bind((self._host,self._port)) |
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
Ubuntu Privacy | |
sudo systemctl stop apport.service | |
sudo systemctl disable apport.service | |
sudo systemctl mask apport.service | |
gsettings set com.ubuntu.update-notifier show-apport-crashes false | |
ubuntu-report -f send no | |
sudo systemctl stop whoopsie.service | |
sudo systemctl disable whoopsie.service | |
sudo systemctl mask whoopsie.service |
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
# Remove previous rules | |
iptables -F | |
iptables -X | |
iptables -Z | |
# Set default policies | |
iptables -P INPUT DROP | |
iptables -P OUTPUT ACCEPT | |
iptables -A INPUT -p tcp --dport 22 -m limit --limit 25/minute --limit-burst 100 -j ACCEPT | |
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
iptables -A INPUT -p tcp --dport 22 -j ACCEPT |
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
#!/usr/bin/env python | |
import re | |
import socket, struct | |
from ipwhois import IPWhois | |
from ipaddress import ip_network, ip_address | |
ips = [] | |
with open("merged-file3") as 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
#!/usr/bin/env python | |
import re | |
import socket, struct | |
import datetime | |
ips = [] | |
with open("merged-file3") as f: | |
for line in 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
Avg Price Mar Req 1/pt 2/pt 3/pt | |
20 4.2 4.2 8.4 12.6 | |
30 6.3 6.3 12.6 18.9 | |
50 10.5 10.5 21 31.5 | |
70 14.7 14.7 29.4 44.1 | |
85 17.85 17.85 35.7 53.55 | |
102 21.42 21.42 42.84 64.26 | |
119 24.99 24.99 49.98 74.97 | |
136 28.56 28.56 57.12 85.68 | |
153 32.13 32.13 64.26 96.39 |
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
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help | |
driftfile /var/lib/ntp/ntp.drift | |
logfile /var/log/ntp.log | |
# Enable this if you want statistics to be logged. | |
#statsdir /var/log/ntpstats/ | |
statistics loopstats peerstats clockstats | |
filegen loopstats file loopstats type day enable |
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
from datetime import datetime | |
import time | |
import threading | |
########################### | |
from multiprocessing import Process | |
import random | |
########################### | |
import dns.resolver | |
import dns.reversename | |
import ftplib |
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 | |
#If possible, add something in for choosing [1] Configure Basics [2] Configure Security [3] Configure VMware Tools [4] Configure All. This might require Perl. | |
#set -x | |
#read -p "Configure this server to be on 192.168.1.3/24?" yn | |
#while true; do | |
#case $yn in | |
# [Yy]* ) | |
# echo "What IP address will be assigned to this server?" |
OlderNewer