Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement] Add feature option --port #52

Merged
merged 3 commits into from
Jun 22, 2024

Conversation

StopThatTalace
Copy link
Contributor

@StopThatTalace StopThatTalace commented Jun 22, 2024

Hello there ! :)

Here's my PR for the issue #51

Add :
[+] Option --port (Default value 445)

Usage :
smbclient-ng -u toto -p toto --target 10.10.10.10 --port 4455

Help :
2024-06-22_12h40_58

Hope this help !

Default value to 445
@p0dalirius p0dalirius changed the title [enhancement] add feature option --port [enhancement] Add feature option --port Jun 22, 2024
@p0dalirius
Copy link
Owner

Hi,

Thank you for this pull request!
I gave a quick look at your code in the train and I think there might be a type problem.

In __main__.py you added the argument port of type string, which conflicts with your change in SMBSession.py line 99 where by adding self.port you removed the casting to int.

  • Can you cast self.port to int in the line 99 of SMBSession.py?
  • Can you modify the type of the argument in the parser in __main__.py to set it to type=int ?

Correct me if I'm wrong, I will test it this evening :)

Best regards,

@StopThatTalace
Copy link
Contributor Author

Hey!

So the type problem is handled in the init of the class. I cast it into an int in the init of the class here:

2024-06-22_13h44_06

That's why it is not raising any error/warning at the moment.

That being said:
[+] The arg type will be updated to an INT
[+] I'll move the cast from the init to where it was initially

Best regards and have a great train ride! ;)

@p0dalirius
Copy link
Owner

Alright thank you!

Merging

@p0dalirius p0dalirius merged commit 2bd4e5b into p0dalirius:main Jun 22, 2024
2 checks passed
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.

2 participants