Skip to content

Instantly share code, notes, and snippets.

@tribela
Created September 22, 2019 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tribela/660ad9bd1b012731bf6f8c01253da7d8 to your computer and use it in GitHub Desktop.
Save tribela/660ad9bd1b012731bf6f8c01253da7d8 to your computer and use it in GitHub Desktop.
Mastodon date site spammer
import os
from itertools import product
from mastodon import Mastodon
app = Mastodon(
client_id=os.getenv('MASTODON_CLIENT_KEY'),
client_secret=os.getenv('MASTODON_CLIENT_SECRET'),
access_token=os.getenv('MASTODON_ACCESS_TOKEN'),
api_base_url=os.getenv('MASTODON_API_BASE_URL')
)
usernames = [
'haanakko',
'naomii',
'arialanna',
]
for username, i in product(usernames, range(100)):
app.search(f'@{username}{i}@pawoo.net', result_type='accounts', resolve=True)
Account.where(suspended_at: nil, domain: 'pawoo.net').where('note like ?', '%めったにPawooを使いません。%').find_in_batches do |accs|
accs.each do |acc|
p acc.username
SuspendAccountService.new.call(acc)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment