└── Instagram-bot ├── Instagram-bot.sh └── README.md /Instagram-bot/Instagram-bot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #Ins-hack 3 | #V:2.7.3 4 | #Telegram: FELIX4 5 | 6 | 7 | string4=$(openssl rand -hex 32 | cut -c 1-4) 8 | string8=$(openssl rand -hex 32 | cut -c 1-8) 9 | string12=$(openssl rand -hex 32 | cut -c 1-12) 10 | string16=$(openssl rand -hex 32 | cut -c 1-16) 11 | device="android-$string16" 12 | uuid=$(openssl rand -hex 32 | cut -c 1-32) 13 | phone="$string8-$string4-$string4-$string4-$string12" 14 | guid="$string8-$string4-$string4-$string4-$string12" 15 | header='Connection: "close", "Accept": "*/*", "Content-type": "application/x-www-form-urlencoded; charset=UTF-8", "Cookie2": "$Version=1" "Accept-Language": "en-US", "User-Agent": "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' 16 | var=$(curl -i -s -H "$header" https://i.instagram.com/api/v1/si/fetch_headers/?challenge_type=signup&guid=$uuid > /dev/null) 17 | var2=$(echo $var | grep -o 'csrftoken=.*' | cut -d ';' -f1 | cut -d '=' -f2) 18 | ig_sig="4f8732eb9ba7d1c8e8897a75d6474d4eb3f5279137431b2aafb71fafe2abe178" 19 | 20 | 21 | 22 | banner() { 23 | printf " \n" 24 | printf " \e[1;31m[\e[0m\e[1;77m::\e[0m\e[1;31m]\e[0m\e[1;93m All account passwords are saved on your phone\e[0m (.txt)\n" 25 | printf " \e[1;31m[\e[0m\e[1;77m::\e[0m\e[1;31m]\e[0m\e[1;93m Telegrams of the code author:\e[0m FELIX4\n" 26 | printf " \e[1;31m[\e[0m\e[1;77m::\e[0m\e[1;31m]\e[0m\e[1;93m Instagram-bot\e[0m v2.7.3\n" 27 | #printf " \e[1;31m[\e[0m\e[1;77m::\e[0m\e[1;31m]\e[0m\e[1;93m --\e[0m\n" 28 | } 29 | 30 | login_user() { 31 | 32 | 33 | if [[ $user == "" ]]; then 34 | printf "\e[1;31m[\e[0m\e[1;77m*\e[0m\e[1;31m]\e[0m\e[1;93m Login\e[0m\n" 35 | read -p $'\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Username: \e[0m' user 36 | fi 37 | 38 | if [[ -e cookie.$user ]]; then 39 | 40 | printf "\e[1;31m[\e[0m\e[1;77m*\e[0m\e[1;31m]\e[0m\e[1;93m Cookies found for user\e[0m\e[1;77m %s\e[0m\n" $user 41 | 42 | default_use_cookie="Y" 43 | 44 | read -p $'\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Use it?\e[0m\e[1;77m [Y/n]\e[0m ' use_cookie 45 | 46 | use_cookie="${use_cookie:-${default_use_cookie}}" 47 | 48 | if [[ $use_cookie == *'Y'* || $use_cookie == *'y'* ]]; then 49 | printf "\e[1;31m[\e[0m\e[1;77m*\e[0m\e[1;31m]\e[0m\e[1;93m Using saved credentials\e[0m\n" 50 | else 51 | rm -rf cookie.$user 52 | login_user 53 | fi 54 | 55 | 56 | else 57 | 58 | read -s -p $'\e[1;31m[\e[0m\e[1;77m*\e[0m\e[1;31m]\e[0m\e[1;93m Password: \e[0m' pass 59 | printf "\n" 60 | data='{"phone_id":"'$phone'", "_csrftoken":"'$var2'", "username":"'$user'", "guid":"'$guid'", "device_id":"'$device'", "password":"'$pass'", "login_attempt_count":"0"}' 61 | 62 | IFS=$'\n' 63 | 64 | hmac=$(echo -n "$data" | openssl dgst -sha256 -hmac "${ig_sig}" | cut -d " " -f2) 65 | useragent='User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' 66 | 67 | printf "\e[1;77m[\e[0m\e[1;92m+\e[0m\e[1;77m] Trying to login as\e[0m\e[1;93m %s\e[0m\n" $user 68 | IFS=$'\n' 69 | var=$(curl -c cookie.$user -d "ig_sig_key_version=4&signed_body=$hmac.$data" -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -w "\n%{http_code}\n" -H "$header" "https://i.instagram.com/api/v1/accounts/login/" | grep -o "logged_in_user\|challenge\|many tries\|Please wait" | uniq ); 70 | if [[ $var == "challenge" ]]; then printf "\e[1;93m\n[!] Challenge required\n" ; exit 1; elif [[ $var == "logged_in_user" ]]; then printf "\e[1;92m \n[+] Login Successful\n" ; elif [[ $var == "Please wait" ]]; then echo "Please wait"; fi; 71 | 72 | fi 73 | 74 | } 75 | 76 | 77 | get_saved() { 78 | user_account=$user 79 | user_id=$(curl -L -s 'https://www.instagram.com/'$user_account'' > getid && grep -o 'profilePage_[0-9]*.' getid | cut -d "_" -f2 | tr -d '"') 80 | 81 | printf "\e[1;77m[\e[0m\e[1;92m+\e[0m\e[1;77m] Generating image list\n" 82 | curl -L -b cookie.$user -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -w "\n%{http_code}\n" -H "$header" "https://i.instagram.com/api/v1/feed/saved" > $user_account.saved_ig 83 | 84 | cp $user_account.saved_ig $user_account.saved_ig.00 85 | count=0 86 | 87 | while [[ true ]]; do 88 | big_list=$(grep -o '"more_available": true' $user_account.saved_ig) 89 | maxid=$(grep -o '"next_max_id": "[^ ]*.' $user_account.saved_ig | cut -d " " -f2 | tr -d '"' | tr -d ',') 90 | 91 | if [[ $big_list == *'"more_available": true'* ]]; then 92 | 93 | url="https://i.instagram.com/api/v1/feed/saved/?rank_token=$user_id\_$guid&max_id=$maxid" 94 | 95 | curl -L -b cookie.$user -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -H "$header" "$url" > $user_account.saved_ig 96 | 97 | cp $user_account.saved_ig $user_account.saved_ig.$count 98 | 99 | unset maxid 100 | unset url 101 | unset big_list 102 | else 103 | grep -o '{"width": [0-9]*, "height": [0-9]*, "url": "https://[^ ]*' $user_account.saved_ig* | cut -d " " -f6 | cut -d '"' -f2 | cut -d "\\" -f1 | uniq > links 104 | break 105 | 106 | fi 107 | 108 | let count+=1 109 | 110 | done 111 | 112 | 113 | if [[ ! -d $user/images ]]; then 114 | mkdir -p $user/images 115 | fi 116 | tot_img=$(wc -l links | cut -d " " -f1) 117 | count_img=0 118 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m] Total images:\e[0m\e[1;93m %s\e[0m \n" $tot_img 119 | 120 | for img in $(cat links); do 121 | 122 | let count_img++ 123 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m] Downloading image\e[0m\e[1;93m %s/%s\e[0m " $count_img $tot_img 124 | wget $img -O $user/images/image$count_img.jpg > /dev/null 2>&1 125 | printf "\e[1;92mDONE!\n\e[0m" 126 | done 127 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m] Saved:\e[0m\e[1;93m %s/images/\e[0m\n" $user 128 | 129 | cat $user_account.saved_ig.* > $user_account.raw_saved 130 | grep -o 'https://[^ ]*.mp4[^\ ]*.' $user_account.raw_saved | cut -d '"' -f1 | tr -d '\\' | uniq > vid_$user 131 | count=0 132 | tot_vid=$(wc -l vid_$user | cut -d " " -f1) 133 | if [[ ! -d $user/videos ]]; then 134 | mkdir -p $user/videos 135 | fi 136 | 137 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m] Total Videos:\e[0m\e[1;93m %s\e[0m\n" $tot_vid 138 | for link in $(cat vid_$user); do 139 | let count++ 140 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m] Downloading video\e[0m\e[1;93m %s/%s\e[0m " $count $tot_vid 141 | printf "\e[1;92mDONE!\n\e[0m" 142 | wget $link -O $user/videos/video$count.mp4 > /dev/null 2>&1 143 | done 144 | 145 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m] Saved:\e[0m\e[1;93m %s/videos/\e[0m\n" $user 146 | 147 | 148 | } 149 | 150 | 151 | get_following() { 152 | 153 | user_id=$(curl -L -s 'https://www.instagram.com/'$user_account'' > getid && grep -o 'profilePage_[0-9]*.' getid | cut -d "_" -f2 | tr -d '"') 154 | 155 | curl -L -b cookie.$user -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -w "\n%{http_code}\n" -H "$header" "https://i.instagram.com/api/v1/friendships/$user_id/following" > $user_account.following.temp 156 | 157 | 158 | cp $user_account.following.temp $user_account.following.00 159 | count=0 160 | 161 | while [[ true ]]; do 162 | big_list=$(grep -o '"big_list": true' $user_account.following.temp) 163 | maxid=$(grep -o '"next_max_id": "[^ ]*.' $user_account.following.temp | cut -d " " -f2 | tr -d '"' | tr -d ',') 164 | 165 | if [[ $big_list == *'big_list": true'* ]]; then 166 | 167 | url="https://i.instagram.com/api/v1/friendships/6971563529/following/?rank_token=$user_id\_$guid&max_id=$maxid" 168 | 169 | curl -L -b cookie.$user -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -H "$header" "$url" > $user_account.followers.temp 170 | 171 | cp $user_account.following.temp $user_account.following.$count 172 | 173 | unset maxid 174 | unset url 175 | unset big_list 176 | else 177 | grep -o 'username": "[^ ]*.' $user_account.following.* | cut -d " " -f2 | tr -d '"' | tr -d ',' | sort > $user_account.following_temp 178 | cat $user_account.following_temp | uniq > $user_account.following_backup 179 | rm -rf $user_account.following_temp 180 | 181 | tot_following=$(wc -l $user_account.following_backup | cut -d " " -f1) 182 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Total Following:\e[0m\e[1;77m %s\e[0m\n" $tot_following 183 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Saved:\e[0m\e[1;77m %s.following_backup\e[0m\n" $user_account 184 | 185 | 186 | if [[ ! -d $user_account/raw_following/ ]]; then 187 | mkdir -p $user_account/raw_following/ 188 | fi 189 | cat $user_account.following.* > $user_account/raw_following/backup.following.txt 190 | rm -rf $user_account.following.* 191 | break 192 | 193 | fi 194 | echo $count 195 | let count+=1 196 | 197 | done 198 | 199 | 200 | 201 | } 202 | 203 | total_followers() { 204 | 205 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Creating followers list for user\e[0m \e[1;77m%s\e[0m\n" $user_account 206 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Please wait...\e[0m\n" 207 | 208 | 209 | user_id=$(curl -L -s 'https://www.instagram.com/'$user_account'' > getid && grep -o 'profilePage_[0-9]*.' getid | cut -d "_" -f2 | tr -d '"') 210 | 211 | curl -L -b cookie.$user -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -w "\n%{http_code}\n" -H "$header" "https://i.instagram.com/api/v1/friendships/$user_id/followers/" > $user_account.followers.temp 212 | 213 | cp $user_account.followers.temp $user_account.followers.00 214 | count=0 215 | 216 | 217 | while [[ true ]]; do 218 | big_list=$(grep -o '"big_list": true' $user_account.followers.temp) 219 | maxid=$(grep -o '"next_max_id": "[^ ]*.' $user_account.followers.temp | cut -d " " -f2 | tr -d '"' | tr -d ',') 220 | 221 | if [[ $big_list == *'big_list": true'* ]]; then 222 | 223 | url="https://i.instagram.com/api/v1/friendships/$user_id/followers/?rank_token=$user_id\_$guid&max_id=$maxid" 224 | 225 | curl -L -b cookie.$user -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -H "$header" "$url" > $user_account.followers.temp 226 | 227 | cp $user_account.followers.temp $user_account.followers.$count 228 | 229 | unset maxid 230 | unset url 231 | unset big_list 232 | else 233 | grep -o 'username": "[^ ]*.' $user_account.followers.* | cut -d " " -f2 | tr -d '"' | tr -d ',' > $user_account.followers_backup 234 | 235 | tot_follow=$(wc -l $user_account.followers_backup | cut -d " " -f1) 236 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Total Followers:\e[0m\e[1;77m %s\e[0m\n" $tot_follow 237 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Saved:\e[0m\e[1;77m %s.followers_backup\e[0m\n" $user_account 238 | if [[ $user == $user_account ]]; then 239 | 240 | if [[ ! -d $user/raw_followers/ ]]; then 241 | mkdir -p $user/raw_followers/ 242 | fi 243 | 244 | cat $user.followers.* > $user/raw_followers/backup.followers.txt 245 | rm -rf $user.followers.* 246 | 247 | break 248 | 249 | 250 | else 251 | if [[ ! -d $user_account/raw_followers/ ]]; then 252 | mkdir -p $user_account/raw_followers/ 253 | fi 254 | 255 | cat $user_account.followers.* > $user_account/raw_followers/backup.followers.txt 256 | rm -rf $user_account.followers.* 257 | 258 | break 259 | 260 | fi 261 | 262 | fi 263 | 264 | let count+=1 265 | 266 | done 267 | 268 | } 269 | 270 | get_story() { 271 | 272 | default_user=$user 273 | 274 | read -p $'\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Account (leave it blank to use your account): \e[0m' user_account 275 | user_account="${user_account:-${default_user}}" 276 | user_id=$(curl -L -s 'https://www.instagram.com/'$user_account'' > getid && grep -o 'profilePage_[0-9]*.' getid | cut -d "_" -f2 | tr -d '"') 277 | curl -L -b cookie.$user -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -w "\n%{http_code}\n" -H "$header" "https://i.instagram.com/api/v1/feed/user/$user_id/reel_media/" > $user_account.raw_story 278 | 279 | 280 | grep -o 'https://[^ ]*.mp4[^\ ]*.' $user_account.raw_story | cut -d '"' -f1 | tr -d '\\' | uniq > $user_account.story_videos 281 | 282 | grep -o 'https://[^ ]*.jpg[^\ ]*.' $user_account.raw_story | cut -d '"' -f1 | tr -d '\\' | uniq > $user_account.story_images 283 | 284 | count=0 285 | count2=0 286 | tot_vid=$(wc -l $user_account.story_videos | cut -d " " -f1) 287 | tot_img=$(wc -l $user_account.story_images | cut -d " " -f1) 288 | if [[ ! -d $user_account/story/ ]]; then 289 | mkdir -p $user_account/story/ 290 | fi 291 | 292 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m] Total Video Stories:\e[0m\e[1;93m %s\e[0m\n" $tot_vid 293 | IFS=$'\n' 294 | 295 | #Story videos 296 | for link in $(cat $user_account.story_videos); do 297 | let count++ 298 | 299 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m] Downloading Story Video\e[0m\e[1;93m %s/%s\e[0m " $count $tot_vid 300 | printf "\e[1;92mDONE!\n\e[0m" 301 | IFS=$'\n' 302 | wget $link -O $user_account/story/story$count.mp4 > /dev/null 2>&1 303 | done 304 | 305 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m] Saved:\e[0m\e[1;93m %s/story/\e[0m\n" $user_account 306 | 307 | #Story Image 308 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m] Total Image Stories:\e[0m\e[1;93m %s\e[0m\n" $tot_img 309 | 310 | for link2 in $(cat $user_account.story_images); do 311 | let count2++ 312 | 313 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m] Downloading Story Image\e[0m\e[1;93m %s/%s\e[0m " $count2 $tot_img 314 | printf "\e[1;92mDONE!\n\e[0m" 315 | IFS=$'\n' 316 | wget $link2 -O $user_account/story/story$count2.jpg > /dev/null 2>&1 317 | done 318 | 319 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m] Saved:\e[0m\e[1;93m %s/story/\e[0m\n" $user_account 320 | 321 | 322 | 323 | } 324 | 325 | geo_media() { 326 | 327 | curl -L -b cookie -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -w "\n%{http_code}\n" -H "$header" "https://i.instagram.com/api/v1/maps/user//" 328 | 329 | } 330 | 331 | 332 | follow() { 333 | 334 | username_id=$(curl -L -s 'https://www.instagram.com/'$user'' > getid && grep -o 'profilePage_[0-9]*.' getid | cut -d "_" -f2 | tr -d '"') 335 | 336 | user_id=$(curl -L -s 'https://www.instagram.com/'$user_account'' > getid && grep -o 'profilePage_[0-9]*.' getid | cut -d "_" -f2 | tr -d '"') 337 | data='{"_uuid":"'$guid'", "_uid":"'$username_id'", "user_id":"'$user_id'", "_csrftoken":"'$var2'"}' 338 | hmac=$(echo -n "$data" | openssl dgst -sha256 -hmac "${ig_sig}" | cut -d " " -f2) 339 | curl -L -b cookie -d "ig_sig_key_version=4&signed_body=$hmac.$data" -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -w "\n%{http_code}\n" -H "$header" "https://i.instagram.com/api/v1/friendships/create/$user_id/" 340 | 341 | 342 | } 343 | 344 | 345 | unfollow() { 346 | 347 | 348 | username_id=$(curl -L -s 'https://www.instagram.com/'$user'' > getid && grep -o 'profilePage_[0-9]*.' getid | cut -d "_" -f2 | tr -d '"') 349 | 350 | user_id=$(curl -L -s 'https://www.instagram.com/'$user_account'' > getid && grep -o 'profilePage_[0-9]*.' getid | cut -d "_" -f2 | tr -d '"') 351 | 352 | data='{"_uuid":"'$guid'", "_uid":"'$username_id'", "user_id":"'$user_id'", "_csrftoken":"'$var2'"}' 353 | hmac=$(echo -n "$data" | openssl dgst -sha256 -hmac "${ig_sig}" | cut -d " " -f2) 354 | 355 | check_unfollow=$(curl -L -b cookie -d "ig_sig_key_version=4&signed_body=$hmac.$data" -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -w "\n%{http_code}\n" -H "$header" "https://i.instagram.com/api/v1/friendships/destroy/$user_id/" | grep -o '"following": false') 356 | 357 | 358 | 359 | #Защита от бана. При показе "Error" если не хотетите остановить процесс, то удалите этот код ↓↓↓ 360 | #if [[ $check_unfollow == "" ]]; then 361 | #printf "\e[1;93m [!] Error\n" 362 | #else 363 | printf "\e[1;92mOK\e[0m\n" 364 | #fi 365 | #До сюда ↑↑↑ 366 | 367 | 368 | 369 | } 370 | 371 | unfollower() { 372 | 373 | user_account=$user 374 | get_following 375 | 376 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Preparing to unfollow all followers from \e[0m\e[1;77m%s ...\e[0m\n" $user_account 377 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;31m Press \"Ctrl + c\" to stop...\e[0m\n" 378 | sleep 4 379 | while [[ true ]]; do 380 | 381 | 382 | for unfollow_name in $(cat $user_account.following_backup); do 383 | 384 | username_id=$(curl -L -s 'https://www.instagram.com/'$user'' > getmyid && grep -o 'profilePage_[0-9]*.' getmyid | cut -d "_" -f2 | tr -d '"') 385 | 386 | user_id=$(curl -L -s 'https://www.instagram.com/'$unfollow_name'' > getunfollowid && grep -o 'profilePage_[0-9]*.' getunfollowid | cut -d "_" -f2 | tr -d '"') 387 | 388 | 389 | data='{"_uuid":"'$guid'", "_uid":"'$username_id'", "user_id":"'$user_id'", "_csrftoken":"'$var2'"}' 390 | hmac=$(echo -n "$data" | openssl dgst -sha256 -hmac "${ig_sig}" | cut -d " " -f2) 391 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Trying to unfollow %s ..." $unfollow_name 392 | check_unfollow=$(curl -s -L -b cookie.$user -d "ig_sig_key_version=4&signed_body=$hmac.$data" -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -w "\n%{http_code}\n" -H "$header" "https://i.instagram.com/api/v1/friendships/destroy/$user_id/" | grep -o '"following": false' ) 393 | 394 | 395 | 396 | 397 | #Защита от бана. При показе "Error, stoping to prevent blocking" если не хотите оставить процесс, то удалите этот код ↓↓↓ 398 | if [[ $check_unfollow == "" ]]; then 399 | printf "\n\e[1;93m [!] Error, stoping to prevent blocking\e[0m\n" 400 | exit 1 401 | else 402 | printf "\e[1;92mOK\e[0m\n" 403 | fi 404 | #До сюда ↑↑↑ 405 | 406 | 407 | 408 | 409 | sleep 3 410 | done 411 | 412 | 413 | done 414 | 415 | } 416 | 417 | increase_followers() { 418 | 419 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m] This technique consists of following/unfolling celebgrams\e[0m\n" 420 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m] It can increase your followers up to about +30 in 1 hour \e[0m\n" 421 | printf "\e[1;77m[\e[0m\e[1;31m+\e[0m\e[1;77m]\e[0m\e[1;93m Press Ctrl + C to stop \e[0m\n" 422 | sleep 5 423 | 424 | username_id=$(curl -L -s 'https://www.instagram.com/'$user'' > getid && grep -o 'profilePage_[0-9]*.' getid | cut -d "_" -f2 | tr -d '"') 425 | 426 | selena="460563723" 427 | neymar="26669533" 428 | ariana="7719696" 429 | beyonce="247944034" 430 | cristiano="173560420" 431 | kimkardashian="18428658" 432 | kendall="6380930" 433 | therock="232192182" 434 | kylie="12281817" 435 | jelopez="305701719" 436 | messi="427553890" 437 | 438 | dualipa="12331195" 439 | mileycyrus="325734299" 440 | shawnmendes="212742998" 441 | katyperry="407964088" 442 | charlieputh="7555881" 443 | lelepons="177402262" 444 | camila_cabello="19596899" 445 | madonna="181306552" 446 | leonardodicaprio="1506607755" 447 | ladygaga="184692323" 448 | taylorswift="11830955" 449 | instagram="25025320" 450 | 451 | 452 | if [[ ! -e celeb_id ]]; then 453 | printf "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n" $dualipa $mileycyrus $shawnmendes $katyperry $charlieputh $lelepons $camila_cabello $madonna $leonardodicaprio $ladygaga $taylorswift $instagram $neymar $selena $ariana $beyonce $cristiano $kimkardashian $kendall $therock $kylie $jelopez $messi > celeb_id 454 | fi 455 | 456 | while [[ true ]]; do 457 | 458 | 459 | for celeb in $(cat celeb_id); do 460 | 461 | data='{"_uuid":"'$guid'", "_uid":"'$username_id'", "user_id":"'$celeb'", "_csrftoken":"'$var2'"}' 462 | hmac=$(echo -n "$data" | openssl dgst -sha256 -hmac "${ig_sig}" | cut -d " " -f2) 463 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Trying to follow celebgram %s ..." $celeb 464 | 465 | check_follow=$(curl -s -L -b cookie.$user -d "ig_sig_key_version=4&signed_body=$hmac.$data" -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -w "\n%{http_code}\n" -H "$header" "https://i.instagram.com/api/v1/friendships/create/$celeb/" | grep -o '"following": true') 466 | 467 | 468 | 469 | 470 | #Защита от бана. При показе "Error" если не хотетите остановить процесс, то удалите этот код ↓↓↓ 471 | #if [[ $check_follow == "" ]]; then 472 | #printf "\n\e[1;93m [!] Error\n" 473 | #exit 1 474 | #else 475 | printf "\e[1;92mOK\e[0m\n" 476 | #fi 477 | #До сюда ↑↑↑↑ 478 | 479 | 480 | sleep 3 481 | 482 | done 483 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;77m Sleeping 60 secs...\e[0m\n" 484 | sleep 60 485 | #unfollow 486 | for celeb in $(cat celeb_id); do 487 | data='{"_uuid":"'$guid'", "_uid":"'$username_id'", "user_id":"'$celeb'", "_csrftoken":"'$var2'"}' 488 | hmac=$(echo -n "$data" | openssl dgst -sha256 -hmac "${ig_sig}" | cut -d " " -f2) 489 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Trying to unfollow celebgram %s ..." $celeb 490 | check_unfollow=$(curl -s -L -b cookie.$user -d "ig_sig_key_version=4&signed_body=$hmac.$data" -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -w "\n%{http_code}\n" -H "$header" "https://i.instagram.com/api/v1/friendships/destroy/$celeb/" | grep -o '"following": false' ) 491 | 492 | 493 | 494 | 495 | #Защита от бана. При показе "Error, stoping to prevent blocking" если не хотите оставить процесс, то удалите этот код ↓↓↓ 496 | if [[ $check_unfollow == "" ]]; then 497 | printf "\n\e[1;93m [!] Error, stoping to prevent blocking\n" 498 | exit 1 499 | else 500 | printf "\e[1;92mOK\e[0m\n" 501 | fi 502 | #До сюда ↑↑↑ 503 | 504 | 505 | 506 | 507 | sleep 3 508 | done 509 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;77m Sleeping 60 secs...\e[0m\n" 510 | sleep 60 511 | 512 | 513 | done 514 | 515 | 516 | } 517 | 518 | 519 | friendship() { 520 | 521 | 522 | data='{"_uuid":"'$guid'", "_uid":"'$username_id'", "user_id":"'$user_id'", "_csrftoken":"'$var2'"}' 523 | hmac=$(echo -n "$data" | openssl dgst -sha256 -hmac "${ig_sig}" | cut -d " " -f2) 524 | curl -L -b cookie.$user -d "ig_sig_key_version=4&signed_body=$hmac.$data" -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -w "\n%{http_code}\n" -H "$header" "https://i.instagram.com/api/v1/friendships/show/$user_id/" 525 | 526 | } 527 | 528 | 529 | 530 | track_unfollowers() { 531 | 532 | default_user=$user 533 | 534 | 535 | read -p $'\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Account (leave it blank to use your account): \e[0m' user_account 536 | 537 | user_account="${user_account:-${default_user}}" 538 | 539 | if [[ -e followers1.$user_account ]]; then 540 | 541 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Last list found for user \e[0m\e[1;77m%s\e[0m\e[1;93m, creating a new and comparing it\e[0m\n" $user_account 542 | total_followers 543 | 544 | cp $user_account.followers_backup followers2.$user_account 545 | unfollowers=$(grep -Fxv -f followers2.$user_account followers1.$user_account) 546 | 547 | 548 | if [[ $unfollowers != "" ]]; then 549 | 550 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Unfollowers:\e[0m\n" 551 | 552 | grep -Fxv -f followers2.$user_account followers1.$user_account >> $user_account.unfollowers 553 | printf "\e[1;77m\n" 554 | cat $user_account.unfollowers 555 | printf "\e[0m\n" 556 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Saved: \e[0m\e[1;77m%s.unfollowers\e[0m\n" $user_account 557 | mv followers2.$user_account followers1.$user_account 558 | 559 | else 560 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m No Unfollower\e[0m\n" 561 | fi 562 | 563 | 564 | else 565 | #get followers 566 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Creating followers list\e[0m\n" 567 | total_followers 568 | cp $user_account.followers_backup followers1.$user_account 569 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Saved!\e[0m\e[1;77m (followers1.%s)\e[0m\n" $user_account 570 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Please, run again to track unfollowers\e[0m\n" 571 | 572 | fi 573 | 574 | 575 | 576 | } 577 | 578 | 579 | get_info() { 580 | 581 | default_user=$user 582 | 583 | read -p $'\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Account (leave it blank to use your account): \e[0m' user_account 584 | 585 | user_account="${user_account:-${default_user}}" 586 | 587 | if [[ ! -d $user_account/ ]]; then 588 | mkdir $user_account 589 | fi 590 | 591 | 592 | username_id=$(curl -L -s 'https://www.instagram.com/'$user'' > getid && grep -o 'profilePage_[0-9]*.' getid | cut -d "_" -f2 | tr -d '"') 593 | 594 | user_id=$(curl -L -s 'https://www.instagram.com/'$user_account'' > getid && grep -o 'profilePage_[0-9]*.' getid | cut -d "_" -f2 | tr -d '"') 595 | 596 | data='{"_uuid":"'$guid'", "_uid":"'$username_id'", "_csrftoken":"'$var2'"}' 597 | hmac=$(echo -n "$data" | openssl dgst -sha256 -hmac "${ig_sig}" | cut -d " " -f2) 598 | curl -L -b cookie.$user -d "ig_sig_key_version=4&signed_body=$hmac.$data" -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -w "\n%{http_code}\n" -H "$header" "https://i.instagram.com/api/v1/users/$user_id/info" > $user_account/profile.info 599 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;77m %s\e[0m\e[1;93m account info:\e[0m\n" $user_account 600 | cat $user_account/profile.info 601 | grep -o 'https://[^ ]*.jpg[^\ ]*.' $user_account/profile.info | cut -d '"' -f1 | tr -d '\\' | uniq > $user_account/profile_pic 602 | 603 | 604 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Downloading Profile Pictures...\e[0m" 605 | count=0 606 | for pic in $(cat $user_account/profile_pic); do 607 | 608 | wget -O $user_account/profile_pic$count.jpg $pic > /dev/null 2>&1 609 | let count++ 610 | done 611 | printf "\e[1;92mDONE\e[0m\n" 612 | printf "\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Saved:\e[0m\e[1;77m %s/\e[0m\n" $user_account 613 | 614 | } 615 | 616 | menu() { 617 | 618 | printf "\n" 619 | printf " \e[1;31m[\e[0m\e[1;77m01\e[0m\e[1;31m]\e[0m\e[1;93m Unfollow Tracker\e[0m\n" 620 | printf " \e[1;31m[\e[0m\e[1;77m02\e[0m\e[1;31m]\e[0m\e[1;93m Increase Followers\e[0m\n" 621 | printf " \e[1;31m[\e[0m\e[1;77m03\e[0m\e[1;31m]\e[0m\e[1;93m Download Stories\e[0m\n" 622 | printf " \e[1;31m[\e[0m\e[1;77m04\e[0m\e[1;31m]\e[0m\e[1;93m Download Saved Content\e[0m\n" 623 | printf " \e[1;31m[\e[0m\e[1;77m05\e[0m\e[1;31m]\e[0m\e[1;93m Download Following List\e[0m\n" 624 | printf " \e[1;31m[\e[0m\e[1;77m06\e[0m\e[1;31m]\e[0m\e[1;93m Download Followers List\e[0m\n" 625 | printf " \e[1;31m[\e[0m\e[1;77m07\e[0m\e[1;31m]\e[0m\e[1;93m Download Profile Info\e[0m\n" 626 | printf " \e[1;31m[\e[0m\e[1;77m08\e[0m\e[1;31m]\e[0m\e[1;93m Activate Unfollower\e[0m\n" 627 | printf "\n" 628 | 629 | 630 | read -p $' \e[1;31m[\e[0m\e[1;77m::\e[0m\e[1;31m]\e[0m\e[1;77m Choose an option: \e[0m' option 631 | 632 | if [[ $option -eq 1 ]]; then 633 | login_user 634 | track_unfollowers 635 | 636 | elif [[ $option -eq 2 ]]; then 637 | login_user 638 | increase_followers 639 | 640 | elif [[ $option -eq 3 ]]; then 641 | login_user 642 | get_story 643 | elif [[ $option -eq 4 ]]; then 644 | login_user 645 | get_saved 646 | elif [[ $option -eq 5 ]]; then 647 | login_user 648 | default_user=$user 649 | 650 | 651 | read -p $'\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Account (leave it blank to use your account): \e[0m' user_account 652 | 653 | user_account="${user_account:-${default_user}}" 654 | get_following 655 | elif [[ $option -eq 6 ]]; then 656 | 657 | login_user 658 | default_user=$user 659 | 660 | 661 | read -p $'\e[1;31m[\e[0m\e[1;77m+\e[0m\e[1;31m]\e[0m\e[1;93m Account (leave it blank to use your account): \e[0m' user_account 662 | 663 | user_account="${user_account:-${default_user}}" 664 | total_followers 665 | 666 | 667 | elif [[ $option -eq 7 ]]; then 668 | login_user 669 | get_info 670 | 671 | elif [[ $option -eq 8 ]]; then 672 | 673 | login_user 674 | unfollower 675 | 676 | else 677 | 678 | printf "\e[1;93m[!] Invalid Option!\e[0m\n" 679 | sleep 2 680 | menu 681 | 682 | fi 683 | } 684 | 685 | 686 | banner 687 | menu -------------------------------------------------------------------------------- /Instagram-bot/README.md: -------------------------------------------------------------------------------- 1 | Eng ----------------> 2 | ###Instagram-bot 3 | #Version: 2.7.3 4 | #telegram: FELIX4 - developer 5 | #Instagram-bot: Track unsubscribe, increase the number of subscribers, download history. 6 | 7 | 8 | ### Function 9 | #1 - Unfollow Tracker 10 | #2 - Increase Followers 11 | #3 - Download: Stories, Saved Content, Following List / Followers List, Profile Info 12 | #8 - Activate Unfollower (from all of us) 13 | 14 | [!] Please adhere to the rules of the bot - do not try to deceive the protection of the bot (you can), but after that you will face a ban on Instagram. That is, the bot writes you “Error, stop to prevent blocking”, “Error”, then I ask you to close the program and not try to repeat the transfer, otherwise you will end up in a block. 15 | 16 | Protection new: 07.26.2020 17 | According to the new rules and Instagram restrictions. 18 | 19 | Instagram restrictions: 20 | Likes: No more than 20 per hour (time 300-500, break 24 hours); 21 | Subscription: No more than 20 per hour (per day - 300-500, a break of 24 hours); 22 | Unsubscribe: Interval of 40-60 seconds and no more than 1000 per day from non-reciprocal and 1000 from mutual (pause between non-reciprocal and mutual 15 hours); 23 | 24 | Please stick to them. 25 | 26 | 27 | 28 | 29 | RU --------------------> 30 | ###Инстаграм-бот 31 | #Версия: 2.7.3 32 | #Телеграм: FELIX4 - разработчик 33 | #Инстаграм-бот: Отслеживайте отписку, увеличивайте количество подписчиков, загружайте историю. 34 | 35 | 36 | ### Функции 37 | #1 - Трекер Отписок 38 | #2 - Накрутка подписчиков 39 | #3 - Скачать: Истории, Сохраненный контент, Лист подписок / Лист подписчиков, Информация о профиле 40 | #8 - Активитровать отписку (от всех) 41 | 42 | [!] Пожалуйста, придерживаетесь правилами бота - Не пытаться обмануть защиту бот (вы это сможете), но после этого вам грозит бан в инстаграме. Тоесть бот вам пишет "Error, stoping to prevent blocking", "Error" то прошу вас закрыть программу и не пытаться повторить накрутку иначе вы попадёте в блок. 43 | 44 | Защита новая: 07.26.2020 45 | По новым правилам и ограничениям инстаграма. 46 | 47 | 48 | Ограничения инстаграмма: 49 | Лайки: Не более 20 в час (за раз 300-500, перерыв 24 часа); 50 | Подписки: Не более 20 в час (за сутки – 300-500, перерыв 24 часа); 51 | Отписка: Интервал 40-60 секунд и не более 1000 в сутки от НЕвзаимных и 1000 от взаимных (пауза между невзаимными и взаимными 15 часов); 52 | 53 | Пожалуйста, придерживайтесь их. 54 | 55 | --------------------------------------------------------------------------------