D3vil0p3r / htb-toolkit

Play Hack The Box directly on your system.
GNU General Public License v3.0
38 stars 4 forks source link

Flag Submission Fails with panic #2

Closed Ar1ste1a closed 1 year ago

Ar1ste1a commented 1 year ago

When submitting a flag for any box I receive the following error:

thread 'main' panicked at src/types.rs:284:63:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Details: 6.5.9-arch2-1

Linux 6.5.9-arch2-1 #1 SMP PREEMPT_DYNAMIC Thu, 26 Oct 2023 00:52:20 +0000 x86_64 GNU/Linux

sudo pacman -Qs htb-toolkit
local/htb-toolkit 54.af9baad-1
    Play Hack The Box machines directly on your system.
D3vil0p3r commented 1 year ago

Can you run pacman -Qs gnome-keyring and provide me the output?

Ar1ste1a commented 1 year ago

Can you run pacman -Qs gnome-keyring and provide me the output?

Apologies this is my first time using the tool, I am using KDE and it has its own keyring I bet you that is the issue then! Is there a way to select a keyring to use for this?

D3vil0p3r commented 1 year ago

Can you run pacman -Qs gnome-keyring and provide me the output?

Apologies this is my first time using the tool, I am using KDE and it has its own keyring I bet you that is the issue then! Is there a way to select a keyring to use for this?

libsecret relies on gnome-keyring, even if you use KDE or other Desktop Environments or Window Managers. Install gnome-keyring, reset your App Token by htb-toolkit -k reset by adding your valid App Token, and try again to submit the flag. Meanwhile I update the README and the package deps.

Ar1ste1a commented 1 year ago

Thanks! I followed your steps but I am still receiving the same error

sudo pacman -Sy gnome-keyring
:: Synchronizing package databases...
 athena-repository                            84.3 KiB   869 KiB/s 00:00 [----------------------------------------] 100%
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
 chaotic-aur                                   2.6 MiB  4.14 MiB/s 00:01 [----------------------------------------] 100%
 blackarch                                     4.0 MiB  2.43 MiB/s 00:02 [----------------------------------------] 100%
resolving dependencies...
looking for conflicting packages...

Package (1)          New Version  Net Change  Download Size

extra/gnome-keyring  1:42.1-3       3.55 MiB       0.75 MiB

Total Download Size:   0.75 MiB
Total Installed Size:  3.55 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 gnome-keyring-1:42.1-3-x86_64               771.5 KiB  4.92 MiB/s 00:00 [----------------------------------------] 100%
(1/1) checking keys in keyring                                           [----------------------------------------] 100%
(1/1) checking package integrity                                         [----------------------------------------] 100%
(1/1) loading package files                                              [----------------------------------------] 100%
(1/1) checking for file conflicts                                        [----------------------------------------] 100%
(1/1) checking available disk space                                      [----------------------------------------] 100%
:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 35
:: Processing package changes...
(1/1) installing gnome-keyring                                           [----------------------------------------] 100%
Created symlink /etc/systemd/user/sockets.target.wants/gnome-keyring-daemon.socket → /usr/lib/systemd/user/gnome-keyring-daemon.socket.
:: Running post-transaction hooks...
(1/4) Arming ConditionNeedsUpdate...
(2/4) Compiling GSettings XML schema files...
(3/4) Generating GRUB config to let grub-btrfs detect new snapshots...
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
Unmount /tmp/grub-btrfs.xQtijTOgbI .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme1n1.
done
(4/4) Performing snapper post snapshots for the following configurations...
==> root: 36

-- Snip --

htb-toolkit -k reset
Hack The Box API Key successfully deleted.
'secret-tool' command failed:

Hack The Box API Key not set. Please, insert your App Token after the 'Password' label, it will be stored in a secure keyring.
Password:
Hack The Box App Token successfully stored.

htb-toolkit -f
Did you get a flag? Please, submit it and continue your hacking path. Good Luck!
Submit the flag: <redacterd>
Specify the machine name: <redacted>
thread 'main' panicked at src/types.rs:284:63:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
D3vil0p3r commented 1 year ago

Oh... Meow.. It is a Starting Point Machine. The flag option works only with Free and Retired machines.

Ar1ste1a commented 1 year ago

Oh... Meow.. It is a Starting Point Machine. The flag option works only with Free and Retired machines.

AH ok! Ya I was just doing an easy one to test it but that makes sense, I will try a different one!

D3vil0p3r commented 1 year ago

Oh... Meow.. It is a Starting Point Machine. The flag option works only with Free and Retired machines.

AH ok! Ya I was just doing an easy one to test it but that makes sense, I will try a different one!

Sorry if I didn't implement it but it follows a different logic than the flag submission of free and retired machines.

Ar1ste1a commented 1 year ago

No apologies necessary! It's a cool application none the less, I am just figuring it all out!