Skip to content

Instantly share code, notes, and snippets.

@ennjoy
Last active November 20, 2021 11:55
Show Gist options
  • Save ennjoy/11337c1180f952f458ae9b546a803904 to your computer and use it in GitHub Desktop.
Save ennjoy/11337c1180f952f458ae9b546a803904 to your computer and use it in GitHub Desktop.
vk-spam-prod.js
const GROUP_IDS = [10190856, 24261502, 25885216, 33690971, 33764742, 39130136, 46258034, 47484197, 56558556, 59721672, 94946045, 99839307, 14731082];
let i = 0;
let limit = 1000;
const getWall = (groupId) => (
vk._api(
'wall.get', {
owner_id: -groupId
}, w => {
w.response.items.reverse()
.map(function(c) {
let author_id = (c.signer_id || c.created_by || c.from_id);
vk.api.friends.add({
user_id: author_id
}, r => log('#' + i++ + ' Add: vk.com/id' + author_id))
});
}
)
);
const getWallToGroups = (listOfGroups = []) => {
for (let groupId of listOfGroups)
getWall(groupId);
}
setInterval(getWallToGroups.bind(null, GROUP_IDS), limit);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment