Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ## Author :: shutdown57 (alinko) < alinkokomansuby@gmail.com >
- ## https://facebook.com/alinko.jp | JavCode Present.
- m="\033[1;31m"
- k="\033[1;33m"
- h="\033[1;32m"
- b="\033[1;34m"
- p="\033[1;37m"
- c="\033[0m"
- p="\033[0;35m"
- s57_downloader()
- {
- which wget > /dev/null 2>&1
- if [[ $? -eq 0 ]]; then
- wget $1 -O $2 > /dev/null 2>&1
- else
- which curl > /dev/null 2>&1
- if [[ $? -eq 0 ]]; then
- curl -s $1 > $2
- fi
- fi
- }
- s57_getMedia(){
- s57_downloader "https://twitter.com/$1/media" "shutdown57.twitter.temp"
- echo -e $h"[!] Getting page media $b $1 $c ... "
- sleep 1
- if [[ -f "shutdown57.twitter.temp" ]]; then
- lo=`cat shutdown57.twitter.temp | grep -Po "https:\/\/pbs.twimg.com\/media\/(.*)\.jpg"`
- echo "Creating directory result ..."
- mkdir $1
- for tw in $lo
- do
- IFS="/" read -r -a img <<< "$tw"
- nama=${img[4]}
- if [[ -f $1/$nama ]]; then
- echo ""
- else
- echo -e "shutdown57 : "$tw" $b Downloading $c ... "
- wget $tw -O $1/$nama > /dev/null 2>&1
- if [[ -f $1/$nama ]]; then
- echo -e "shutdown57 :$h "$1"/"$nama" $c Saved !"
- fi
- fi
- done
- rm shutdown57.twitter.temp
- fi
- }
- s57_search(){
- echo -e $h"[!] Getting page media $b $1 $c ..."
- s57_downloader "https://twitter.com/search?f=users&vertical=default&q=$1" "search-shutdown57.twitter.temp"
- sleep 1
- if [[ -f "search-shutdown57.twitter.temp" ]]; then
- np=`cat search-shutdown57.twitter.temp | grep -Po "\@<b>(.*)<\/b>" | sort | uniq`
- for re in $np
- do
- IFS="<b>" read -r -a sss <<< "$re"
- apasi3=${sss[3]}
- echo -e $h"[+]$c $apasi3 "
- sleep 0.5
- echo "$apasi3" >> $1.txt
- done
- if [[ -f $1.txt ]]; then
- echo -e $h"[+]$c file saved : $1.txt "
- fi
- rm search-shutdown57.twitter.temp
- fi
- }
- s57_kntwol()
- {
- echo -e -n $b"[?]$c shutdown57::$1 >>"
- read $2
- }
- s57_banner()
- {
- clear
- printf $b" _____ _ _ _ _
- |_ _|_ _(_) |_| |_ ___ _ __| |
- | | \ \ /\ / / | __| __/ _ \ '__| |
- | | \ V V /| | |_| || __/ | |_|
- |_| \_/\_/ |_|\__|\__\___|_| (_) $c
- "$h" +================="$k"======================+ "$c"
- "$h" || Twitter Tools -"$k" coded by shutdown57 || "$c"
- "$h" ||$p JavCode (c) 2017 $k || "$c"
- "$h" +================="$k"======================+ "$c"
- "$m" [1]"$c" Get Media Username
- "$m" [2]"$c" Search username
- "$m" [3]"$c" Get Media Mass Username
- "$m" [4]"$c" Search username + Get media username
- $p +============================================+ $c
- "
- }
- s57_main(){
- s57_banner
- read -p "[?] shutdown57::options >>" np
- if [[ $np == "1" ]]; then
- s57_kntwol "Username" ap
- s57_getMedia "${ap}"
- elif [[ $np == "2" ]]; then
- s57_kntwol "Keywords" ap
- s57_search "${ap}"
- elif [[ $np == "3" ]]; then
- s57_kntwol "File" ap
- np=`cat $ap`
- yw=$(echo $np | tr "\n" "\n")
- for lo in $yw
- do
- s57_getMedia "${lo}"
- done
- elif [[ $np == "4" ]]; then
- s57_kntwol "Keywords" ap
- s57_search "${ap}"
- np=`cat $ap.txt`
- kntl=$(echo $np | tr "\n" "\n")
- for w in $kntl
- do
- s57_getMedia "${w}"
- done
- rm $ap.txt
- else
- s57_main
- fi
- }
- s57_main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement