ConsoleFramework 2.0.3__tar.gz → 2.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {consoleframework-2.0.3 → consoleframework-2.0.4}/ConsoleFramework/__init__.py +38 -1
- {consoleframework-2.0.3 → consoleframework-2.0.4}/ConsoleFramework.egg-info/PKG-INFO +1 -1
- {consoleframework-2.0.3 → consoleframework-2.0.4}/PKG-INFO +1 -1
- {consoleframework-2.0.3 → consoleframework-2.0.4}/setup.py +1 -1
- {consoleframework-2.0.3 → consoleframework-2.0.4}/ConsoleFramework.egg-info/SOURCES.txt +0 -0
- {consoleframework-2.0.3 → consoleframework-2.0.4}/ConsoleFramework.egg-info/dependency_links.txt +0 -0
- {consoleframework-2.0.3 → consoleframework-2.0.4}/ConsoleFramework.egg-info/not-zip-safe +0 -0
- {consoleframework-2.0.3 → consoleframework-2.0.4}/ConsoleFramework.egg-info/top_level.txt +0 -0
- {consoleframework-2.0.3 → consoleframework-2.0.4}/LICENSE +0 -0
- {consoleframework-2.0.3 → consoleframework-2.0.4}/setup.cfg +0 -0
|
@@ -19,6 +19,8 @@ import stat
|
|
|
19
19
|
import subprocess as CMD
|
|
20
20
|
import threading
|
|
21
21
|
import urllib.request
|
|
22
|
+
import urllib.parse
|
|
23
|
+
import base64
|
|
22
24
|
class Colors:
|
|
23
25
|
RESET = "\033[0m"
|
|
24
26
|
RED = "\033[31m"
|
|
@@ -750,4 +752,39 @@ class Channel:
|
|
|
750
752
|
data = self.connection.recv(1024).decode().strip()
|
|
751
753
|
return data
|
|
752
754
|
except Exception:
|
|
753
|
-
return None
|
|
755
|
+
return None
|
|
756
|
+
|
|
757
|
+
class Web:
|
|
758
|
+
def UploadPaste(text, title="My Paste"):
|
|
759
|
+
def _get_api_key():
|
|
760
|
+
return base64.b64decode("NXZsdjk3eFlXdGtuLTBvUzcxbi1Wa01jVVpRQzJZV2Y=".encode("utf-8")).decode("utf-8")
|
|
761
|
+
api_key = _get_api_key()
|
|
762
|
+
data = {
|
|
763
|
+
'api_dev_key': api_key,
|
|
764
|
+
'api_option': 'paste',
|
|
765
|
+
'api_paste_code': text,
|
|
766
|
+
'api_paste_name': title,
|
|
767
|
+
'api_paste_private': '0',
|
|
768
|
+
'api_paste_expire_date': 'N',
|
|
769
|
+
}
|
|
770
|
+
encoded_data = urllib.parse.urlencode(data).encode('utf-8')
|
|
771
|
+
req = urllib.request.Request(
|
|
772
|
+
"https://pastebin.com/api/api_post.php",
|
|
773
|
+
data=encoded_data,
|
|
774
|
+
method="POST",
|
|
775
|
+
headers={
|
|
776
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
|
|
777
|
+
}
|
|
778
|
+
)
|
|
779
|
+
try:
|
|
780
|
+
with urllib.request.urlopen(req) as response:
|
|
781
|
+
result = response.read().decode('utf-8')
|
|
782
|
+
if result.startswith("https://pastebin.com/"):
|
|
783
|
+
paste_id = result.split("/")[-1]
|
|
784
|
+
return f"https://pastebin.com/raw/{paste_id}"
|
|
785
|
+
else:
|
|
786
|
+
return f"Pastebin error: {result}"
|
|
787
|
+
except urllib.error.HTTPError as e:
|
|
788
|
+
return f"HTTP Error {e.code}: {e.reason}"
|
|
789
|
+
except Exception as e:
|
|
790
|
+
return f"Error: {e}"
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="ConsoleFramework",
|
|
5
|
-
version="2.0.
|
|
5
|
+
version="2.0.4",
|
|
6
6
|
description="The best Console Library of the Python.",
|
|
7
7
|
long_description="ConsoleFramework - Pure Python library for console rendering, animations, processes and more. In this module ONLY standart python, no other modules.",
|
|
8
8
|
long_description_content_type="text/plain",
|
|
File without changes
|
{consoleframework-2.0.3 → consoleframework-2.0.4}/ConsoleFramework.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|