├── package.json
├── LICENSE
├── README.md
├── botlike2.js
├── unfollall.js
├── botlike.js
├── dellallphoto.js
├── unfollnotfollback.js
├── flaauto.js
├── fah.js
├── flmauto.js
└── fftauto.js
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "instagram",
3 | "version": "1.0.0",
4 | "description": "Instagram Unfollow Not FollowBack",
5 | "main": "index.js",
6 | "dependencies": {
7 | "chalk": "^2.3.0",
8 | "delay": "^2.0.0",
9 | "inquirer": "^4.0.1",
10 | "instagram-private-api": "^0.6.7",
11 | "request": "^2.83.0",
12 | "request-promise": "^4.2.2",
13 | "string": "^3.3.3"
14 | },
15 | "author": "CCOCOT"
16 | }
17 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 TeamSyntaxRevolution
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # How to install (DEFAULT or BASIC USAGE)
2 | * git clone https://github.com/teamsyntaxid/tools-ig.git
3 | * cd ig-syntax
4 | * unzip node_modules.zip
5 | * node namefile.js
6 |
7 |
8 | # For PC/Laptop ONLY:
9 | * Download GIT for Windows (https://git-scm.com/download/) *Choose WIN & 32bit/64bit
10 | * Download NodeJS (https://nodejs.org/en/download/) *Choose .msi & 32bit/64bit
11 | * INSTALL GIT for Windows & NodeJS
12 | * Download File ig-syntax on Github (https://github.com/teamsyntaxid/tools-ig.git)
13 | * Extract File ig-syntax and enter the folder
14 | * Right Click on Mouse, Then Select "Git Bash Here" (Make sure you are in the ig-syntax folder!!!)
15 | * Then type: unzip node_modules.zip
16 | * To View The Contents Of a folder in bash, type: "ls" (without "")
17 | * To Run The Program in bash, type: "node namefile.js" or "node namefile" (without "")
18 |
19 |
20 | # For TERMUX ONLY:
21 | * Install Termux (PlayStore)
22 | * Open Termux and Wait for Automatic Install of Termux.
23 | * pkg install git
24 | * pkg install nodejs
25 | * git clone https://github.com/teamsyntaxid/tools-ig.git
26 | * cd tools-ig
27 | * unzip node_modules.zip
28 | * node namefile.js
29 |
30 |
31 | # INFORMATION:
32 | * dellallphoto "MASS DELETE PHOTO/POST IG" (WORK & TESTED)
33 | * fah "SELECTED WITH HASTAG IG" (WORK & TESTED)
34 | * fftauto "SELECTED WITH TARGET IG" (WORK & TESTED)
35 | * flaauto "SELECTED WITH LOCATION IG" (WORK & TESTED)
36 | * flmauto "SELECTED WITH MEDIA IG" (WORK & TESTED)
37 | * unfollall "UNFOLOW ALL FOLLOWING IG" (WORK & TESTED)
38 | * unfollnotfollback "UNFOLLOW NOT FOLLOWBACK IG" (WORK & TESTED)
39 | * botlike "LIKE/LOVE TIMELINE IG" (WORK & TESTED)
40 | * botlike2 "LIKE/LOVE TIMELINE IG" (WORK & TESTED)
41 |
42 |
43 | # WARNING
44 | "Use tools at your own risk!!!"
45 | "Use this Tool for personal use, not for sale!!!"
46 | "Make sure your account is not in private to use this tool!!!"
47 |
48 |
49 | # UPDATE
50 | 1. Fix Error No Detect Followers Target
51 | 2. + Added Target from 5 to 10/DELAY
52 | 3. + Improvements In Display Program
53 |
54 |
55 | # SPECIAL THANKS TO:
56 | * Code by Ccocot (ccocot@bc0de.net)
57 | * Fixing and Testing by Putu Syntax
58 | * SGB TEAM REBORN
59 | * BC0DE.NET | NAONLAH.NET - WingKocoli
60 |
--------------------------------------------------------------------------------
/botlike2.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | const Client = require('instagram-private-api').V1;
4 | const delay = require('delay');
5 | const chalk = require('chalk');
6 | const inquirer = require('inquirer');
7 |
8 | const User = [
9 | {
10 | type:'input',
11 | name:'username',
12 | message:'[>] Insert Username:',
13 | validate: function(value){
14 | if(!value) return 'Can\'t Empty';
15 | return true;
16 | }
17 | },
18 | {
19 | type:'password',
20 | name:'password',
21 | message:'[>] Insert Password:',
22 | mask:'*',
23 | validate: function(value){
24 | if(!value) return 'Can\'t Empty';
25 | return true;
26 | }
27 | }
28 | ]
29 |
30 | const Login = async function(User){
31 |
32 | /** Save Account **/
33 | const Device = new Client.Device(User.username);
34 | const Storage = new Client.CookieMemoryStorage();
35 | const session = new Client.Session(Device, Storage);
36 |
37 | try {
38 | await Client.Session.create(Device, Storage, User.username, User.password)
39 | const account = await session.getAccount();
40 | return Promise.resolve({session,account});
41 | } catch (err) {
42 | return Promise.reject(err);
43 | }
44 |
45 | }
46 |
47 | const Timeline = async function(session,count,cursor){
48 | var getCursor;
49 | count++;
50 | /** New Feed **/
51 | const feed = new Client.Feed.Timeline(session);
52 |
53 | /** Cursor Detect **/
54 | if (cursor) {
55 | feed.setCursor(cursor);
56 | }
57 |
58 | try {
59 | const media = await feed.get();
60 | console.log('\n[+] Cursor => %s\n', count);
61 | await Promise.all(media.map(async(media) => {
62 | Like(session,media);
63 | }));
64 | if (count < 3) {
65 | getCursor = await feed.getCursor();
66 | await Timeline(session,count,getCursor);
67 | } else {
68 | console.log('\n[-] Repeat from scratch (Delay 60s)\n');
69 | await delay(60000);
70 | count=0;
71 | await Timeline(session,count);
72 | }
73 | } catch(err) {
74 | return Promise.reject(err);
75 | }
76 |
77 | }
78 |
79 | const Like = async function(session,media){
80 |
81 | try {
82 | if (media.params.hasLiked === false){
83 | const Like = await Client.Like.create(session, media.params.id);
84 | console.log(chalk`[{bold.cyan ${media.id}}] Username : ${media.params.user.username} => {bold.green Liked}`);
85 | } else {
86 | console.log(chalk`[{bold.cyan ${media.id}}] Username : ${media.params.user.username} => {bold.red Already Liked}`);
87 | }
88 | } catch (err) {
89 | return Promise.reject(err);
90 | }
91 |
92 | }
93 |
94 | const Excute = async function(User){
95 | try {
96 | const count = 0;
97 | const doLogin = await Login(User);
98 | await Timeline(doLogin.session,count);
99 | } catch (err) {
100 | console.log(err);
101 | }
102 | }
103 | console.log(chalk`
104 | {bold.cyan
105 | —————————————————— [INFORMATION] ————————————————————
106 |
107 | [?] {bold.green BOTLIKEv2 | Like/Love TL IG *AUTO!}
108 |
109 | —————————————————— [THANKS TO] ————————————————————
110 | [✓] CODE BY CYBER SCREAMER CCOCOT (ccocot@bc0de.net)
111 | [✓] FIXING & TESTING BY SYNTAX (@teamsyntaxid)
112 | [✓] CCOCOT.CO | BC0DE.NET | NAONLAH.NET | WingkoColi
113 | [✓] SGB TEAM REBORN | Zerobyte.id | ccocot@bc0de.net
114 | —————————————————————————————————————————————————————}
115 | `);
116 |
117 | inquirer.prompt(User)
118 | .then(answers => {
119 | Excute({
120 | username:answers.username,
121 | password:answers.password
122 | });
123 | })
124 |
--------------------------------------------------------------------------------
/unfollall.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | const Client = require('instagram-private-api').V1;
4 | const delay = require('delay');
5 | const chalk = require('chalk');
6 | const _ = require('lodash');
7 | const inquirer = require('inquirer');
8 |
9 | const User = [
10 | {
11 | type:'input',
12 | name:'username',
13 | message:'[>] Insert Username:',
14 | validate: function(value){
15 | if(!value) return 'Can\'t Empty';
16 | return true;
17 | }
18 | },
19 | {
20 | type:'password',
21 | name:'password',
22 | message:'[>] Insert Password:',
23 | mask:'*',
24 | validate: function(value){
25 | if(!value) return 'Can\'t Empty';
26 | return true;
27 | }
28 | },
29 | {
30 | type:'input',
31 | name:'sleep',
32 | message:'[>] Insert Sleep (MiliSeconds):',
33 | validate: function(value){
34 | value = value.match(/[0-9]/);
35 | if (value) return true;
36 | return 'Delay is number';
37 | }
38 | }
39 | ]
40 |
41 | const Login = async function(User){
42 |
43 | const Device = new Client.Device(User.username);
44 | const Storage = new Client.CookieMemoryStorage();
45 | const session = new Client.Session(Device, Storage);
46 |
47 | try {
48 | await Client.Session.create(Device, Storage, User.username, User.password)
49 | const account = await session.getAccount();
50 | return Promise.resolve({session,account});
51 | } catch (err) {
52 | return Promise.reject(err);
53 | }
54 |
55 | }
56 |
57 | const Unfollow = async function(session, accountId){
58 | try {
59 | await Client.Relationship.destroy(session, accountId);
60 | return chalk`{bold.green SUKSES}`;
61 | } catch (err){
62 | return chalk`{bold.red GAGAL}`;
63 | }
64 | }
65 |
66 | const Excute = async function(User,sleep){
67 |
68 | try {
69 | console.log(chalk`{yellow [?] Try to Login . . .}`);
70 | const doLogin = await Login(User);
71 | console.log(chalk`{green [!] Login Succsess, }{yellow [?] Try to Unfollow All Following . . .}`)
72 | const feed = new Client.Feed.AccountFollowing(doLogin.session, doLogin.account.id);
73 | var cursor;
74 | do{
75 | if (cursor) feed.setCursor(cursor);
76 | var getPollowers = await feed.get();
77 | getPollowers = _.chunk(getPollowers, 10);
78 | for (let i = 0; i < getPollowers.length; i++) {
79 | var timeNow = new Date();
80 | timeNow = `${timeNow.getHours()}:${timeNow.getMinutes()}:${timeNow.getSeconds()}`
81 | await Promise.all(getPollowers[i].map(async(account) => {
82 | const doUnfollow = await Unfollow(doLogin.session, account.id);
83 | console.log(chalk`[{magenta ${timeNow}}] Unfollow {yellow @${account.params.username}} => ${doUnfollow}`);
84 | }));
85 | console.log(chalk`{yellow \n [#][>] Delay For ${sleep} MiliSeconds [<][#] \n}`);
86 | await delay(sleep);
87 | }
88 | cursor = await feed.getCursor();
89 | } while(feed.isMoreAvailable())
90 | console.log(chalk`{bold.green [+] Unfollow All Succsess}`)
91 | } catch(e) {
92 | console.log(e)
93 | }
94 | }
95 |
96 | console.log(chalk`
97 | {bold.cyan
98 | —————————————————— [INFORMATION] ————————————————————
99 |
100 | [?] {bold.green UNFALL | Unfollow All Following IG!}
101 |
102 | —————————————————— [THANKS TO] ————————————————————
103 | [✓] CODE BY CYBER SCREAMER CCOCOT (ccocot@bc0de.net)
104 | [✓] FIXING & TESTING BY SYNTAX (@officialputu_id)
105 | [✓] CCOCOT.CO | BC0DE.NET | NAONLAH.NET | WingkoColi
106 | [✓] SGB TEAM REBORN | Zerobyte.id | ccocot@bc0de.net
107 | —————————————————————————————————————————————————————}
108 | `);
109 |
110 | inquirer.prompt(User)
111 | .then(answers => {
112 | Excute({
113 | username:answers.username,
114 | password:answers.password
115 | },answers.sleep);
116 | })
117 |
--------------------------------------------------------------------------------
/botlike.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | /** BOT LIKE **/
4 | /** CODE BY CCOCOT | CCOCOT.CO **/
5 | /** ccocot@bc0de.net **/
6 | /** BC0DE.NET - NAONLAH.NET - WingKocoli **/
7 | /** NOTE : RUN WITH PM2 **/
8 |
9 | const Client = require('instagram-private-api').V1;
10 | const delay = require('delay');
11 | const chalk = require('chalk');
12 | const _ = require('lodash');
13 | const inquirer = require('inquirer');
14 |
15 | const User = [
16 | {
17 | type:'input',
18 | name:'username',
19 | message:'[>] Insert Username:',
20 | validate: function(value){
21 | if(!value) return 'Can\'t Empty';
22 | return true;
23 | }
24 | },
25 | {
26 | type:'password',
27 | name:'password',
28 | message:'[>] Insert Password:',
29 | mask:'*',
30 | validate: function(value){
31 | if(!value) return 'Can\'t Empty';
32 | return true;
33 | }
34 | },
35 | {
36 | type:'input',
37 | name:'sleep',
38 | message:'[>] Insert Sleep (MiliSeconds):',
39 | validate: function(value){
40 | value = value.match(/[0-9]/);
41 | if (value) return true;
42 | return 'Delay is number';
43 | }
44 | }
45 | ]
46 |
47 | const Login = async function(User){
48 |
49 | /** Save Account **/
50 | const Device = new Client.Device(User.username);
51 | const Storage = new Client.CookieMemoryStorage();
52 | const session = new Client.Session(Device, Storage);
53 |
54 | try {
55 | await Client.Session.create(Device, Storage, User.username, User.password)
56 | const account = await session.getAccount();
57 | return Promise.resolve({session,account});
58 | } catch (err) {
59 | return Promise.reject(err);
60 | }
61 |
62 | }
63 |
64 | const Like = async function(session,media){
65 | try {
66 | if (media.params.hasLiked) {
67 | return chalk`{bold.blue Already Liked}`;
68 | }
69 | await Client.Like.create(session, media.id);
70 | return chalk`{bold.green Liked}`;
71 | } catch (err) {
72 | return chalk`{bold.red Failed}`;
73 | }
74 | }
75 |
76 | const Excute = async function(User, sleep){
77 | try {
78 | console.log(chalk`\n{yellow [?] Try to Login . . .}`);
79 | const doLogin = await Login(User);
80 | console.log(chalk`{green [!] Login Succsess}, {yellow [?] Try Like All Media in Feed / Timeline . . .\n}`);
81 | const feed = new Client.Feed.Timeline(doLogin.session);
82 | var cursor;
83 | do {
84 | if (cursor) feed.setCursor(cursor);
85 | var media = await feed.get();
86 | media = _.chunk(media, 10);
87 | for (var i = 0; i < media.length; i++) {
88 | await Promise.all(media[i].map(async (media) => {
89 | const doLike = await Like(doLogin.session, media);
90 | console.log(chalk`[{bold.green U}] ${media.params.user.username} [{cyan ${media.id}}] => ${doLike}`);
91 | }))
92 | await console.log(chalk`{yellow \n [#][>] Delay For ${sleep} MiliSeconds [<][#] \n}`);
93 | await delay(sleep);
94 | }
95 | } while(feed.isMoreAvailable());
96 | } catch (err) {
97 | console.log(err);
98 | }
99 | }
100 |
101 | console.log(chalk`
102 | {bold.cyan
103 | —————————————————— [INFORMATION] ————————————————————
104 |
105 | [?] {bold.green BOTLIKEv1 | Like/Love TL IG *SET SLEEP!}
106 |
107 | —————————————————— [THANKS TO] ————————————————————
108 | [✓] CODE BY CYBER SCREAMER CCOCOT (ccocot@bc0de.net)
109 | [✓] FIXING & TESTING BY SYNTAX (@teamsyntaxid)
110 | [✓] CCOCOT.CO | BC0DE.NET | NAONLAH.NET | WingkoColi
111 | [✓] SGB TEAM REBORN | Zerobyte.id | ccocot@bc0de.net
112 | —————————————————————————————————————————————————————}
113 | `);
114 |
115 | inquirer.prompt(User)
116 | .then(answers => {
117 | Excute({
118 | username:answers.username,
119 | password:answers.password
120 | },answers.sleep);
121 | })
122 |
--------------------------------------------------------------------------------
/dellallphoto.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | const Client = require('instagram-private-api').V1;
4 | const delay = require('delay');
5 | const chalk = require('chalk');
6 | const _ = require('lodash');
7 | const inquirer = require('inquirer');
8 |
9 | const User = [
10 | {
11 | type:'input',
12 | name:'username',
13 | message:'[>] Insert Username:',
14 | validate: function(value){
15 | if(!value) return 'Can\'t Empty';
16 | return true;
17 | }
18 | },
19 | {
20 | type:'password',
21 | name:'password',
22 | message:'[>] Insert Password:',
23 | mask:'*',
24 | validate: function(value){
25 | if(!value) return 'Can\'t Empty';
26 | return true;
27 | }
28 | },
29 | {
30 | type:'input',
31 | name:'sleep',
32 | message:'[>] Insert Sleep (MiliSeconds):',
33 | validate: function(value){
34 | value = value.match(/[0-9]/);
35 | if (value) return true;
36 | return 'Delay is number';
37 | }
38 | }
39 | ]
40 |
41 | const Login = async function(User){
42 |
43 | const Device = new Client.Device(User.username);
44 | const Storage = new Client.CookieMemoryStorage();
45 | const session = new Client.Session(Device, Storage);
46 |
47 | try {
48 | await Client.Session.create(Device, Storage, User.username, User.password)
49 | const account = await session.getAccount();
50 | return Promise.resolve({session,account});
51 | } catch (err) {
52 | return Promise.reject(err);
53 | }
54 |
55 | }
56 |
57 | const Media = async function(session, id){
58 | const Media = new Client.Feed.UserMedia(session, id);
59 |
60 | try {
61 | const Poto = [];
62 | var cursor;
63 | do {
64 | if (cursor) Media.setCursor(cursor);
65 | const getPoto = await Media.get();
66 | await Promise.all(getPoto.map(async(poto) => {
67 | Poto.push({
68 | id:poto.id,
69 | link:poto.params.webLink
70 | });
71 | }))
72 | cursor = await Media.getCursor()
73 | } while (Media.isMoreAvailable());
74 | return Promise.resolve(Poto);
75 | } catch (err){
76 | return Promise.reject(err);
77 | }
78 | }
79 |
80 | const Delete = async function(session, id){
81 | try {
82 | await Client.Media.delete(session,id);
83 | return true;
84 | } catch (err) {
85 | return false;
86 | }
87 | }
88 |
89 |
90 | const Excute = async function(User,sleep){
91 | try {
92 |
93 | /** TRY TO LOGIN **/
94 | console.log('\n [?] Try to Login . . .');
95 | const doLogin = await Login(User);
96 | console.log(chalk`{bold.green [!] Login Succsess!}`);
97 |
98 | /** TRY TO GET ALL MEDIA **/
99 | console.log('[?] Try to get Media . . .')
100 | var getMedia = await Media(doLogin.session, doLogin.account.id);
101 | console.log(chalk`{bold.green [!] Succsess to get Media. Media Length : ${getMedia.length}}\n`);
102 | getMedia = _.chunk(getMedia, 10);
103 |
104 | /** TRY TO DELETE ALL MEDIA **/
105 | for (let i = 0; i < getMedia.length; i++) {
106 | console.log('[?] Try to Delete 10 Photo/Delay \n')
107 | await Promise.all(getMedia[i].map(async(media) => {
108 | const doDelete = await Delete(doLogin.session, media.id);
109 | const PrintOut = chalk`> ${media.link} => ${doDelete ? chalk`{bold.green Sukses}` : chalk`{bold.red Gagal}`}`
110 | console.log(PrintOut);
111 | }))
112 | console.log(chalk`{yellow \n [#][>] Delay For ${sleep} MiliSeconds [<][#] \n}`)
113 | await delay(sleep)
114 | }
115 |
116 | } catch (err) {
117 | console.log(err);
118 | }
119 | }
120 | console.log(chalk`
121 | {bold.cyan
122 | —————————————————— [INFORMATION] ————————————————————
123 |
124 | [?] {bold.green MASS DELETE ALL PHOTO IG *SET SLEEP!}
125 |
126 | —————————————————— [THANKS TO] ————————————————————
127 | [✓] CODE BY CYBER SCREAMER CCOCOT (ccocot@bc0de.net)
128 | [✓] FIXING & TESTING BY SYNTAX (@teamsyntaxid)
129 | [✓] CCOCOT.CO | BC0DE.NET | NAONLAH.NET | WingkoColi
130 | [✓] SGB TEAM REBORN | Zerobyte.id | ccocot@bc0de.net
131 | —————————————————————————————————————————————————————}
132 | `);
133 |
134 | inquirer.prompt(User)
135 | .then(answers => {
136 | Excute({
137 | username:answers.username,
138 | password:answers.password
139 | },answers.sleep);
140 | })
--------------------------------------------------------------------------------
/unfollnotfollback.js:
--------------------------------------------------------------------------------
1 | const Client = require('instagram-private-api').V1;
2 | const delay = require('delay');
3 | const chalk = require('chalk');
4 | const _ = require('lodash');
5 | const rp = require('request-promise');
6 | const inquirer = require('inquirer');
7 |
8 | const User = [
9 | {
10 | type:'input',
11 | name:'username',
12 | message:'[>] Insert Username:',
13 | validate: function(value){
14 | if(!value) return 'Can\'t Empty';
15 | return true;
16 | }
17 | },
18 | {
19 | type:'password',
20 | name:'password',
21 | message:'[>] Insert Password:',
22 | mask:'*',
23 | validate: function(value){
24 | if(!value) return 'Can\'t Empty';
25 | return true;
26 | }
27 | },
28 | {
29 | type:'input',
30 | name:'sleep',
31 | message:'[>] Insert Sleep (MiliSeconds):',
32 | validate: function(value){
33 | value = value.match(/[0-9]/);
34 | if (value) return true;
35 | return 'Delay is number';
36 | }
37 | }
38 | ]
39 |
40 | const Login = async function(User){
41 |
42 | const Device = new Client.Device(User.username);
43 | const Storage = new Client.CookieMemoryStorage();
44 | const session = new Client.Session(Device, Storage);
45 |
46 | try {
47 | await Client.Session.create(Device, Storage, User.username, User.password)
48 | const account = await session.getAccount();
49 | return Promise.resolve({session,account});
50 | } catch (err) {
51 | return Promise.reject(err);
52 | }
53 |
54 | }
55 |
56 | const Followers = async function(session, id){
57 | const feed = new Client.Feed.AccountFollowers(session, id);
58 | try{
59 | const Pollowers = [];
60 | var cursor;
61 | do {
62 | if (cursor) feed.setCursor(cursor);
63 | const getPollowers = await feed.get();
64 | await Promise.all(getPollowers.map(async(akun) => {
65 | Pollowers.push(akun.id);
66 | }))
67 | cursor = await feed.getCursor();
68 | } while(feed.isMoreAvailable());
69 | return Promise.resolve(Pollowers);
70 | } catch(err){
71 | return Promise.reject(err);
72 | }
73 | }
74 |
75 | const Following = async function(session, id){
76 | const feed = new Client.Feed.AccountFollowing(session, id);
77 | try{
78 | const Pollowing = [];
79 | var cursor;
80 | do {
81 | if (cursor) feed.setCursor(cursor);
82 | const getPollowers = await feed.get();
83 | await Promise.all(getPollowers.map(async(akun) => {
84 | Pollowing.push(akun.id);
85 | }))
86 | cursor = await feed.getCursor();
87 | } while(feed.isMoreAvailable());
88 | return Promise.resolve(Pollowing);
89 | } catch(err){
90 | return Promise.reject(err);
91 | }
92 | }
93 |
94 | const Unfollow = async function(session, accountId){
95 | try {
96 | await Client.Relationship.destroy(session, accountId);
97 | return chalk`{bold.green SUKSES}`;
98 | } catch (err){
99 | return chalk`{bold.red GAGAL}`;
100 | }
101 | }
102 |
103 | const Excute = async function(User,sleep){
104 | try {
105 | console.log(chalk`\n{yellow [?] Try to Login . . .}`);
106 | const doLogin = await Login(User);
107 | console.log(chalk`{green [!] Login Succsess}, {yellow [?] Try to get Followers and Following . . .}`);
108 | const task = [
109 | Followers(doLogin.session, doLogin.account.id),
110 | Following(doLogin.session, doLogin.account.id)
111 | ]
112 | const [getFollowers, getFollowing] = await Promise.all(task);
113 | console.log(chalk`{blue | Followers : ${getFollowers.length}\n | Following : ${getFollowing.length}}`);
114 | var AccountToUnfollow = [];
115 | await Promise.all(getFollowing.map(async(account) => {
116 | if (!getFollowers.includes(account)) {
117 | await AccountToUnfollow.push(account);
118 | }
119 | }));
120 | console.log(chalk`{blue | Account To Unfollow : ${AccountToUnfollow.length}}`)
121 | AccountToUnfollow = _.chunk(AccountToUnfollow, 10);
122 | for (let i = 0; i < AccountToUnfollow.length; i++) {
123 | var timeNow = new Date();
124 | timeNow = `${timeNow.getHours()}:${timeNow.getMinutes()}:${timeNow.getSeconds()}`
125 | await Promise.all(AccountToUnfollow[i].map(async(akun) => {
126 | const doUnfollow = await Unfollow(doLogin.session, akun);
127 | console.log(chalk`[{magenta ${timeNow}}] Unfollow {blue [${akun}]} => ${doUnfollow}`);
128 | }))
129 | await console.log(chalk`{yellow \n [#][>] Delay For ${sleep} MiliSeconds [<][#] \n}`);
130 | await delay(sleep);
131 | }
132 | } catch(err) {
133 | console.log(err);
134 | }
135 | }
136 |
137 | console.log(chalk`
138 | {bold.cyan
139 | —————————————————— [INFORMATION] ————————————————————
140 |
141 | [?] {bold.green UFNFB | Unfollow Not FollowBack!}
142 |
143 | —————————————————— [THANKS TO] ————————————————————
144 | [✓] CODE BY CYBER SCREAMER CCOCOT (ccocot@bc0de.net)
145 | [✓] FIXING & TESTING BY SYNTAX (@officialputu_id)
146 | [✓] CCOCOT.CO | BC0DE.NET | NAONLAH.NET | WingkoColi
147 | [✓] SGB TEAM REBORN | Zerobyte.id | ccocot@bc0de.net
148 | —————————————————————————————————————————————————————}
149 | `);
150 |
151 | inquirer.prompt(User)
152 | .then(answers => {
153 | Excute({
154 | username:answers.username,
155 | password:answers.password
156 | },answers.sleep);
157 | })
158 |
--------------------------------------------------------------------------------
/flaauto.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | const Client = require('instagram-private-api').V1;
4 | const chalk = require('chalk');
5 | const delay = require('delay');
6 | const _ = require('lodash');
7 | const inquirer = require('inquirer');
8 |
9 | const question = [
10 | {
11 | type:'input',
12 | name:'username',
13 | message:'[>] Insert Username:',
14 | validate: function(value){
15 | if(!value) return 'Can\'t Empty';
16 | return true;
17 | }
18 | },
19 | {
20 | type:'password',
21 | name:'password',
22 | message:'[>] Insert Password:',
23 | mask:'*',
24 | validate: function(value){
25 | if(!value) return 'Can\'t Empty';
26 | return true;
27 | }
28 | },
29 | {
30 | type:'input',
31 | name:'locationId',
32 | message:'[>] Insert Location ID:',
33 | validate: function(value){
34 | value = value.match(/[0-9]/);
35 | if (value) return true;
36 | return 'Delay is number';
37 | }
38 | },
39 | {
40 | type:'input',
41 | name:'text',
42 | message:'[>] Insert Text Comment (Use [|] if more than 1):',
43 | validate: function(value){
44 | if(!value) return 'Can\'t Empty';
45 | return true;
46 | }
47 | },
48 | {
49 | type:'input',
50 | name:'sleep',
51 | message:'[>] Insert Sleep (MiliSeconds):',
52 | validate: function(value){
53 | value = value.match(/[0-9]/);
54 | if (value) return true;
55 | return 'Delay is number';
56 | }
57 | }
58 | ]
59 |
60 |
61 | const doLogin = async (params) => {
62 | const Device = new Client.Device(params.username);
63 | const Storage = new Client.CookieMemoryStorage();
64 | const session = new Client.Session(Device, Storage);
65 | try {
66 | await Client.Session.create(Device, Storage, params.username, params.password)
67 | const account = await session.getAccount();
68 | return Promise.resolve({session,account});
69 | } catch (err) {
70 | return Promise.reject(err);
71 | }
72 | }
73 |
74 | const grabFollowers = async (session, id) => {
75 | const feed = new Client.Feed.AccountFollowers(session, id);
76 | try{
77 | feed.map = item => item.params;
78 | return Promise.resolve(feed.all());
79 | }catch (e){
80 | return Promise.reject(err);
81 | }
82 | }
83 |
84 | const doFollow = async (session, id) => {
85 | try {
86 | await Client.Relationship.create(session, id);
87 | return true;
88 | } catch (e) {
89 | return false;
90 | }
91 | }
92 |
93 | const doComment = async (session, id, text) => {
94 | try {
95 | await Client.Comment.create(session, id, text);
96 | return true;
97 | } catch(e){
98 | return false;
99 | }
100 | }
101 |
102 | const doLike = async (session, id) => {
103 | try{
104 | await Client.Like.create(session, id);
105 | return true;
106 | } catch(e) {
107 | return false;
108 | }
109 | }
110 |
111 | const doAction = async (session, params, text) => {
112 | const task = [
113 | doFollow(session, params.account.id),
114 | doLike(session, params.id),
115 | doComment(session, params.id, text)
116 | ];
117 | var [Follow,Like,Comment] = await Promise.all(task);
118 | Follow = Follow ? chalk`{bold.green SUKSES}` : chalk`{bold.red GAGAL}`;
119 | Comment = Comment ? chalk`{bold.green SUKSES}` : chalk`{bold.red GAGAL}`;
120 | Like = Like ? chalk`{bold.green SUKSES}` : chalk`{bold.red GAGAL}`;
121 | return chalk`[Follow: ${Follow}] [Like: ${Like}] [Comment: ${Comment} ({cyan ${text}})]`;
122 | }
123 |
124 | const doMain = async (account, locationid, sleep, text) => {
125 | console.log(chalk`\n{green [?] Try to Login ....}`);
126 | account = await doLogin(account);
127 | console.log(chalk`{bold.green [!] Login Success!}`)
128 | const feed = new Client.Feed.LocationMedia(account.session, locationid);
129 | console.log(chalk`{green [?] Try Follow, Like and Comment All Account In LocationId: ${locationid}\n}`);
130 | try {
131 | var cursor;
132 | var count = 0;
133 | do {
134 | if (cursor) feed.setCursor(cursor);
135 | count++;
136 | const media = await feed.get();
137 | console.log(chalk`[Cursor: {bold.cyan ${cursor ? cursor : 'null'}} | Count: {bold.cyan ${count}} | Total Media: {bold.cyan ${media.length}} | Delay: ${sleep} MiliSeconds ]`);
138 | var timeNow = new Date();
139 | timeNow = `${timeNow.getHours()}:${timeNow.getMinutes()}:${timeNow.getSeconds()}`
140 | await Promise.all(media.map(async(media)=>{
141 | const ranText = text[Math.floor(Math.random() * text.length)];
142 | const resultAction = await doAction(account.session, media.params, ranText);
143 | console.log(chalk`[{magenta ${timeNow}}] ${media.id} | {cyanBright @${media.params.account.username}} => ${resultAction}`);
144 | }))
145 | await delay(sleep);
146 | cursor = await feed.getCursor();
147 | } while(feed.isMoreAvailable());
148 | } catch(e) {
149 | console.log(e);
150 | }
151 | }
152 |
153 | console.log(chalk`
154 | {bold.cyan
155 | —————————————————— [INFORMATION] ————————————————————
156 |
157 | [?] {bold.green FLA | Using Location Media Target!}
158 |
159 | —————————————————— [THANKS TO] ————————————————————
160 | [✓] CODE BY CYBER SCREAMER CCOCOT (ccocot@bc0de.net)
161 | [✓] FIXING & TESTING BY SYNTAX (@teamsyntaxid)
162 | [✓] CCOCOT.CO | BC0DE.NET | NAONLAH.NET | WingkoColi
163 | [✓] SGB TEAM REBORN | Zerobyte.id | ccocot@bc0de.net
164 | —————————————————————————————————————————————————————}
165 | `);
166 |
167 | inquirer.prompt(question)
168 | .then(answers => {
169 | var text = answers.text.split('|');
170 | doMain({
171 | username:answers.username,
172 | password:answers.password}, answers.locationId, answers.sleep, text);
173 | })
174 | .catch(e => {
175 | console.log(e);
176 | })
--------------------------------------------------------------------------------
/fah.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | const Client = require('instagram-private-api').V1;
4 | const chalk = require('chalk');
5 | const delay = require('delay');
6 | const _ = require('lodash');
7 | const inquirer = require('inquirer');
8 |
9 | const question = [
10 | {
11 | type:'input',
12 | name:'username',
13 | message:'[>] Insert Username:',
14 | validate: function(value){
15 | if(!value) return 'Can\'t Empty';
16 | return true;
17 | }
18 | },
19 | {
20 | type:'password',
21 | name:'password',
22 | message:'[>] Insert Password:',
23 | mask:'*',
24 | validate: function(value){
25 | if(!value) return 'Can\'t Empty';
26 | return true;
27 | }
28 | },
29 | {
30 | type:'input',
31 | name:'hastag',
32 | message:'[>] Insert Hashtag (Without #):',
33 | validate: function(value){
34 | if(!value) return 'Can\'t Empty';
35 | return true;
36 | }
37 | },
38 | {
39 | type:'input',
40 | name:'text',
41 | message:'[>] Insert Text Comment (Use [|] if more than 1):',
42 | validate: function(value){
43 | if(!value) return 'Can\'t Empty';
44 | return true;
45 | }
46 | },
47 | {
48 | type:'input',
49 | name:'sleep',
50 | message:'Insert Sleep (In MiliSeconds)',
51 | validate: function(value){
52 | value = value.match(/[0-9]/);
53 | if (value) return true;
54 | return 'Delay is number';
55 | }
56 | }
57 | ]
58 |
59 |
60 | const doLogin = async (params) => {
61 | const Device = new Client.Device(params.username);
62 | const Storage = new Client.CookieMemoryStorage();
63 | const session = new Client.Session(Device, Storage);
64 | try {
65 | await Client.Session.create(Device, Storage, params.username, params.password)
66 | const account = await session.getAccount();
67 | return Promise.resolve({session,account});
68 | } catch (err) {
69 | return Promise.reject(err);
70 | }
71 | }
72 |
73 | const grabFollowers = async (session, id) => {
74 | const feed = new Client.Feed.AccountFollowers(session, id);
75 | try{
76 | feed.map = item => item.params;
77 | return Promise.resolve(feed.all());
78 | }catch (e){
79 | return Promise.reject(err);
80 | }
81 | }
82 |
83 | const doFollow = async (session, id) => {
84 | try {
85 | await Client.Relationship.create(session, id);
86 | return true;
87 | } catch (e) {
88 | return false;
89 | }
90 | }
91 |
92 | const doComment = async (session, id, text) => {
93 | try {
94 | await Client.Comment.create(session, id, text);
95 | return true;
96 | } catch(e){
97 | return false;
98 | }
99 | }
100 |
101 | const doLike = async (session, id) => {
102 | try{
103 | await Client.Like.create(session, id);
104 | return true;
105 | } catch(e) {
106 | return false;
107 | }
108 | }
109 |
110 | const doAction = async (session, params, text) => {
111 | const task = [
112 | doFollow(session, params.account.id),
113 | doLike(session, params.id),
114 | doComment(session, params.id, text)
115 | ];
116 | var [Follow,Like,Comment] = await Promise.all(task);
117 | Follow = Follow ? chalk`{bold.green SUKSES}` : chalk`{bold.red GAGAL}`;
118 | Comment = Comment ? chalk`{bold.green SUKSES}` : chalk`{bold.red GAGAL}`;
119 | Like = Like ? chalk`{bold.green SUKSES}` : chalk`{bold.red GAGAL}`;
120 | return chalk`[Follow: ${Follow}] [Like: ${Like}] [Comment: ${Comment} ({cyan ${text}})]`;
121 | }
122 |
123 | const doMain = async (account, hastag, sleep, text) => {
124 | console.log(chalk`\n{green [?] Try to Login . . .}`);
125 | account = await doLogin(account);
126 | console.log(chalk`{bold.green [!] Login Success!}`)
127 | const feed = new Client.Feed.TaggedMedia(account.session, hastag);
128 | console.log(chalk`{green [?] Try to Follow, Like and Comment All Account In Hashtag: ${hastag}\n}`);
129 | try {
130 | var cursor;
131 | var count = 0;
132 | console.log(chalk`{yellow \n [#][>] START WITH RATIO 10/${sleep} MiliSeconds [<][#] \n}`)
133 | do {
134 | if (cursor) feed.setCursor(cursor);
135 | count++;
136 | var media = await feed.get();
137 | media = _.chunk(media, 10);
138 | for (media of media) {
139 | var timeNow = new Date();
140 | timeNow = `${timeNow.getHours()}:${timeNow.getMinutes()}:${timeNow.getSeconds()}`
141 | await Promise.all(media.map(async(media)=>{
142 | const ranText = text[Math.floor(Math.random() * text.length)];
143 | const resultAction = await doAction(account.session, media.params, ranText);
144 | console.log(chalk`[{magenta ${timeNow}}] ${media.id} | {cyanBright @${media.params.account.username}} => ${resultAction}`);
145 | }))
146 | console.log(chalk`{yellow \n [#][>] Delay For ${sleep} MiliSeconds [<][#] \n}`)
147 | await delay(sleep);
148 | }
149 | cursor = await feed.getCursor();
150 | console.log(chalk`[Cursor: {bold.cyan ${cursor ? cursor : 'null'}} | Count: {bold.cyan ${count}} | Total Media: {bold.cyan ${media.length}} | Delay: ${sleep} MiliSeconds ]`);
151 | } while(feed.isMoreAvailable());
152 | } catch(e) {
153 | console.log(e);
154 | }
155 | }
156 |
157 | console.log(chalk`
158 | {bold.cyan
159 | —————————————————— [INFORMATION] ————————————————————
160 |
161 | [?] {bold.green FAH | Using Hastag Media Target!}
162 |
163 | —————————————————— [THANKS TO] ————————————————————
164 | [✓] CODE BY CYBER SCREAMER CCOCOT (ccocot@bc0de.net)
165 | [✓] FIXING & TESTING BY SYNTAX (@teamsyntaxid)
166 | [✓] CCOCOT.CO | BC0DE.NET | NAONLAH.NET | WingkoColi
167 | [✓] SGB TEAM REBORN | Zerobyte.id | ccocot@bc0de.net
168 | —————————————————————————————————————————————————————}
169 | `);
170 |
171 | inquirer.prompt(question)
172 | .then(answers => {
173 | var text = answers.text.split('|');
174 | doMain({
175 | username:answers.username,
176 | password:answers.password}, answers.hastag, answers.sleep, text);
177 | })
178 | .catch(e => {
179 | console.log(e);
180 | })
--------------------------------------------------------------------------------
/flmauto.js:
--------------------------------------------------------------------------------
1 | const Client = require('instagram-private-api').V1;
2 | const delay = require('delay');
3 | const chalk = require('chalk');
4 | const _ = require('lodash');
5 | const rp = require('request-promise');
6 | const inquirer = require('inquirer');
7 |
8 | const User = [
9 | {
10 | type:'input',
11 | name:'username',
12 | message:'[>] Insert Username:',
13 | validate: function(value){
14 | if(!value) return 'Can\'t Empty';
15 | return true;
16 | }
17 | },
18 | {
19 | type:'password',
20 | name:'password',
21 | message:'[>] Insert Password:',
22 | mask:'*',
23 | validate: function(value){
24 | if(!value) return 'Can\'t Empty';
25 | return true;
26 | }
27 | },
28 | {
29 | type:'input',
30 | name:'target',
31 | message:'[>] Insert Link Media:',
32 | validate: function(value){
33 | if(!value) return 'Can\'t Empty';
34 | return true;
35 | }
36 | },
37 | {
38 | type:'input',
39 | name:'text',
40 | message:'[>] Insert Text Comment (Use [|] if more than 1):',
41 | validate: function(value){
42 | if(!value) return 'Can\'t Empty';
43 | return true;
44 | }
45 | },
46 | {
47 | type:'input',
48 | name:'sleep',
49 | message:'[>] Insert Sleep (MiliSeconds):',
50 | validate: function(value){
51 | value = value.match(/[0-9]/);
52 | if (value) return true;
53 | return 'Delay is number';
54 | }
55 | }
56 | ]
57 |
58 | const Login = async function(User){
59 |
60 | const Device = new Client.Device(User.username);
61 | const Storage = new Client.CookieMemoryStorage();
62 | const session = new Client.Session(Device, Storage);
63 |
64 | try {
65 | await Client.Session.create(Device, Storage, User.username, User.password)
66 | const account = await session.getAccount();
67 | return Promise.resolve({session,account});
68 | } catch (err) {
69 | return Promise.reject(err);
70 | }
71 |
72 | }
73 |
74 | const Target = async function(link){
75 | const url = link+'?__a=1'
76 | const option = {
77 | url: url,
78 | method: 'GET',
79 | json:true
80 | }
81 | try{
82 | const account = await rp(option);
83 | return Promise.resolve(account.graphql.shortcode_media.id);
84 | } catch (err){
85 | return Promise.reject(err);
86 | }
87 |
88 | }
89 |
90 | async function ngefollow(session,accountId){
91 | try {
92 | await Client.Relationship.create(session, accountId);
93 | return true
94 | } catch (e) {
95 | return false
96 | }
97 | }
98 |
99 | async function ngeComment(session, id, text){
100 | try {
101 | await Client.Comment.create(session, id, text);
102 | return true;
103 | } catch(e){
104 | return false;
105 | }
106 | }
107 |
108 | async function ngeLike(session, id){
109 | try{
110 | await Client.Like.create(session, id)
111 | return true;
112 | } catch(e) {
113 | return false;
114 | }
115 | }
116 |
117 | const CommentAndLike = async function(session, accountId, text){
118 | var result;
119 |
120 | const feed = new Client.Feed.UserMedia(session, accountId);
121 |
122 | try {
123 | result = await feed.get();
124 | } catch (err) {
125 | return chalk`{bold.red ${err}}`;
126 | }
127 |
128 | if (result.length > 0) {
129 | const task = [
130 | ngefollow(session, accountId),
131 | ngeComment(session, result[0].params.id, text),
132 | ngeLike(session, result[0].params.id)
133 | ]
134 | const [Follow,Comment,Like] = await Promise.all(task);
135 | const printFollow = Follow ? chalk`{green Follow}` : chalk`{red Follow}`;
136 | const printComment = Comment ? chalk`{green Comment}` : chalk`{red Comment}`;
137 | const printLike = Like ? chalk`{green Like}` : chalk`{red Like}`;
138 | return chalk`{bold.green ${printFollow},${printComment},${printLike} [${text}]}`;
139 | }
140 | return chalk`{bold.cyan Timeline Kosong (SKIPPED)}`
141 | };
142 |
143 | const Followers = async function(session, id){
144 | const feed = new Client.Feed.AccountFollowers(session, id);
145 | try{
146 | const Pollowers = [];
147 | var cursor;
148 | do {
149 | if (cursor) feed.setCursor(cursor);
150 | const getPollowers = await feed.get();
151 | await Promise.all(getPollowers.map(async(akun) => {
152 | Pollowers.push(akun.id);
153 | }))
154 | cursor = await feed.getCursor();
155 | } while(feed.isMoreAvailable());
156 | return Promise.resolve(Pollowers);
157 | } catch(err){
158 | return Promise.reject(err);
159 | }
160 | }
161 |
162 | const Excute = async function(User, TargetUsername, Text, Sleep){
163 | try {
164 | console.log(chalk`{yellow \n [?] Try to Login . . .}`)
165 | const doLogin = await Login(User);
166 | console.log(chalk`{green [!] Login Succsess, }{yellow [?] Try To Get Link & Media ID Target . . .}`)
167 | const getTarget = await Target(TargetUsername);
168 | console.log(chalk`{green [!] ${TargetUsername} [${getTarget}]}`);
169 | const getFollowers = await Followers(doLogin.session, doLogin.account.id);
170 | console.log(chalk`{cyan [?] Try to Follow, Comment, and Like Followers Target . . . \n}`)
171 | var TargetResult = await Client.Media.likers(doLogin.session, getTarget);
172 | TargetResult = _.chunk(TargetResult, 10);
173 | for (var i = 0; i < TargetResult.length; i++) {
174 | var timeNow = new Date();
175 | timeNow = `${timeNow.getHours()}:${timeNow.getMinutes()}:${timeNow.getSeconds()}`
176 | await Promise.all(TargetResult[i].map(async(akun) => {
177 | if (!getFollowers.includes(akun.id) && akun.params.isPrivate === false) {
178 | var ranText = Text[Math.floor(Math.random() * Text.length)];
179 | const ngeDo = await CommentAndLike(doLogin.session, akun.id, ranText)
180 | console.log(chalk`[{magenta ${timeNow}}] {bold.green [>]} @${akun.params.username} => ${ngeDo}`)
181 | } else {
182 | console.log(chalk`[{magenta ${timeNow}}] {bold.yellow [SKIPPED]}${akun.params.username} => PRIVATE OR ALREADY FOLLOWED`)
183 | }
184 | }));
185 | console.log(chalk`{yellow \n [#][>] Delay For ${Sleep} MiliSeconds [<][#] \n}`);
186 | await delay(Sleep);
187 | }
188 | } catch (err) {
189 | console.log(err);
190 | }
191 | }
192 |
193 | console.log(chalk`
194 | {bold.cyan
195 | —————————————————— [INFORMATION] ————————————————————
196 |
197 | [?] {bold.green FLMauto | Using Media/Link Target}
198 |
199 | —————————————————— [THANKS TO] ————————————————————
200 | [✓] CODE BY CYBER SCREAMER CCOCOT (ccocot@bc0de.net)
201 | [✓] FIXING & TESTING BY SYNTAX (@teamsyntaxid)
202 | [✓] CCOCOT.CO | BC0DE.NET | NAONLAH.NET | WingkoColi
203 | [✓] SGB TEAM REBORN | Zerobyte.id | ccocot@bc0de.net
204 | —————————————————————————————————————————————————————}
205 | `);
206 |
207 | inquirer.prompt(User)
208 | .then(answers => {
209 | var text = answers.text.split('|');
210 | Excute({
211 | username:answers.username,
212 | password:answers.password
213 | },answers.target,text,answers.sleep);
214 | })
215 |
--------------------------------------------------------------------------------
/fftauto.js:
--------------------------------------------------------------------------------
1 | const Client = require('instagram-private-api').V1;
2 | const delay = require('delay');
3 | const chalk = require('chalk');
4 | const _ = require('lodash');
5 | const rp = require('request-promise');
6 | const S = require('string');
7 | const inquirer = require('inquirer');
8 |
9 | const User = [
10 | {
11 | type:'input',
12 | name:'username',
13 | message:'[>] Insert Username:',
14 | validate: function(value){
15 | if(!value) return 'Can\'t Empty';
16 | return true;
17 | }
18 | },
19 | {
20 | type:'password',
21 | name:'password',
22 | message:'[>] Insert Password:',
23 | mask:'*',
24 | validate: function(value){
25 | if(!value) return 'Can\'t Empty';
26 | return true;
27 | }
28 | },
29 | {
30 | type:'input',
31 | name:'target',
32 | message:'[>] Insert Username Target (Without @[at]):',
33 | validate: function(value){
34 | if(!value) return 'Can\'t Empty';
35 | return true;
36 | }
37 | },
38 | {
39 | type:'input',
40 | name:'text',
41 | message:'[>] Insert Text Comment (Use [|] if more than 1):',
42 | validate: function(value){
43 | if(!value) return 'Can\'t Empty';
44 | return true;
45 | }
46 | },
47 | {
48 | type:'input',
49 | name:'sleep',
50 | message:'[>] Insert Sleep (MiliSeconds):',
51 | validate: function(value){
52 | value = value.match(/[0-9]/);
53 | if (value) return true;
54 | return 'Delay is number';
55 | }
56 | }
57 | ]
58 |
59 | const Login = async function(User){
60 |
61 | const Device = new Client.Device(User.username);
62 | const Storage = new Client.CookieMemoryStorage();
63 | const session = new Client.Session(Device, Storage);
64 |
65 | try {
66 | await Client.Session.create(Device, Storage, User.username, User.password)
67 | const account = await session.getAccount();
68 | return Promise.resolve({session,account});
69 | } catch (err) {
70 | return Promise.reject(err);
71 | }
72 |
73 | }
74 |
75 | const Target = async function(username){
76 | const url = 'https://www.instagram.com/'+username+'/'
77 | const option = {
78 | url: url,
79 | method: 'GET'
80 | }
81 | try{
82 | const account = await rp(option);
83 | const data = S(account).between('').s
84 | const json = JSON.parse(data);
85 | if (json.entry_data.ProfilePage[0].graphql.user.is_private) {
86 | return Promise.reject('Target is private Account');
87 | } else {
88 | const id = json.entry_data.ProfilePage[0].graphql.user.id;
89 | const followers = json.entry_data.ProfilePage[0].graphql.user.edge_followed_by.count;
90 | return Promise.resolve({id,followers});
91 | }
92 | } catch (err){
93 | return Promise.reject(err);
94 | }
95 |
96 | }
97 |
98 | async function ngefollow(session,accountId){
99 | try {
100 | await Client.Relationship.create(session, accountId);
101 | return true
102 | } catch (e) {
103 | return false
104 | }
105 | }
106 |
107 | async function ngeComment(session, id, text){
108 | try {
109 | await Client.Comment.create(session, id, text);
110 | return true;
111 | } catch(e){
112 | return false;
113 | }
114 | }
115 |
116 | async function ngeLike(session, id){
117 | try{
118 | await Client.Like.create(session, id)
119 | return true;
120 | } catch(e) {
121 | return false;
122 | }
123 | }
124 |
125 | const CommentAndLike = async function(session, accountId, text){
126 | var result;
127 |
128 | const feed = new Client.Feed.UserMedia(session, accountId);
129 |
130 | try {
131 | result = await feed.get();
132 | } catch (err) {
133 | return chalk`{bold.red ${err}}`;
134 | }
135 |
136 | if (result.length > 0) {
137 | const task = [
138 | ngefollow(session, accountId),
139 | ngeComment(session, result[0].params.id, text),
140 | ngeLike(session, result[0].params.id)
141 | ]
142 | const [Follow,Comment,Like] = await Promise.all(task);
143 | const printFollow = Follow ? chalk`{green Follow}` : chalk`{red Follow}`;
144 | const printComment = Comment ? chalk`{green Comment}` : chalk`{red Comment}`;
145 | const printLike = Like ? chalk`{green Like}` : chalk`{red Like}`;
146 | return chalk`{bold.green ${printFollow},${printComment},${printLike} [${text}]}`;
147 | }
148 | return chalk`{bold.cyan Timeline Kosong (SKIPPED)}`
149 | };
150 |
151 | const Followers = async function(session, id){
152 | const feed = new Client.Feed.AccountFollowers(session, id);
153 | try{
154 | const Pollowers = [];
155 | var cursor;
156 | do {
157 | if (cursor) feed.setCursor(cursor);
158 | const getPollowers = await feed.get();
159 | await Promise.all(getPollowers.map(async(akun) => {
160 | Pollowers.push(akun.id);
161 | }))
162 | cursor = await feed.getCursor();
163 | } while(feed.isMoreAvailable());
164 | return Promise.resolve(Pollowers);
165 | } catch(err){
166 | return Promise.reject(err);
167 | }
168 | }
169 |
170 | const Excute = async function(User, TargetUsername, Text, Sleep){
171 | try {
172 | console.log(chalk`{yellow \n [?] Try to Login . . .}`)
173 | const doLogin = await Login(User);
174 | console.log(chalk`{green [!] Login Succsess, }{yellow [?] Try To Get ID & Followers Target . . .}`)
175 | const getTarget = await Target(TargetUsername);
176 | console.log(chalk`{green [!] ${TargetUsername}: [${getTarget.id}] | Followers: [${getTarget.followers}]}`)
177 | const getFollowers = await Followers(doLogin.session, doLogin.account.id)
178 | console.log(chalk`{cyan [?] Try to Follow, Comment, and Like Followers Target . . . \n}`)
179 | const Targetfeed = new Client.Feed.AccountFollowers(doLogin.session, getTarget.id);
180 | var TargetCursor;
181 | do {
182 | if (TargetCursor) Targetfeed.setCursor(TargetCursor);
183 | var TargetResult = await Targetfeed.get();
184 | TargetResult = _.chunk(TargetResult, 10);
185 | for (let i = 0; i < TargetResult.length; i++) {
186 | var timeNow = new Date();
187 | timeNow = `${timeNow.getHours()}:${timeNow.getMinutes()}:${timeNow.getSeconds()}`
188 | await Promise.all(TargetResult[i].map(async(akun) => {
189 | if (!getFollowers.includes(akun.id) && akun.params.isPrivate === false) {
190 | var ranText = Text[Math.floor(Math.random() * Text.length)];
191 | const ngeDo = await CommentAndLike(doLogin.session, akun.id, ranText)
192 | console.log(chalk`[{magenta ${timeNow}}] {bold.green [>]}${akun.params.username} => ${ngeDo}`)
193 | } else {
194 | console.log(chalk`[{magenta ${timeNow}}] {bold.yellow [SKIPPED]}${akun.params.username} => PRIVATE OR ALREADY FOLLOWED`)
195 | }
196 | }));
197 | console.log(chalk`{yellow \n [#][>] Delay For ${Sleep} MiliSeconds [<][#] \n}`);
198 | await delay(Sleep);
199 | }
200 | TargetCursor = await Targetfeed.getCursor();
201 | console.log(chalk`{yellow \n [#][>] Delay For ${Sleep} MiliSeconds [<][#] \n}`);
202 | await delay(Sleep);
203 | } while(Targetfeed.isMoreAvailable());
204 | } catch (err) {
205 | console.log(err);
206 | }
207 | }
208 |
209 | console.log(chalk`
210 | {bold.cyan
211 | —————————————————— [INFORMATION] ————————————————————
212 |
213 | [?] {bold.green FFTauto | Using Account/User Target!}
214 |
215 | —————————————————— [THANKS TO] ————————————————————
216 | [✓] CODE BY CYBER SCREAMER CCOCOT (ccocot@bc0de.net)
217 | [✓] FIXING & TESTING BY SYNTAX (@teamsyntaxid)
218 | [✓] CCOCOT.CO | BC0DE.NET | NAONLAH.NET | WingkoColi
219 | [✓] SGB TEAM REBORN | Zerobyte.id | ccocot@bc0de.net
220 | —————————————————————————————————————————————————————}
221 | `);
222 |
223 | inquirer.prompt(User)
224 | .then(answers => {
225 | var text = answers.text.split('|');
226 | Excute({
227 | username:answers.username,
228 | password:answers.password
229 | },answers.target,text,answers.sleep);
230 | })
--------------------------------------------------------------------------------