GithubHelp home page GithubHelp logo

Comments (10)

seanrclayton avatar seanrclayton commented on September 27, 2024 3

So my code is a workaround. Not going to do a pull request. Here is how i got it to work.
in def get_port_list
i added

def get_port_list(self, nmap_result_file, rhost):

      cool = open(nmap_result_file).read()
      ....

then changed the bs variable to:
bs = BeautifulSoup(cool, 'lxml')

from machine_learning_security.

tarihub avatar tarihub commented on September 27, 2024 1

@Pluto0310
I may found out the reason. Looking care of the nmap output xml file, we will see that none all of the <port ...></port> field include <service>.

Let's see DeepExploit.py #L922, if some port exclude <service>, the info_list would not append an element. So we would get the tip of "IndexError: list index out of range"

the solve way is add three lines before here as follow:

else:
    info_list.append('unknown')

after modify it, it likes:

                for obj_child in port.contents:
                    if obj_child.name == 'service':
                        temp_info = ''
                        if 'product' in obj_child.attrs:
                            temp_info += obj_child.attrs['product'] + ' '
                        if 'version' in obj_child.attrs:
                            temp_info += obj_child.attrs['version'] + ' '
                        if 'extrainfo' in obj_child.attrs:
                            temp_info += obj_child.attrs['extrainfo']
                        if temp_info != '':
                            info_list.append(temp_info)
                        else:
                            info_list.append('unknown')
                        break
                else:
                    info_list.append('unknown')
                # Display getting port information.
                self.util.print_message(const.OK, 'Getting {}/{} info: {}'.format(str(port.attrs['portid']),
                                                                                  port.attrs['protocol'],
                                                                                  info_list[idx]))

After modified:
image

from machine_learning_security.

geniusKoder avatar geniusKoder commented on September 27, 2024

Ok I somehow managed to get it working, exploits are successful but no report is generated at the end of it

from machine_learning_security.

geniusKoder avatar geniusKoder commented on September 27, 2024

From what I see, it seems to be prematurely shutting down. Would love to work on a fix with admin. Thank you!

[*] Start time: 2019/05/05 07:07:48
[*] Port scanning: 192.168.234.2 [Elapsed time: 0 s]
[*] Executing keep_alive..
[*] End time  : 2019/05/05 07:07:55
[+] Get port list from nmap_result_192.168.234.2.xml.
[!] No open port.
[!] Shutdown Deep Exploit...

from machine_learning_security.

wan721 avatar wan721 commented on September 27, 2024

Hi,
I have the same problem. The result from Metasploit is generated correctly, i can see that the nmap_result_<ip_address>.xml file contains some open ports. But somehow DeepExploit can't seem to locate that file (or it's not downloading that xml file correctly and therefore couldn't find it?). I can see that the demo video starts from nmap had already been performed and skipped the nmap stage entirely.
I tried to manually copy the result xml file to the same directory that ran DeepExploit.py to no avail.
Couldn't this be a known issue and require fixing?
Thank you.

from machine_learning_security.

Pluto0310 avatar Pluto0310 commented on September 27, 2024

So my code is a workaround. Not going to do a pull request. Here is how i got it to work.
in def get_port_list
i added

def get_port_list(self, nmap_result_file, rhost):

      cool = open(nmap_result_file).read()
      ....

then changed the bs variable to:
bs = BeautifulSoup(cool, 'lxml')

and i got this error
Traceback (most recent call last):
File "DeepExploit.py", line 2230, in
com_port_list, proto_list, info_list = env.get_port_list(nmap_result, env.rhost)
File "DeepExploit.py", line 938, in get_port_list
info_list[idx]))
IndexError: list index out of range
How can i fix this problem
thank you

from machine_learning_security.

skyghost66 avatar skyghost66 commented on September 27, 2024

Hello I have the same issue and I add change in the code like @seanrclayton said but I get the same error! @seanrclayton can you please share your code from that function how it's look like, I really appreciate thank you!

from machine_learning_security.

antdzek avatar antdzek commented on September 27, 2024

@TARI0510 that works for me, thanks!

from machine_learning_security.

tarihub avatar tarihub commented on September 27, 2024

@TARI0510 that works for me, thanks!

It's great to help you~

from machine_learning_security.

XUPillar avatar XUPillar commented on September 27, 2024

微信截图_20220305120354
how to solve this problem

from machine_learning_security.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.