cryptoshield 0.2.3__tar.gz → 0.2.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.
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/PKG-INFO +1 -1
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield/cli.py +26 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield.egg-info/PKG-INFO +1 -1
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/pyproject.toml +1 -1
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/LICENSE +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/README.md +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield/__init__.py +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield/approvals.py +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield/db.py +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield/honeypot.py +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield/phishing.py +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield/rugpull.py +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield/solana.py +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield/utils.py +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield.egg-info/SOURCES.txt +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield.egg-info/dependency_links.txt +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield.egg-info/entry_points.txt +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield.egg-info/requires.txt +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/cryptoshield.egg-info/top_level.txt +0 -0
- {cryptoshield-0.2.3 → cryptoshield-0.2.4}/setup.cfg +0 -0
|
@@ -5,6 +5,17 @@ import typer
|
|
|
5
5
|
|
|
6
6
|
from . import __version__
|
|
7
7
|
|
|
8
|
+
|
|
9
|
+
def validate_evm_address(addr: str) -> bool:
|
|
10
|
+
"""Check if string looks like a valid EVM address."""
|
|
11
|
+
if not addr.startswith("0x") or len(addr) != 42:
|
|
12
|
+
return False
|
|
13
|
+
try:
|
|
14
|
+
int(addr, 16)
|
|
15
|
+
return True
|
|
16
|
+
except ValueError:
|
|
17
|
+
return False
|
|
18
|
+
|
|
8
19
|
app = typer.Typer(
|
|
9
20
|
name="cryptoshield",
|
|
10
21
|
help="🛡 CryptoShield — All-in-one crypto security toolkit",
|
|
@@ -27,6 +38,11 @@ def check(
|
|
|
27
38
|
print_solana_token_report(report)
|
|
28
39
|
return
|
|
29
40
|
|
|
41
|
+
if not validate_evm_address(address):
|
|
42
|
+
print(f"❌ Invalid EVM address: {address}")
|
|
43
|
+
print(" Expected format: 0x followed by 40 hex characters")
|
|
44
|
+
sys.exit(1)
|
|
45
|
+
|
|
30
46
|
from .honeypot import check_honeypot, print_honeypot_report
|
|
31
47
|
from .rugpull import analyze_rugpull, print_rugpull_report
|
|
32
48
|
|
|
@@ -51,6 +67,11 @@ def approvals(
|
|
|
51
67
|
blocks: int = typer.Option(100000, "-b", "--blocks", help="How many blocks back to scan"),
|
|
52
68
|
):
|
|
53
69
|
"""Scan token approvals for a wallet."""
|
|
70
|
+
if not validate_evm_address(wallet):
|
|
71
|
+
print(f"❌ Invalid EVM address: {wallet}")
|
|
72
|
+
print(" Expected format: 0x followed by 40 hex characters")
|
|
73
|
+
sys.exit(1)
|
|
74
|
+
|
|
54
75
|
from .approvals import scan_approvals, print_approval_report
|
|
55
76
|
|
|
56
77
|
print(f"\n🛡 Scanning approvals for {wallet[:10]}... on {chain}")
|
|
@@ -70,6 +91,11 @@ def rugpull(
|
|
|
70
91
|
print_solana_token_report(report)
|
|
71
92
|
return
|
|
72
93
|
|
|
94
|
+
if not validate_evm_address(address):
|
|
95
|
+
print(f"❌ Invalid EVM address: {address}")
|
|
96
|
+
print(" Expected format: 0x followed by 40 hex characters")
|
|
97
|
+
sys.exit(1)
|
|
98
|
+
|
|
73
99
|
from .rugpull import analyze_rugpull, print_rugpull_report
|
|
74
100
|
|
|
75
101
|
report = analyze_rugpull(address, chain)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|