[
  {
    "path": "README.md",
    "content": "# TikTok-Shares-Botter\nAdds TikTok Shares for you.\n\n## Information\nThis tool was developed to demonstrate how simple it is to abuse a service like TikTok. Using this tool will definitely cause the video to be on the TikTok \"For You\" page — increases chances of becoming TikTok famous. Please refrain from using this TikTok Shares Botter as it was once again only developed for educational purposes. Nevertheless, if you use this, you are doing it at your own risk.\n\nThanks to verdict for this insane idea.<br/>\nHis Discord: verdict#0200\n\n## Preview\n![](https://i.imgur.com/63NTRvx.png)\n![](https://i.imgur.com/WstiI7q.png)\n\n## Usage\nIf you do not already have the **requests** library installed, run the setup.py file — make sure PIP is added to PATH.\n1. Run main.py.\n2. Enter the amount of desired Shares.\n3. Paste a TikTok URL.\n4. All set!\n\n## Legal Notice\nThis is illegal if you use this without the consent of the owners — in this case, the TikTok team. I am not accountable for anything you get into; this was merely a speedrun to demonstrate how botters work. This is 100% educational, please do not misuse this tool.\n"
  },
  {
    "path": "main.py",
    "content": "import os\nimport random\nimport requests\nimport threading\nfrom time import strftime, gmtime, time, sleep\n\n\nclass TikTok:\n    def __init__(self):\n        self.added = 0\n        self.lock = threading.Lock()\n\n        try:\n            self.amount = int(input('> Desired Amount of Shares: '))\n        except ValueError:\n            print('\\nInteger expected.')\n            os.system('title [TikTok Shares Botter] - Restart required')\n            os.system('pause >NUL')\n            os._exit(0)\n\n        try:\n            self.video_id = input('> TikTok URL: ').split('/')[5]\n        except IndexError:\n            print(\n                '\\nInvalid TikTok URL format.\\nFormat expected: https://www.tiktok.com/@username/vi'\n                'deo/1234567891234567891'\n            )\n            os.system('title [TikTok Shares Botter] - Restart required')\n            os.system('pause >NUL')\n            os._exit(0)\n        else:\n            print()\n\n    def status(self, code, intention):\n        if code == 200:\n            self.added += 1\n        else:\n            self.lock.acquire()\n            print(f'Error: {intention} | Status Code: {code}')\n            self.lock.release()\n\n    def update_title(self):\n        # Avoid ZeroDivisionError\n        while self.added == 0:\n            sleep(0.2)\n        while self.added < self.amount:\n            # Elapsed Time / Added * Remaining\n            time_remaining = strftime(\n                '%H:%M:%S', gmtime(\n                    (time() - self.start_time) / self.added * (self.amount - self.added)\n                )\n            )\n            os.system(\n                f'title [TikTok Shares Botter] - Added: {self.added}/{self.amount} '\n                f'({round(((self.added / self.amount) * 100), 3)}%) ^| Active Threads: '\n                f'{threading.active_count()} ^| Time Remaining: {time_remaining}'\n            )\n            sleep(0.2)\n        os.system(\n            f'title [TikTok Shares Botter] - Added: {self.added}/{self.amount} '\n            f'({round(((self.added / self.amount) * 100), 3)}%) ^| Active Threads: '\n            f'{threading.active_count()} ^| Time Remaining: 00:00:00'\n        )\n\n    def bot(self):\n        action_time = round(time())\n        install_id = ''.join(random.choice('0123456789') for _ in range(19))\n\n        data = (\n            f'action_time={action_time}&item_id={self.video_id}&item_type=1&share_delta=1&stats_cha'\n            'nnel=copy'\n        )\n        headers = {\n            'Content-Type': 'application/x-www-form-urlencoded',\n            'x-common-params-v2': 'version_code=16.6.5&app_name=musical_ly&channel=App%20Store&devi'\n                                  f'ce_id={install_id}&aid=1233&os_version=13.5.1&device_platform=i'\n                                  'phone&device_type=iPhone10,5'\n        }\n\n        try:\n            response = requests.post(\n                'https://api16-core-c-useast1a.tiktokv.com/aweme/v1/aweme/stats/?ac=WIFI&op_region='\n                'SE&app_skin=white&', data=data, headers=headers\n            )\n        except Exception as e:\n            print(f'Error: {e}')\n        else:\n            if 'Service Unavailable' not in response.text:\n                self.status(response.status_code, response.text)\n\n    def multi_threading(self):\n        self.start_time = time()\n        threading.Thread(target=self.update_title).start()\n\n        for _ in range(self.amount):\n            threading.Thread(target=self.bot).start()\n\n        os.system('pause >NUL')\n        os.system('title [TikTok Shares Botter] - Exiting...')\n        sleep(3)\n\n\nif __name__ == '__main__':\n    os.system('cls && title [TikTok Shares Botter]')\n    main = TikTok()\n    main.multi_threading()\n"
  },
  {
    "path": "setup.py",
    "content": "from os import system\n\nsystem('pip install requests')\nprint('\\nFinished.')\nsystem('pause >NUL')\n"
  }
]