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

Core/villain_core.py: host and uname default values #24

Closed
wants to merge 1 commit into from

Conversation

abuyusif01
Copy link
Contributor

Signed-off-by: abuyusif01 abubakaryusuf951@gmail.com

Sometimes the client wont give the username and hostname, especially if the terminal is not a tty. so villian will fail if it tries to get username from url_split.
This commit solves that by having a try block. if we succeed in retrieving hostname and username. then fine, else we set the default value to host, user respectively

Signed-off-by: abuyusif01 <abubakaryusuf951@gmail.com>
@t3l3machus
Copy link
Owner

Hi @abuyusif01, sorry for the huge delay. I didn't have time to monitor PRs for a long time. I already pushed a similar fix for this issue some time ago. I'm gonna close this, but if you want to appear in the contributors as this was a valid issue reported early, you can make a new PR replacing lines 1150-1158 in villain_core.py with this slightly improved version that informs the user of the undefined hostname and user. This concerns the dev branch that is ahead of main:

			try:
				Sessions_Manager.active_sessions[session_id]['Computername'] = url_split[1]
				Sessions_Manager.active_sessions[session_id]['Username'] = url_split[2]
				print_to_prompt(f'\r[{GREEN}Shell{END}] Backdoor session established on {ORANGE}{self.client_address[0]}{END}')

			except IndexError:
				Sessions_Manager.active_sessions[session_id]['Computername'] = 'Undefined'
				Sessions_Manager.active_sessions[session_id]['Username'] = 'Undefined'			
				print_to_prompt(f'\r[{GREEN}Shell{END}] Backdoor session established on {ORANGE}{self.client_address[0]}{END} (hostname and user undefined)')

@t3l3machus t3l3machus closed this Jul 24, 2024
@abuyusif01
Copy link
Contributor Author

Hi @t3l3machus

i've created a PR to the dev with the fix.

Thanks for reviewing the PR

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