cryptoshield 0.2.2__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.
Files changed (20) hide show
  1. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/PKG-INFO +1 -1
  2. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield/approvals.py +1 -1
  3. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield/cli.py +26 -0
  4. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield.egg-info/PKG-INFO +1 -1
  5. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/pyproject.toml +1 -1
  6. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/LICENSE +0 -0
  7. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/README.md +0 -0
  8. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield/__init__.py +0 -0
  9. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield/db.py +0 -0
  10. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield/honeypot.py +0 -0
  11. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield/phishing.py +0 -0
  12. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield/rugpull.py +0 -0
  13. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield/solana.py +0 -0
  14. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield/utils.py +0 -0
  15. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield.egg-info/SOURCES.txt +0 -0
  16. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield.egg-info/dependency_links.txt +0 -0
  17. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield.egg-info/entry_points.txt +0 -0
  18. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield.egg-info/requires.txt +0 -0
  19. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/cryptoshield.egg-info/top_level.txt +0 -0
  20. {cryptoshield-0.2.2 → cryptoshield-0.2.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cryptoshield
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: All-in-one crypto security toolkit — honeypot, approvals, rugpull, phishing
5
5
  Author-email: yossweh <cilokcilok15@gmail.com>
6
6
  License: MIT
@@ -5,7 +5,7 @@ Scans on-chain Approval events to find all active token approvals.
5
5
 
6
6
  from web3 import Web3
7
7
  from .utils import (
8
- get_web3, checksum, label_address, ERC20_ABI, APPROVAL_EVENT,
8
+ get_web3, checksum, label_address, ERC20_ABI,
9
9
  KNOWN_ADDRESSES, print_header, print_ok, print_warn, print_fail, print_info,
10
10
  )
11
11
 
@@ -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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cryptoshield
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: All-in-one crypto security toolkit — honeypot, approvals, rugpull, phishing
5
5
  Author-email: yossweh <cilokcilok15@gmail.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cryptoshield"
7
- version = "0.2.2"
7
+ version = "0.2.4"
8
8
  description = "All-in-one crypto security toolkit — honeypot, approvals, rugpull, phishing"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
File without changes
File without changes
File without changes