Skip to content

Commit

Permalink
removed the warnings depracted decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolasfil committed Dec 18, 2024
1 parent 62fa523 commit 67190f3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions app/ctfsolver.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Requires-Dist: wheel>=0.37.0
Provides-Extra: dev
Requires-Dist: pytest>=6.2.4; extra == "dev"
Requires-Dist: twine>=3.4.2; extra == "dev"
Requires-Dist: pipdeptree>=2.0.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: pdoc3>=0.11.4; extra == "docs"

Expand Down
1 change: 1 addition & 0 deletions app/ctfsolver.egg-info/requires.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ wheel>=0.37.0
[dev]
pytest>=6.2.4
twine>=3.4.2
pipdeptree>=2.0.0

[docs]
pdoc3>=0.11.4
4 changes: 1 addition & 3 deletions app/ctfsolver/src/manager_connections.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pwn
from warnings import deprecated


class ManagerConnections:
Expand Down Expand Up @@ -56,9 +55,8 @@ def connect(self, *args, **kwargs) -> None:
elif self.conn_type == "local" and self.file:
self.conn = self.pwn.process(str(self.challenge_file), **kwargs)

@deprecated("Depracated function. Use recv_lines instead.")
def recv_menu(self, number=1, display=False, save=False):
pass
raise DeprecationWarning("Depracated function. Use recv_lines instead.")

def recv_lines(self, number=1, display=False, save=False):
"""
Expand Down
5 changes: 3 additions & 2 deletions app/ctfsolver/src/manager_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import ast
from .manager_files_pcap import ManagerFilePcap
from warnings import depracated


class ManagerFile(ManagerFilePcap):
Expand Down Expand Up @@ -208,8 +207,10 @@ def search_files(
if save:
return output

@depracated("Depracated, checkout search_for_base64_file")
def search_for_base64(self, file, *args, **kwargs):
"""
Deprecated: Use search_for_base64_file
"""
return self.search_for_base64_file(file, *args, **kwargs)

def search_for_base64_file(self, file, *args, **kwargs):
Expand Down
5 changes: 1 addition & 4 deletions build/lib/ctfsolver/src/manager_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ def connect(self, *args, **kwargs) -> None:
self.conn = self.pwn.process(str(self.challenge_file), **kwargs)

def recv_menu(self, number=1, display=False, save=False):
"""
Depracated function. Use recv_lines instead.
"""
raise DeprecationWarning("recv_menu is deprecated. Use recv_lines instead.")
raise DeprecationWarning("Depracated function. Use recv_lines instead.")

def recv_lines(self, number=1, display=False, save=False):
"""
Expand Down

0 comments on commit 67190f3

Please sign in to comment.