Using adb, create a backup of the app using the following command:
adb backup -f freeotp-backup.ab -apk org.fedorahosted.freeotp
# | |
# Instructions for quick gluster server (1 node) setup with a volume on LVM. | |
# No replication, just using localhost. | |
# | |
# See https://docs.gluster.org/en/latest/Administrator%20Guide/Brick%20Naming%20Conventions/ | |
# | |
# Install GlusterFS | |
add-apt-repository ppa:gluster/glusterfs-4.0 | |
apt-get install glusterfs-server |
#!/usr/bin/env python | |
import dns.resolver | |
main_domain = "mail-out.ovh.net." | |
cur_mailout=1 | |
while True: | |
try: | |
mail_out_answer = dns.resolver.query('mo' + str(cur_mailout) + '.' + main_domain,'A') | |
except dns.resolver.NXDOMAIN: |
workspace: | |
base: /build | |
pipeline: | |
build-image: | |
image: docker | |
commands: | |
# Build development target, which includes xdebug. | |
# Tag with both api-build:<build_number> and api-build:latest. |
Using adb, create a backup of the app using the following command:
adb backup -f freeotp-backup.ab -apk org.fedorahosted.freeotp
# Configuration to parse Apache logs with parameters : | |
# LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %T %D \"%{Referer}i\" \"%{User-Agent}i\"" | |
input { | |
tcp { | |
port => 5000 | |
type => "apache-access" | |
} | |
udp { |
# Fail2Ban filter for SoftEther authentication failures | |
# Made by quixrick and jonisc | |
# Thanks to quixrick from Reddit! https://reddit.com/u/quixrick | |
# Further reference: http://www.vpnusers.com/viewtopic.php?f=7&t=6375&sid=76707e8a5a16b0c9486a39ba34763901&view=print | |
[INCLUDES] | |
# Read common prefixes. If any customizations available -- read them from | |
# common.local | |
before = common.conf |
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
# Set the maximum number of open file descriptors
ulimit -n 20000000
# Set the memory size for TCP with minimum, default and maximum thresholds
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
from lxml import html | |
import csv, os, json | |
import requests | |
from exceptions import ValueError | |
from time import sleep | |
def linkedin_companies_parser(url): | |
for i in range(5): | |
try: |
### 1: Drop invalid packets ### | |
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP | |
### 2: Drop TCP packets that are new and are not SYN ### | |
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP | |
### 3: Drop SYN packets with suspicious MSS value ### | |
/sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP | |
### 4: Block packets with bogus TCP flags ### |
http://stackoverflow.com/a/30493366/188963
Other answers do mention that argparse
is the way to go for new Python, but do not give usage examples. For completeness, here is a short summary of how to use argparse:
1) Initialize
import argparse
# Instantiate the parser
parser = argparse.ArgumentParser(description='Optional app description')