diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 084515ca..8bbfac59 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,7 +1,7 @@ # These are supported funding model platforms github: # Replace with up to 4 GitHubSponsors-enabled usernames e.g., [user1, user2] -patreon: evilsocket +patreon: pwnagotchi-torch open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel diff --git a/builder/data/usr/bin/pwnlib b/builder/data/usr/bin/pwnlib index 23827206..4e78adf6 100755 --- a/builder/data/usr/bin/pwnlib +++ b/builder/data/usr/bin/pwnlib @@ -79,12 +79,12 @@ is_auto_mode() { # if usb0 is up, we're in MANU if is_interface_up usb0; then - return 1 + return 0 fi # if eth0 is up (for other boards), we're in MANU if is_interface_up eth0; then - return 1 + return 0 fi # no override, but none of the interfaces is up -> AUTO @@ -105,12 +105,12 @@ is_auto_mode_no_delete() { # if usb0 is up, we're in MANU if is_interface_up usb0; then - return 1 + return 0 fi # if eth0 is up (for other boards), we're in MANU if is_interface_up eth0; then - return 1 + return 0 fi # no override, but none of the interfaces is up -> AUTO diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 167c71a4..8368dc25 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -90,6 +90,7 @@ - libbz2-dev - libc-ares-dev - libc6-dev + - libcap-dev - libdbus-1-dev - libdbus-glib-1-dev - libeigen3-dev diff --git a/pwnagotchi/ai/__init__.py b/pwnagotchi/ai/__init__.py index ad41fc10..b5821819 100644 --- a/pwnagotchi/ai/__init__.py +++ b/pwnagotchi/ai/__init__.py @@ -21,18 +21,15 @@ def load(config, agent, epoch, from_disk=True): SB_BACKEND = "stable_baselines3" try: - from stable_baselines3 import A2C + from baselines.common.vec_env import DummyVecEnv + from baselines.a2c import a2c logging.debug("[ai] A2C imported in %.2fs" % (time.time() - start)) start = time.time() - from stable_baselines3.a2c import MlpPolicy + from baselines.a2c.policies import MlpPolicy logging.debug("[ai] MlpPolicy imported in %.2fs" % (time.time() - start)) SB_A2C_POLICY = MlpPolicy - start = time.time() - from stable_baselines3.common.vec_env import DummyVecEnv - logging.debug("[ai] DummyVecEnv imported in %.2fs" % (time.time() - start)) - except Exception as e: logging.debug("[ai] stable_baselines3 not accessible. Trying stable_baselines") diff --git a/pwnagotchi/ai/parameter.py b/pwnagotchi/ai/parameter.py index 79f464c5..414129b7 100644 --- a/pwnagotchi/ai/parameter.py +++ b/pwnagotchi/ai/parameter.py @@ -10,7 +10,7 @@ class Parameter(object): self.min_value = min_value self.max_value = max_value + 1 - # gym.space.Discrete is within [0, 1, 2, ..., n-1] + # gymnasium.space.Discrete is within [0, 1, 2, ..., n-1] if self.min_value < 0: self.scale_factor = abs(self.min_value) elif self.min_value > 0: