exploitfarm 1.2.2__tar.gz → 1.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 (43) hide show
  1. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/PKG-INFO +2 -3
  2. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/README.md +1 -2
  3. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/__init__.py +1 -1
  4. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/_init_exposed.py +19 -11
  5. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm.egg-info/PKG-INFO +2 -3
  6. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/setup.py +1 -1
  7. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/MANIFEST.in +0 -0
  8. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/__main__.py +0 -0
  9. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/models/__init__.py +0 -0
  10. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/models/client.py +0 -0
  11. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/models/dbtypes.py +0 -0
  12. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/models/enums.py +0 -0
  13. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/models/exploit.py +0 -0
  14. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/models/flags.py +0 -0
  15. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/models/groups.py +0 -0
  16. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/models/response.py +0 -0
  17. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/models/service.py +0 -0
  18. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/models/submitter.py +0 -0
  19. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/models/teams.py +0 -0
  20. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/tui/__init__.py +0 -0
  21. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/tui/config.py +0 -0
  22. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/tui/exploitdownload.py +0 -0
  23. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/tui/exploitinit.py +0 -0
  24. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/tui/group_prejoin.py +0 -0
  25. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/tui/group_select.py +0 -0
  26. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/tui/login.py +0 -0
  27. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/tui/shared_attack_group.py +0 -0
  28. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/tui/startxploit.py +0 -0
  29. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/utils/__init__.py +0 -0
  30. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/utils/cmd.py +0 -0
  31. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/utils/config.py +0 -0
  32. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/utils/exploit.py +0 -0
  33. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/utils/reqs.py +0 -0
  34. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/utils/windows_close_fix.py +0 -0
  35. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/xfarm.py +0 -0
  36. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm/xploit.py +0 -0
  37. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm.egg-info/SOURCES.txt +0 -0
  38. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm.egg-info/dependency_links.txt +0 -0
  39. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm.egg-info/requires.txt +0 -0
  40. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/exploitfarm.egg-info/top_level.txt +0 -0
  41. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/requirements.txt +0 -0
  42. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/setup.cfg +0 -0
  43. {exploitfarm-1.2.2 → exploitfarm-1.2.4}/xfarm +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: exploitfarm
3
- Version: 1.2.2
3
+ Version: 1.2.4
4
4
  Summary: Exploit Farm client
5
5
  Home-page: https://github.com/pwnzer0tt1/exploitfarm
6
6
  Author: Pwnzer0tt1
@@ -108,7 +108,7 @@ store = Store()
108
108
  # Set a value
109
109
  store.set("example_key", {"example": "data"})
110
110
 
111
- # Get a value
111
+ # Get a value (if not exists returns None)
112
112
  data = store.get("example_key")
113
113
  print(data)
114
114
 
@@ -393,4 +393,3 @@ Environment variables can simplify configuration:
393
393
  1. Use `--test` to verify exploits before running them in production.
394
394
  2. Regularly push changes to the server for version control (they are auto-pushed on attack start anyway).
395
395
  3. Collaborate using attack groups for efficient resource utilization if the attack is heavy to execute.
396
-
@@ -71,7 +71,7 @@ store = Store()
71
71
  # Set a value
72
72
  store.set("example_key", {"example": "data"})
73
73
 
74
- # Get a value
74
+ # Get a value (if not exists returns None)
75
75
  data = store.get("example_key")
76
76
  print(data)
77
77
 
@@ -356,4 +356,3 @@ Environment variables can simplify configuration:
356
356
  1. Use `--test` to verify exploits before running them in production.
357
357
  2. Regularly push changes to the server for version control (they are auto-pushed on attack start anyway).
358
358
  3. Collaborate using attack groups for efficient resource utilization if the attack is heavy to execute.
359
-
@@ -1,5 +1,5 @@
1
1
 
2
- __version__ = "1.2.2" if "{" not in "1.2.2" else "0.0.0"
2
+ __version__ = "1.2.4" if "{" not in "1.2.4" else "0.0.0"
3
3
 
4
4
  from exploitfarm.utils import try_tcp_connection
5
5
  from exploitfarm.models.enums import AttackMode, SetupStatus, FlagStatus
@@ -17,6 +17,7 @@ from exploitfarm.utils.reqs import (
17
17
  check_req,
18
18
  get_session,
19
19
  )
20
+ from requests import Session
20
21
  import re
21
22
 
22
23
  os_windows = os.name == "nt"
@@ -150,7 +151,7 @@ class Store:
150
151
  if not self.exploit_id:
151
152
  raise ValueError("this exploit has to be run with xfarm")
152
153
  self.login_token = os.getenv("XFARM_LOGIN_TOKEN", None)
153
- self.session = get_session(self.login_token)
154
+ self.session: Session = get_session(self.login_token)
154
155
 
155
156
  def _keycheck(self, key: str):
156
157
  if not isinstance(key, str):
@@ -162,17 +163,24 @@ class Store:
162
163
  "key must only contain alphanumeric characters, dashes, underscores and dots"
163
164
  )
164
165
 
165
- def get_bytes(self, key: str, timeout: int = HTTP_TIMEOUT) -> bytes:
166
+ def get_bytes(self, key: str, default=None, timeout: int = HTTP_TIMEOUT) -> bytes:
166
167
  self._keycheck(key)
167
- return check_req(
168
- self.session.get(
169
- urljoin(self.base_url, f"exploits/{self.exploit_id}/store/key/{key}"),
170
- timeout=timeout,
171
- )
172
- ).content
173
-
174
- def get(self, key: str, timeout: int = HTTP_TIMEOUT) -> bytes:
175
- return pickle.loads(self.get_bytes(key, timeout))
168
+ r = self.session.get(
169
+ urljoin(self.base_url, f"exploits/{self.exploit_id}/store/key/{key}"),
170
+ timeout=timeout,
171
+ )
172
+ if r.status_code == 404:
173
+ return default
174
+ return check_req(r).content
175
+
176
+ def get(self, key: str, default=None, timeout: int = HTTP_TIMEOUT) -> bytes:
177
+ class TmpNotFound:
178
+ pass
179
+
180
+ data = self.get_bytes(key, default=TmpNotFound, timeout=timeout)
181
+ if data == TmpNotFound:
182
+ return default
183
+ return pickle.loads(data)
176
184
 
177
185
  def set_bytes(self, key: str, value: bytes, timeout: int = HTTP_TIMEOUT):
178
186
  self._keycheck(key)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: exploitfarm
3
- Version: 1.2.2
3
+ Version: 1.2.4
4
4
  Summary: Exploit Farm client
5
5
  Home-page: https://github.com/pwnzer0tt1/exploitfarm
6
6
  Author: Pwnzer0tt1
@@ -108,7 +108,7 @@ store = Store()
108
108
  # Set a value
109
109
  store.set("example_key", {"example": "data"})
110
110
 
111
- # Get a value
111
+ # Get a value (if not exists returns None)
112
112
  data = store.get("example_key")
113
113
  print(data)
114
114
 
@@ -393,4 +393,3 @@ Environment variables can simplify configuration:
393
393
  1. Use `--test` to verify exploits before running them in production.
394
394
  2. Regularly push changes to the server for version control (they are auto-pushed on attack start anyway).
395
395
  3. Collaborate using attack groups for efficient resource utilization if the attack is heavy to execute.
396
-
@@ -6,7 +6,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
6
6
  with open('requirements.txt', 'r', encoding='utf-8') as f:
7
7
  required = [ele.strip() for ele in f.read().splitlines() if not ele.strip().startswith("#") and ele.strip() != ""]
8
8
 
9
- VERSION = "1.2.2"
9
+ VERSION = "1.2.4"
10
10
 
11
11
  setuptools.setup(
12
12
  name="exploitfarm",
File without changes
File without changes
File without changes