zblurx / dploot

DPAPI looting remotely and locally in Python
MIT License
420 stars 55 forks source link

[dploot Kali Packaging] SyntaxWarning: invalid escape sequence #16

Closed Arszilla closed 7 months ago

Arszilla commented 8 months ago

Hey @zblurx,

While packaging and testing the provisional python3-dploot package, I noticed the Debian throwing SyntaxWarning for the following files/lines:

I wanted to bring this to your attention to see if this is something fixable.

$ sudo apt install ./python3-dploot_2.6.0-0kali2_amd64.deb 

[...]

/usr/lib/python3/dist-packages/dploot/triage/sccm.py:90: SyntaxWarning: invalid escape sequence '\['
  regex_naa = b"CCM_NetworkAccessAccount.*<PolicySecret Version=\"1\"><!\[CDATA\[(.*?)\]\]><\/PolicySecret>.*<PolicySecret Version=\"1\"><!\[CDATA\[(.*?)\]\]><\/PolicySecret>"
/usr/lib/python3/dist-packages/dploot/triage/sccm.py:91: SyntaxWarning: invalid escape sequence '\['
  regex_task = b"</SWDReserved>.*<PolicySecret Version=\"1\"><!\[CDATA\[(.*?)\]\]><\/PolicySecret>"
/usr/lib/python3/dist-packages/dploot/triage/sccm.py:92: SyntaxWarning: invalid escape sequence '\['
  regex_collection = b"CCM_CollectionVariable\x00\x00(.*?)\x00\x00.*<PolicySecret Version=\"1\"><!\[CDATA\[(.*?)\]\]><\/PolicySecret>"
/usr/lib/python3/dist-packages/dploot/triage/sccm.py:117: SyntaxWarning: invalid escape sequence '\['
  regex = "<PolicySecret Version=\"1\"><!\[CDATA\[(.*?)\]\]><\/PolicySecret>"

[...]

If it is, would it be possible to post the fix under tag 2.6.1?

zblurx commented 7 months ago

Hey, thanks for reporting this. Fixed in release 2.6.1.

Arszilla commented 7 months ago

Confirmed it's fixed :)

$ sudo apt install ./python3-dploot_2.6.1-0kali1_amd64.deb 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'python3-dploot' instead of './python3-dploot_2.6.1-0kali1_amd64.deb'
The following NEW packages will be installed:
  python3-dploot
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/36.4 kB of archives.
After this operation, 265 kB of additional disk space will be used.
Get:1 /home/kali/Downloads/python3-dploot_2.6.1-0kali1_amd64.deb python3-dploot amd64 2.6.1-0kali1 [36.4 kB]
Selecting previously unselected package python3-dploot.
(Reading database ... 404228 files and directories currently installed.)
Preparing to unpack .../python3-dploot_2.6.1-0kali1_amd64.deb ...
Unpacking python3-dploot (2.6.1-0kali1) ...
Setting up python3-dploot (2.6.1-0kali1) ...
Processing triggers for kali-menu (2023.4.7) ...
N: Download is performed unsandboxed as root as file '/home/kali/Downloads/python3-dploot_2.6.1-0kali1_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

Thanks for the swift fix!