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
sudo sed -i'' 's/^# output unified2/output unified2/' /etc/snort/snort.conf | |
sudo sed -i'' 's/ALERTMODE/#ALERTMODE/' /etc/sysconfig/snort |
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 python2 | |
from multiprocessing import Pool | |
from time import sleep | |
from random import randint, gauss | |
import os, sys | |
import requests | |
## TODO | |
# . recursively download linked resources: | |
# . images |
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
[Unit] | |
Description=Elasticsearch | |
Documentation=http://www.elastic.co | |
Wants=network-online.target | |
After=network-online.target | |
[Service] | |
Environment=ES_HOME=/usr/share/elasticsearch | |
Environment=CONF_DIR=/etc/elasticsearch | |
Environment=DATA_DIR=/var/lib/elasticsearch |
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
egrep -e "processor" -e "core id" -e ^physical /proc/cpuinfo | \ | |
xargs -l3 echo | \ | |
awk -vOFS='\t' '{ print "{\"socket\": "$7", \"core\": " $11 ", \"proc\":" $3 "}" }' | \ | |
jq -sc ' | |
[.[] | {sock_core:"\(.socket)-\(.core)", proc, core, socket } ] | |
| group_by(.sock_core) | .[] | .[0] ' | \ | |
sort -V |
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
# Move index names from bro-YYYY.MM.DD to bro-v1-YYYY.MM.DD | |
for item in $(curl -s -n -XGET localhost:9200/_cat/indices | awk '/bro-/ { split($3,a,"-"); print a[2] }'); do | |
cat <<EOF | curl -s -n -XPOST localhost:9200/_reindex -d @- >/dev/null | |
{ "source": {"index": "bro-${item}"}, "dest": {"index": "bro.v1-${item}"} } | |
EOF | |
echo -e "\nCloned data from bro-${item} to bro.v1-${item}" | |
done |
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 | |
curl --location https://github.com/raspberrypi/firmware/raw/master/boot/bcm2710-rpi-3-b.dtb > /boot/bcm2710-rpi-3-b.dtb | |
curl --location https://github.com/RPi-Distro/firmware-nonfree/raw/54bab3d6a6d43239c71d26464e6e10e5067ffea7/brcm80211/brcm/brcmfmac43430-sdio.bin > /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin | |
curl --location https://github.com/RPi-Distro/firmware-nonfree/raw/54bab3d6a6d43239c71d26464e6e10e5067ffea7/brcm80211/brcm/brcmfmac43430-sdio.txt > /usr/lib/firmware/brcm/brcmfmac43430-sdio.txt | |
echo "Reboot to ensure the dtb is initialized and kernel knows about the hardware in place." | |
echo |
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
# Install epel | |
sudo yum -y install epel-release | |
# Install kernel headers for current kernel | |
sudo yum install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r) | |
# Install ntop repos | |
cat << EOF | sudo tee /etc/yum.repos.d/ntop.repo | |
[ntop] | |
name=ntop packages |
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-Module ActiveDirectory | |
$password = (Read-Host -AsSecureString "AccountPassword") | |
$users = import-csv ".\users.csv" | |
foreach ($user in $users){ | |
New-ADUser ` | |
-SamAccountName ($user.GivenName + "." + $user.Surname).ToLower() ` | |
-UserPrincipalName (($user.GivenName + "." + $user.Surname).ToLower() + "@" + $env:USERDNSDOMAIN) ` | |
-DisplayName ($user.GivenName + " " + $user.Surname) ` |
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/local/bin/jq -s -r -f | |
( map(keys) | add | unique ) as $cols | | |
map(. as $row | $cols | map($row[.])) as $rows | | |
$cols, $rows[] | @csv |
OlderNewer