import aiohttp import socket from asyncio import get_running_loop from functools import partial def _netcat(host, port, content): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, port)) s.sendall(content.encode()) s.shutdown(socket.SHUT_WR) while True: data = s.recv(4096).decode("utf-8").strip("\n\x00") if not data: break return data s.close() async def paste(content): loop = get_running_loop() link = await loop.run_in_executor(None, partial(_netcat, "ezup.dev", 9999, content)) return link ####2nd paste code BASE = "https://batbin.me/" async def post(url: str, *args, **kwargs): async with aiohttp.ClientSession() as session: async with session.post(url, *args, **kwargs) as resp: try: data = await resp.json() except Exception: data = await resp.text() return data async def RAUSHANBin(text): resp = await post(f"{BASE}api/v2/paste", data=text) if not resp["success"]: return link = BASE + resp["message"] return link