Skip to content

Made it possible to let the agent use system binaries if exists#64

Merged
jessevz merged 3 commits intomasterfrom
fix-1052
Mar 3, 2026
Merged

Made it possible to let the agent use system binaries if exists#64
jessevz merged 3 commits intomasterfrom
fix-1052

Conversation

@jessevz
Copy link
Collaborator

@jessevz jessevz commented Dec 23, 2025

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request enables the agent to use system binaries (e.g., 7zr, uftpd) if they exist in the system PATH, falling back to local binaries in the current working directory. This addresses issue #1052 by adding flexibility in binary location management.

Key changes:

  • Introduced a new retrieveBinary function that prioritizes local binaries and falls back to system binaries
  • Replaced platform-specific (Windows/Linux) binary path logic with unified calls to retrieveBinary
  • Simplified binary extraction commands by removing OS-specific conditional logic

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 11 comments.

File Description
htpclient/helpers.py Added new retrieveBinary function to locate binaries from local directory or system PATH; updated start_uftpd to use this function
htpclient/files.py Replaced OS-specific 7zr path logic with retrieveBinary call for file extraction
htpclient/binarydownload.py Updated binary checks and extraction commands across multiple methods (prince, preprocessor, cracker version) to use retrieveBinary instead of OS-specific path logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

return ansi_escape.sub('', line)

# function to retrieve a system or local binary.
def retrieveBinary(binary):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this, we use snake case in almost all other function names.

@jessevz jessevz requested a review from s3inlc March 3, 2026 06:21
@jessevz jessevz merged commit a5b345d into master Mar 3, 2026
@jessevz jessevz deleted the fix-1052 branch March 3, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT]: Agent dies with exception FileNotFoundError: [Errno 2] No such file or directory: '7zr'

3 participants