You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

parascode

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parascode - pypi Package Compare versions

Comparing version
1.1.2
to
0.3.0
+1
-1
parascode.egg-info/PKG-INFO
Metadata-Version: 2.4
Name: parascode
Version: 1.1.2
Version: 0.3.0
Summary: Multi functional python module
Author: Paras

@@ -1,1 +0,1 @@

from .core import expire, link, run
from .core import *
"""
ParasCode - Advanced Python Utility Toolkit
ParasCode - Stable Python Utility Toolkit
Author: Paras Chourasiya

@@ -13,5 +13,6 @@ """

import sys
import builtins
from datetime import datetime
__version__ = "1.1.2"
__version__ = "0.3.0"

@@ -21,123 +22,132 @@

def __init__(self):
self.colors = {
'red': '\033[91m',
'green': '\033[92m',
'yellow': '\033[93m',
'blue': '\033[94m',
'purple': '\033[95m',
'cyan': '\033[96m',
'white': '\033[97m',
'reset': '\033[0m',
'bold': '\033[1m',
}
COLORS = {
"red": "\033[91m",
"green": "\033[92m",
"yellow": "\033[93m",
"blue": "\033[94m",
"purple": "\033[95m",
"cyan": "\033[96m",
"white": "\033[97m",
"bold": "\033[1m",
"reset": "\033[0m"
}
# Random utilities
# -------------------------
# COLOR PRINT (SAFE)
# -------------------------
def random_user_agent(self):
agents = [
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/120.0.0.0',
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Chrome/120.0.0.0',
'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) Mobile',
'Mozilla/5.0 (Linux; Android 13) Chrome/120.0.0.0 Mobile',
]
return random.choice(agents)
def cprint(self, text):
for color, code in self.COLORS.items():
text = text.replace(color, code)
builtins.print(text + self.COLORS["reset"])
# -------------------------
# RANDOM UTILITIES
# -------------------------
def random_string(self, length=10):
chars = string.ascii_letters + string.digits
return ''.join(random.choices(chars, k=length))
return "".join(random.choice(chars) for _ in range(length))
def random_number(self, start=1000, end=9999):
return random.randint(start, end)
# HTTP Client
def random_user_agent(self):
def get_client(self):
headers = {'User-Agent': self.random_user_agent()}
return httpx.Client(http2=True, timeout=30, headers=headers)
agents = [
"Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"Mozilla/5.0 (Macintosh; Intel Mac OS X)",
"Mozilla/5.0 (Linux; Android 13)",
"Mozilla/5.0 (iPhone; CPU iPhone OS 17)"
]
# Color utilities
return random.choice(agents)
def colored(self, text, color='white', bold=False):
color_code = self.colors.get(color, self.colors['white'])
bold_code = self.colors['bold'] if bold else ''
return f"{bold_code}{color_code}{text}{self.colors['reset']}"
# -------------------------
# HTTP CLIENT
# -------------------------
def print_colored(self, text, color='white', bold=False):
print(self.colored(text, color, bold))
def get_client(self):
# System utilities
headers = {"User-Agent": self.random_user_agent()}
return httpx.Client(headers=headers, http2=True)
def clear_screen(self):
os.system('clear' if os.name == 'posix' else 'cls')
# -------------------------
# OPEN LINK
# -------------------------
def show_banner(self):
banner = f"""
╔══════════════════════════════════╗
║ PARASCODE v{__version__} ║
╠══════════════════════════════════╣
║ Author: Paras Chourasiya ║
╚══════════════════════════════════╝
"""
print(self.colored(banner, 'cyan'))
def link(self, url):
# Link opener
def link(self, url):
webbrowser.open(url)
# Run raw python code - Fixed version
def run_raw(self, url):
"""Execute Python code from a URL"""
try:
response = requests.get(url)
response.raise_for_status()
exec(response.text)
except Exception as e:
print(f"Error executing code: {e}")
# Maintain backward compatibility with the old 'run' interface
# -------------------------
# RUN RAW PYTHON (SAFE)
# -------------------------
class run:
@staticmethod
def raw(url):
"""Legacy method - executes Python code from URL"""
try:
exec(requests.get(url).text)
code = requests.get(url, timeout=15).text
exec(code, {
"__builtins__": __builtins__,
"__name__": "__main__"
})
except Exception as e:
print(f"Error executing code: {e}")
# Script expiry
builtins.print("Raw execution error:", e)
# -------------------------
# SCRIPT EXPIRY
# -------------------------
def expire(self, date):
now = datetime.now()
try:
exp = datetime.strptime(date, "%d/%m/%Y,%I:%M%p")
if now > exp:
print(self.colored("This script has expired!", "red", bold=True))
sys.exit()
except ValueError:
print(self.colored("Invalid date format. Please use: DD/MM/YYYY,HH:MMAM/PM", "red"))
exp = datetime.strptime(date, "%d/%m/%Y,%I:%M%p")
if now > exp:
sys.exit()
# -------------------------
# CLEAR TERMINAL
# -------------------------
# Create instance
def clear(self):
os.system("cls" if os.name == "nt" else "clear")
# -------------------------
# SHOW BANNER
# -------------------------
def banner(self):
builtins.print(f"""
╔════════════════════════════╗
║ PARASCODE v{__version__} ║
╚════════════════════════════╝
""")
pc = ParasCode()
# Direct function assignments
random_user_agent = pc.random_user_agent
cprint = pc.cprint
random_string = pc.random_string
random_number = pc.random_number
random_user_agent = pc.random_user_agent
get_client = pc.get_client
colored = pc.colored
print_colored = pc.print_colored
clear_screen = pc.clear_screen
show_banner = pc.show_banner
link = pc.link
expire = pc.expire
# Make both versions available
run_raw = pc.run_raw
run = pc.run # This maintains the old interface
clear = pc.clear
banner = pc.banner
run = ParasCode.run
Metadata-Version: 2.4
Name: parascode
Version: 1.1.2
Version: 0.3.0
Summary: Multi functional python module
Author: Paras
[project]
name = "parascode"
version = "1.1.2"
version = "0.3.0"
description = "Multi functional python module"

@@ -5,0 +5,0 @@ authors = [