This file contains hidden or 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/sh | |
# | |
# ufetch-arch - tiny system info for arch | |
## INFO | |
# user is already defined | |
host="$(cat /etc/hostname)" | |
os='Arch Linux' | |
kernel="$(uname -sr)" |
This file contains hidden or 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
$a = netsh.exe wlan show profiles | Select-String -Pattern ": "; For ($i=1; $i -le $a.length * 2; $i+=2){ $b = ($a -split "`t" -split ": ")[$i]; $c = netsh.exe wlan show profile name=$b key=clear | Select-String -Pattern "clave "; "Red: " + $b + $c} |
This file contains hidden or 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
<?php | |
// This script is run every 5 minutes | |
// A ping failure will generate an email | |
// We ping critical servers that serve to identify both a server failure and/or a circuit or VPN failure. | |
// Define descriptions and ip addresses below to test on | |
$hosts = array( | |
array("description" => "Google.com", "hostip" => "www.google.com"), | |
array("description" => "Office1", "hostip" => "192.168.1.2") | |
); |
This file contains hidden or 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
lsblk --ascii -o "NAME,TYPE,SIZE,FSTYPE,MOUNTPOINT" |
This file contains hidden or 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 | |
# | |
# showmydisks - report partitions, types, filesystems, and disk space usage | |
# | |
PRGVERSION="v0.12 * 2015-09-12 (c) Andreas Schamanek" | |
# Copyright 2004-2015: Andreas Schamanek <[email protected]> | |
# Homepage: http://wox.at/as/_/showmydisks | |
# License + History: see end of file |
This file contains hidden or 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
zq -f text "cut ts,id.orig_h,id.orig_p,conn_state,history,orig_ip_bytes,resp_ip_bytes" conn.log;zq "sum(orig_bytes)" conn.log;zq "avg(orig_bytes)" conn.log;zq "history="D"|count ()" conn.log | |
#Zeekurity Zeek_IDS. Remote Windows Network audit. (SSH). | |
ssh [email protected] -p2223 ..... zeek -S -Q -C -r - -e 'redef LogAscii::use_json=T;' local.bro bro-scripts/scripts/geo/geo policy/frameworks/files/extract-all-files.bro | |
watch -n2 -c 'tree -aJhD| jq . | ccze -A' | |
This file contains hidden or 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 apt-get install cmake make gcc g++ flex bison libpcap-dev libssl-dev python-dev swig zlib1g-dev | |
sudo apt-get install libmaxminddb-dev postfix curl git | |
git clone --recursive https://github.com/zeek/zeek | |
cd zeek | |
./configure | |
make | |
sudo make install |
This file contains hidden or 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
Grep hostnames from ssl certificate | |
echo | openssl s_client -connect example\.com | openssl x509 -noout -text | grep DNS |
This file contains hidden or 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
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.6.2-amd64.deb | |
sudo dpkg -i filebeat-7.6.2-amd64.deb | |
##### Modify /etc/filebeat/filebeat.yml to set the connection information: | |
output.elasticsearch: | |
hosts: ["<es_url>"] | |
username: "elastic" | |
password: "<password>" |
This file contains hidden or 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
# Run the last command as root | |
sudo !! | |
# Serve current directory tree at http://$HOSTNAME:8000/ | |
python -m SimpleHTTPServer | |
# Save a file you edited in vim without the needed permissions | |
:w !sudo tee % | |
# change to the previous working directory | |
cd - | |
# Runs previous command but replacing | |
^foo^bar |