403Webshell
Server IP : 157.230.181.24  /  Your IP : 216.73.217.11
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux conductive 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64
User :  ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/thread-self/root/opt/aim-bots/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/thread-self/root/opt/aim-bots/add_conan_buddies.py
#!/usr/bin/env python3
"""Add AIM bots to conan0fthenight's feedbag buddy list."""

from __future__ import annotations

import argparse
import random
import sqlite3
import time
from pathlib import Path

DB = Path("/var/lib/ras/oscar.sqlite")
OWNER = "conan0fthenight"
BUDDIES_GROUP = 17180


def ensure_buddies_group(con: sqlite3.Connection) -> int:
    row = con.execute(
        "SELECT groupID FROM feedbag WHERE screenName=? AND classID=1 AND name='Buddies'",
        (OWNER,),
    ).fetchone()
    if row:
        return row[0]
    group_id = random.randint(10000, 65000)
    now = int(time.time())
    con.execute(
        """INSERT INTO feedbag (screenName, groupID, itemID, classID, name, attributes, lastModified, pdMode, authPending)
           VALUES (?, ?, 0, 1, 'Buddies', ?, ?, 0, 0)""",
        (OWNER, group_id, b"\x00\x0c\x00\xc8\x00\x08C\x19\x12\x18\x05Fo\x8d", now),
    )
    return group_id


def add_buddies(buddies: list[str], db: Path = DB) -> list[str]:
    con = sqlite3.connect(str(db))
    group_id = ensure_buddies_group(con)
    existing = {
        r[0].lower()
        for r in con.execute(
            "SELECT name FROM feedbag WHERE screenName=? AND classID=0", (OWNER,)
        )
    }
    now = int(time.time())
    added = []
    for name in buddies:
        key = name.lower()
        if key in existing:
            continue
        item_id = random.randint(10000, 65000)
        while con.execute(
            "SELECT 1 FROM feedbag WHERE screenName=? AND itemID=?", (OWNER, item_id)
        ).fetchone():
            item_id = random.randint(10000, 65000)
        con.execute(
            """INSERT INTO feedbag (screenName, groupID, itemID, classID, name, attributes, lastModified, pdMode, authPending)
               VALUES (?, ?, ?, 0, ?, ?, ?, 0, 0)""",
            (OWNER, group_id, item_id, key, b"\x00\x00", now),
        )
        added.append(key)
    con.execute(
        "UPDATE feedbag SET lastModified=? WHERE screenName=? AND classID=1 AND name='Buddies'",
        (now, OWNER),
    )
    con.commit()
    return added


def main() -> int:
    parser = argparse.ArgumentParser()
    parser.add_argument("buddies", nargs="*", help="screen names to add (default: all persona bots)")
    args = parser.parse_args()

    if args.buddies:
        buddies = args.buddies
    else:
        personas = Path("/opt/aim-bots/personas")
        buddies = [
            d.name
            for d in sorted(personas.iterdir())
            if d.is_dir()
        ]
        # Core trio always first — never accidentally omit the queen
        for core in ("dudesy7777", "magus5311", "soewaslike"):
            if core not in buddies:
                buddies.insert(0, core)

    added = add_buddies(buddies)
    for name in added:
        print(f"added: {name}")
    if not added:
        print("nothing new to add")
    return 0


if __name__ == "__main__":
    raise SystemExit(main())

Youez - 2016 - github.com/yon3zu
LinuXploit