OWTF takes few steps to start #638

Closed
RahulPratapSingh opened this Issue Mar 26, 2016 · 6 comments

Comments

Projects
None yet
4 participants
@RahulPratapSingh
Contributor

RahulPratapSingh commented Mar 26, 2016

Everytime, I restart my VM, it takes few steps to start OWTF like changing directory, go to scripts and then run scripts. It's a kind of little lengthy process, and tiredsome.

Expected Behavior

It should start in 1 or 2 steps without much efforts of end user.

Current Behavior

Takes multiple steps to start, after VM restart.

Possible Solution

Little changes in the codebase results in the following output.
screenshot from 2016-03-27 00 08 15

Steps to Reproduce (for bugs)

  1. Restart VM with kali installed in it.
  2. Start OWTF

screenshot from 2016-03-26 23 53 23

Your Environment

  • Installation method used: Automatic
  • Version/branch used: Develop
  • Operating System and version (like Kali, Debian, ArchLinux, etc): Tested in kali Linux & Parrot OS
  • pip/setuptools version: 8.1.1
  • sudo access: Yes
@sachinkamath

This comment has been minimized.

Show comment
Hide comment
@sachinkamath

sachinkamath Mar 27, 2016

Contributor

This is something to be taken care at the system level IMO. OWTF is already slow w.ref to the start time as mentioned in #387. Adding a script to check pg status will only increase the loadtime of owtf.py

Contributor

sachinkamath commented Mar 27, 2016

This is something to be taken care at the system level IMO. OWTF is already slow w.ref to the start time as mentioned in #387. Adding a script to check pg status will only increase the loadtime of owtf.py

@RahulPratapSingh

This comment has been minimized.

Show comment
Hide comment
@RahulPratapSingh

RahulPratapSingh Mar 27, 2016

Contributor

I haven't added any new script to check for pg status. It's already checked by OWTF at the starting. Just added few lines of code there. So, I don't think, it will significantly increase loadtime.

Contributor

RahulPratapSingh commented Mar 27, 2016

I haven't added any new script to check for pg status. It's already checked by OWTF at the starting. Just added few lines of code there. So, I don't think, it will significantly increase loadtime.

@viyatb

This comment has been minimized.

Show comment
Hide comment
@viyatb

viyatb Apr 1, 2016

Member

How does the possible fix you mention fix the problem?

Everytime, I restart my VM, it takes few steps to start OWTF like changing directory, go to scripts and then run scripts. It's a kind of little lengthy process, and tiredsome.

Member

viyatb commented Apr 1, 2016

How does the possible fix you mention fix the problem?

Everytime, I restart my VM, it takes few steps to start OWTF like changing directory, go to scripts and then run scripts. It's a kind of little lengthy process, and tiredsome.

@viyatb viyatb added the Enhancement label Apr 1, 2016

@RahulPratapSingh

This comment has been minimized.

Show comment
Hide comment
@RahulPratapSingh

RahulPratapSingh Apr 8, 2016

Contributor

@delta24 I just called both the files i.e start_postgres.sh and db_run.sh as required to start services. These are called when the current exception handling ask user to manually start service in files db_run.sh and db.py respectively.

  File: db_run.sh Line: 87
      
  if [ "$status_exitcode" != "0" ]; then
            # echo "[+] Starting failed because postgreSQL service is not available!"
            # echo "[+] Run # sh scripts/start_postgres.sh and rerun this script"
            bash scripts/start_postgres.sh
            echo "[+] All services started. Restart ./owtf.py"          
            exit 1 
  File: db.py Line: 159
             
              except:
                      try:
                            call("scripts/db_run.sh")
                      except KeyboardInterrupt:
                            print "\n[+] OWTF is aborted by the user"
Contributor

RahulPratapSingh commented Apr 8, 2016

@delta24 I just called both the files i.e start_postgres.sh and db_run.sh as required to start services. These are called when the current exception handling ask user to manually start service in files db_run.sh and db.py respectively.

  File: db_run.sh Line: 87
      
  if [ "$status_exitcode" != "0" ]; then
            # echo "[+] Starting failed because postgreSQL service is not available!"
            # echo "[+] Run # sh scripts/start_postgres.sh and rerun this script"
            bash scripts/start_postgres.sh
            echo "[+] All services started. Restart ./owtf.py"          
            exit 1 
  File: db.py Line: 159
             
              except:
                      try:
                            call("scripts/db_run.sh")
                      except KeyboardInterrupt:
                            print "\n[+] OWTF is aborted by the user"
@DePierre

This comment has been minimized.

Show comment
Hide comment
@DePierre

DePierre Apr 19, 2016

Contributor

@RahulPratapSingh So basically, the extra step is that postgresql is not starting when your VM is booting?

If that is the case, then simply add it to your startup configuration, using systemctl for instance:

sudo systemctl enable postgresql.service

Then, you don't need to run db_run.sh but only owtf.py.

IMO, OWTF should not start postgresql on startup but let the user configure his system.

@sachinkamath I don't think that it would be a problem of efficiency if we forced OWTF to run postgresql server if not started. However, I don't believe that it should be doing that and instead let the user deal with his services/daemons configuration.

@delta24 Thought?

Contributor

DePierre commented Apr 19, 2016

@RahulPratapSingh So basically, the extra step is that postgresql is not starting when your VM is booting?

If that is the case, then simply add it to your startup configuration, using systemctl for instance:

sudo systemctl enable postgresql.service

Then, you don't need to run db_run.sh but only owtf.py.

IMO, OWTF should not start postgresql on startup but let the user configure his system.

@sachinkamath I don't think that it would be a problem of efficiency if we forced OWTF to run postgresql server if not started. However, I don't believe that it should be doing that and instead let the user deal with his services/daemons configuration.

@delta24 Thought?

@viyatb

This comment has been minimized.

Show comment
Hide comment
@viyatb

viyatb Apr 19, 2016

Member

@DePierre Same. OWTF should not concern with the system configuration.

Member

viyatb commented Apr 19, 2016

@DePierre Same. OWTF should not concern with the system configuration.

@DePierre DePierre added the won't-fix label Apr 19, 2016

@DePierre DePierre closed this Apr 19, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment