network:
version: 2
# renderer: NetworkManager
ethernets:
eth0:
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 | |
mkdir -p output/ | |
ls *.mp4 | while read -r l; | |
do | |
sec=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$l") | |
round_sec=${sec%.*} | |
if [[ $round_sec -lt 60 ]]; then | |
loop=$(expr 60 / $round_sec) | |
round_loop=$(expr ${loop%.*} + 2) | |
# echo $l $round_loop $round_sec |
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
http://vov3.vov.vn:2018/Attachments/V3 0103 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2015/V3 01 09 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2015/V3 02 06 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2014/V3 02 09 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2014/V3 02 12 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2015/V3 03 02 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2015/V3 03 03 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2014/V3 03 09 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2014/V3 04 03 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2015/V3 04 08 02H55 BAI DAN CA CO.mp3 |
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 | |
get_resolution(){ | |
VIDEOS=$(ls *.mp4) | |
for x in $VIDEOS | |
do | |
w=`ffprobe -v error -select_streams v:0 -show_entries stream=width -of csv=p=0 ${x}` | |
mkdir -p ${w} | |
mv ${x} ${w}/ | |
done |
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 | |
get_link(){ | |
for x in `seq 1 11` | |
do | |
echo "Crawling page: $x" | |
curl -s https://pixabay.com/en/videos/list/landscape/?pagi=${x} | grep -oP "<a href=\"[^\"]*[0-9]" | grep -Ev 'list|blog|:|photos' | sed 's/\"/ /g' | awk {'print $3'} >> /tmp/link-pixabay.txt | |
done | |
} | |
download(){ |
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 | |
cd /tmp/ | |
curl -O http://www.rfxn.com/downloads/maldetect-current.tar.gz | |
tar -zxvf maldetect-current.tar.gz | |
cd maldetect* | |
bash install.sh | |
sleep 5 | |
sed -i 's/quarantine_hits=\"0\"/quarantine_hits=\"1\"/g;s/quarantine_clean=\"0\"/quarantine_clean=\"1\"/g;s/scan_ignore_root=\"0\"/scan_ignore_root=\"1\"/g' /usr/local/maldetect/conf.maldet |
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 | |
mkdir -p ~/.ssh/ | |
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCg/QfGNy3EUYhBh6mtibywZofLY8IP4oAKhyHc7DdgDlWODpcdAKM7FEA89fV4CwEZ48/ywMoWPJAylPYgG4D8yhDe9TcQTfVPdktfoYJMiHL4kASzEf/MIHpH0fcWRZf/nccXyaLH2JrAbW9RUyQQzxzYoV5lM8z8DthMS9sEwdgZEmm413uWkfK3AkQ/aAMxyaEaZgt/piLjuSh2wZAWw9BWMEg+s3c6XaK1RAe6xJcKWfRJzox29602AlgpzIYmIRbp6YQFp3dCtfrGOG3ri2Ik5kjoxEaStDw2UCVYTDt+HFe7pmlYqSapg/JpVUpmg6mn6zT/2GaiT1mMxjV hoangdh" >> ~/.ssh/authorized_keys | |
chmod 700 ~/.ssh/ | |
chmod 600 ~/.ssh/authorized_keys | |
echo "Done!" |
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 | |
check_port() { | |
sort $1 | uniq -c | sort -nr | awk {'print $2'} | while read -r ip; | |
do | |
if ping -c 1 -w 1 $ip > /dev/null 2>&1; | |
then | |
if nc -vz -w 3 $ip 25 > /dev/null 2>&1; | |
then | |
echo $ip - Port 25 Opened; |
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 | |
IP2=$1 | |
IP=${IP2:-$(echo $(($RANDOM % 256)) $(($RANDOM % 256)) $(($RANDOM % 256)) $(($RANDOM % 256)) | sed 's/ /./g')} | |
if [[ "$IP" =~ ^(([1-9]?[0-9]|1[0-9][0-9]|2([0-4][0-9]|5[0-5]))\.){3}([1-9]?[0-9]|1[0-9][0-9]|2([0-4][0-9]|5[0-5]))$ ]]; then | |
echo -n "$IP: " | |
curl https://api.iptoasn.com/v1/as/ip/${IP} -s | grep -Eo '\"as_number\"(.+?)([0-9]),' | grep -Eo '[0-9]+' | |
# curl https://api.iptoasn.com/v1/as/ip/${IP} -s | sed 's/,/ /g;s/\"//g' | grep -Eo 'as_number.*' | awk {'print $1'} | cut -d':' -f2 | |
else |