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 | |
#Are you have multiple Debian servers? Use parallel-ssh instead | |
#Based on https://github.com/FabioBaroni/CVE-2024-3094-checker/tree/main | |
parallel-ssh -A -i -H "ip1 ip2 ip3 ... ipn" -l username "dpkg -l | grep xz-utils " |
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
#Other version for check page, using HTTPie | |
#previous version (using wget) >https://gist.github.com/angelbladex/dad9308bbdb7e18f384a | |
# HTTPie https://httpie.io/ | |
function validate_url(){ | |
#using Httpie | |
if [[ `http -h --verify no --timeout 10 $1 "Cache-Control: no-cache, no-store" | grep -E '200|320|302|303'` ]]; then | |
# using CUrl |
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 | |
#put first letter of each word on Uppercase | |
cat file | tr "[A-Z]" "[a-z]" | sed -e "s/\b\(.\)/\u\1/g" > newFile |
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
/*When presented with failure | |
*igb-3.4.8/src/igb_main.c:193: error: implicit declaration of function SET_RUNTIME_PM_OPS | |
* | |
*Add the following macro to | |
*/usr/src/linux-headers-2.6.32-5-common/include/linux/pm.h | |
*/ | |
#ifdef CONFIG_PM_RUNTIME | |
#define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ | |
.runtime_suspend = suspend_fn, \ | |
.runtime_resume = resume_fn, \ |
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 | |
limit=6 | |
file="/tmp/mirrorlist.pacnew" | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi |
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 | |
subnet="192.168.16.0/24" | |
#sudo nmap -sP $subnet | grep report | grep -oE "[[:digit:]]{1,3}.[[:digit:]]{1,3}.[[:digit:]]{1,3}.[[:digit:]]{1,3}" | tr '\n' ' ' | |
#sudo nmap -sP $subnet | grep report | grep -oE "[[:digit:]]{1,3}.[[:digit:]]{1,3}.[[:digit:]]{1,3}.[[:digit:]]{1,3}" | |
sudo nmap -sP $subnet | grep report | grep -oE "([[:digit:]]{1,3}.){3}[[:digit:]]{1,3}" |
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 | |
username="user@hostname" | |
password="your-Complex-password" | |
url="Your-URL" | |
pidfile="/tmp/openconnect-pid" | |
case "$1" in | |
start) |
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
<?php | |
function nxs_cURLTest($url) | |
{ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
//curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_TIMEOUT, 3); | |
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3); | |
$response = curl_exec($ch); |
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 | |
perl -pe 's/(\d+)/localtime($1)/e' | |
#i added this script in /usr/local/bin/ | |
#sample usage | |
#grep youtube /var/log/squid3/access.log | totime | |
#tail -f /var/log/squid3/access.log | grep "/403" | totime |
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 | |
sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n addresses_file |
NewerOlder