shlhom 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.
- shlhom-1.0.0/LICENSE +21 -0
- shlhom-1.0.0/PKG-INFO +77 -0
- shlhom-1.0.0/README.md +51 -0
- shlhom-1.0.0/setup.cfg +4 -0
- shlhom-1.0.0/setup.py +24 -0
- shlhom-1.0.0/shlhom.egg-info/PKG-INFO +77 -0
- shlhom-1.0.0/shlhom.egg-info/SOURCES.txt +9 -0
- shlhom-1.0.0/shlhom.egg-info/dependency_links.txt +1 -0
- shlhom-1.0.0/shlhom.egg-info/requires.txt +1 -0
- shlhom-1.0.0/shlhom.egg-info/top_level.txt +1 -0
- shlhom-1.0.0/shlhom.py +63 -0
shlhom-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 shlhom
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
shlhom-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: shlhom
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: حماية الأكواد بتاريخ انتهاء
|
|
5
|
+
Home-page: https://github.com/shlhom/shlhom
|
|
6
|
+
Author: shlhom
|
|
7
|
+
Author-email: shlhom@example.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Natural Language :: Arabic
|
|
12
|
+
Requires-Python: >=3.7
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: requests>=2.25.0
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: author-email
|
|
18
|
+
Dynamic: classifier
|
|
19
|
+
Dynamic: description
|
|
20
|
+
Dynamic: description-content-type
|
|
21
|
+
Dynamic: home-page
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
Dynamic: requires-dist
|
|
24
|
+
Dynamic: requires-python
|
|
25
|
+
Dynamic: summary
|
|
26
|
+
|
|
27
|
+
# shlhom
|
|
28
|
+
|
|
29
|
+
مكتبة Python بسيطة لحماية أكوادك بتاريخ انتهاء صلاحية.
|
|
30
|
+
|
|
31
|
+
## التثبيت
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install shlhom
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## الاستخدام
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
import shlhom
|
|
41
|
+
|
|
42
|
+
shlhom.check("2027-06-09")
|
|
43
|
+
|
|
44
|
+
print("الأداة تعمل!")
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## الميزات
|
|
48
|
+
|
|
49
|
+
- كشف التلاعب بساعة الجهاز
|
|
50
|
+
- تحقق من الوقت عبر الإنترنت
|
|
51
|
+
- خفيفة وسريعة
|
|
52
|
+
- مجانية 100%
|
|
53
|
+
|
|
54
|
+
## أمثلة
|
|
55
|
+
|
|
56
|
+
### فحص عادي
|
|
57
|
+
```python
|
|
58
|
+
import shlhom
|
|
59
|
+
shlhom.check("2027-06-09")
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### فحص بدون خروج
|
|
63
|
+
```python
|
|
64
|
+
if shlhom.check("2027-06-09", exit_on_fail=False):
|
|
65
|
+
print("مسموح")
|
|
66
|
+
else:
|
|
67
|
+
print("انتهت الصلاحية")
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### بدون رسائل
|
|
71
|
+
```python
|
|
72
|
+
shlhom.check("2027-06-09", show_info=False)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## الترخيص
|
|
76
|
+
|
|
77
|
+
MIT
|
shlhom-1.0.0/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# shlhom
|
|
2
|
+
|
|
3
|
+
مكتبة Python بسيطة لحماية أكوادك بتاريخ انتهاء صلاحية.
|
|
4
|
+
|
|
5
|
+
## التثبيت
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install shlhom
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## الاستخدام
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
import shlhom
|
|
15
|
+
|
|
16
|
+
shlhom.check("2027-06-09")
|
|
17
|
+
|
|
18
|
+
print("الأداة تعمل!")
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## الميزات
|
|
22
|
+
|
|
23
|
+
- كشف التلاعب بساعة الجهاز
|
|
24
|
+
- تحقق من الوقت عبر الإنترنت
|
|
25
|
+
- خفيفة وسريعة
|
|
26
|
+
- مجانية 100%
|
|
27
|
+
|
|
28
|
+
## أمثلة
|
|
29
|
+
|
|
30
|
+
### فحص عادي
|
|
31
|
+
```python
|
|
32
|
+
import shlhom
|
|
33
|
+
shlhom.check("2027-06-09")
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### فحص بدون خروج
|
|
37
|
+
```python
|
|
38
|
+
if shlhom.check("2027-06-09", exit_on_fail=False):
|
|
39
|
+
print("مسموح")
|
|
40
|
+
else:
|
|
41
|
+
print("انتهت الصلاحية")
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### بدون رسائل
|
|
45
|
+
```python
|
|
46
|
+
shlhom.check("2027-06-09", show_info=False)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## الترخيص
|
|
50
|
+
|
|
51
|
+
MIT
|
shlhom-1.0.0/setup.cfg
ADDED
shlhom-1.0.0/setup.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from setuptools import setup
|
|
2
|
+
|
|
3
|
+
with open("README.md", "r", encoding="utf-8") as f:
|
|
4
|
+
long_description = f.read()
|
|
5
|
+
|
|
6
|
+
setup(
|
|
7
|
+
name="shlhom",
|
|
8
|
+
version="1.0.0",
|
|
9
|
+
author="shlhom",
|
|
10
|
+
author_email="shlhom@example.com",
|
|
11
|
+
description="حماية الأكواد بتاريخ انتهاء",
|
|
12
|
+
long_description=long_description,
|
|
13
|
+
long_description_content_type="text/markdown",
|
|
14
|
+
url="https://github.com/shlhom/shlhom",
|
|
15
|
+
py_modules=["shlhom"],
|
|
16
|
+
classifiers=[
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
"Natural Language :: Arabic",
|
|
21
|
+
],
|
|
22
|
+
python_requires=">=3.7",
|
|
23
|
+
install_requires=["requests>=2.25.0"],
|
|
24
|
+
)
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: shlhom
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: حماية الأكواد بتاريخ انتهاء
|
|
5
|
+
Home-page: https://github.com/shlhom/shlhom
|
|
6
|
+
Author: shlhom
|
|
7
|
+
Author-email: shlhom@example.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Natural Language :: Arabic
|
|
12
|
+
Requires-Python: >=3.7
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: requests>=2.25.0
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: author-email
|
|
18
|
+
Dynamic: classifier
|
|
19
|
+
Dynamic: description
|
|
20
|
+
Dynamic: description-content-type
|
|
21
|
+
Dynamic: home-page
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
Dynamic: requires-dist
|
|
24
|
+
Dynamic: requires-python
|
|
25
|
+
Dynamic: summary
|
|
26
|
+
|
|
27
|
+
# shlhom
|
|
28
|
+
|
|
29
|
+
مكتبة Python بسيطة لحماية أكوادك بتاريخ انتهاء صلاحية.
|
|
30
|
+
|
|
31
|
+
## التثبيت
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install shlhom
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## الاستخدام
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
import shlhom
|
|
41
|
+
|
|
42
|
+
shlhom.check("2027-06-09")
|
|
43
|
+
|
|
44
|
+
print("الأداة تعمل!")
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## الميزات
|
|
48
|
+
|
|
49
|
+
- كشف التلاعب بساعة الجهاز
|
|
50
|
+
- تحقق من الوقت عبر الإنترنت
|
|
51
|
+
- خفيفة وسريعة
|
|
52
|
+
- مجانية 100%
|
|
53
|
+
|
|
54
|
+
## أمثلة
|
|
55
|
+
|
|
56
|
+
### فحص عادي
|
|
57
|
+
```python
|
|
58
|
+
import shlhom
|
|
59
|
+
shlhom.check("2027-06-09")
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### فحص بدون خروج
|
|
63
|
+
```python
|
|
64
|
+
if shlhom.check("2027-06-09", exit_on_fail=False):
|
|
65
|
+
print("مسموح")
|
|
66
|
+
else:
|
|
67
|
+
print("انتهت الصلاحية")
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### بدون رسائل
|
|
71
|
+
```python
|
|
72
|
+
shlhom.check("2027-06-09", show_info=False)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## الترخيص
|
|
76
|
+
|
|
77
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
requests>=2.25.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
shlhom
|
shlhom-1.0.0/shlhom.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import time
|
|
3
|
+
import email.utils
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
try:
|
|
7
|
+
import requests
|
|
8
|
+
except ImportError:
|
|
9
|
+
print("pip install requests")
|
|
10
|
+
sys.exit(1)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
__version__ = "1.0.0"
|
|
14
|
+
__author__ = "shlhom"
|
|
15
|
+
__all__ = ["check", "lock", "get_real_time"]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def get_real_time():
|
|
19
|
+
for url in ["https://www.google.com", "https://www.cloudflare.com"]:
|
|
20
|
+
try:
|
|
21
|
+
r = requests.get(url, timeout=5)
|
|
22
|
+
dt = email.utils.parsedate_to_datetime(r.headers["Date"])
|
|
23
|
+
return dt.timestamp()
|
|
24
|
+
except Exception:
|
|
25
|
+
continue
|
|
26
|
+
return None
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def check(expiry_date, exit_on_fail=True, show_info=True):
|
|
30
|
+
try:
|
|
31
|
+
exp = datetime.strptime(expiry_date, "%Y-%m-%d").timestamp()
|
|
32
|
+
except ValueError:
|
|
33
|
+
print(f"✗ تاريخ غير صالح: {expiry_date}")
|
|
34
|
+
if exit_on_fail:
|
|
35
|
+
sys.exit(1)
|
|
36
|
+
return False
|
|
37
|
+
|
|
38
|
+
real = get_real_time()
|
|
39
|
+
if real is None:
|
|
40
|
+
print("✗ لا اتصال بالإنترنت")
|
|
41
|
+
if exit_on_fail:
|
|
42
|
+
sys.exit(1)
|
|
43
|
+
return False
|
|
44
|
+
|
|
45
|
+
if abs(real - time.time()) > 60:
|
|
46
|
+
print("✗ تلاعب بالوقت")
|
|
47
|
+
if exit_on_fail:
|
|
48
|
+
sys.exit(1)
|
|
49
|
+
return False
|
|
50
|
+
|
|
51
|
+
if real > exp:
|
|
52
|
+
print(f"✗ انتهت الصلاحية: {expiry_date}")
|
|
53
|
+
if exit_on_fail:
|
|
54
|
+
sys.exit(1)
|
|
55
|
+
return False
|
|
56
|
+
|
|
57
|
+
if show_info:
|
|
58
|
+
print(f"✓ صالح حتى: {expiry_date}")
|
|
59
|
+
return True
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def lock(d, **kw):
|
|
63
|
+
return check(d, **kw)
|