Skip to content

Conversation

@atucom
Copy link
Contributor

This fixes issue #104. Appears the problem arose when you tried to add multiple single hosts, exit the tool, start it up again, and then view. My own testing showed it was a reliable bug, not dependent on the IP used:
[+] loading gathered hosts from '['1.1.1.1\n', '1.1.1.2\n', '1.1.1.3\n']'
Traceback (most recent call last):
File "autosploit.py", line 5, in
main()
File "/root/Null-AutoSploit/autosploit/main.py", line 58, in main
terminal.terminal_main_display(loaded_exploits)
File "/root/Null-AutoSploit/lib/term/terminal.py", line 273, in terminal_main_display
self.view_gathered_hosts()
File "/root/Null-AutoSploit/lib/term/terminal.py", line 73, in view_gathered_hosts
with open(self.host_path) as hosts:
TypeError: coercing to Unicode: need string or buffer, list found

This pull request fixes the issue:

root@autosploit# 5

[+] loading gathered hosts from '/root/AutoSploit/hosts.txt'
[+] 1.1.1.1
[+] 1.1.1.2
[+] 1.1.1.3

The try except block was overriding the path var with the contents of the folder causing errors further down. Changed to just check for proper opening of the file.
@ehlewis
Copy link
Contributor

This needs to be requested to merge into dev-beta not master

@atucomatucom changed the base branch from master to dev-betaMarch 26, 2018 15:32
@EkultekEkultek self-requested a review March 26, 2018 15:52
@EkultekEkultek merged commit 9a8a672 into NullArray:dev-betaMar 26, 2018
@EkultekEkultek mentioned this pull request Mar 26, 2018
@atucomatucom deleted the bugFix_unicode_hosts branch March 26, 2018 15:58
Sign up for freeto 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.

3 participants

@atucom@ehlewis@Ekultek