Skip to content

Commit b5b2b2a

Browse files
author
ekultek
committed
edited some minor details depnding on your OS
1 parent df45d4d commit b5b2b2a

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

autosploit/main.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def main():
3434
# according to ps aux, postgre and apache2 are the names of the services on Linux systems
3535
service_names = ("postgres", "apache2")
3636
if "darwin" in platform_running.lower():
37-
service_names = ("postgres", "apache2")
37+
service_names = ("postgres", "apachectl")
3838

3939
for service in list(service_names):
4040
while not check_services(service):
@@ -59,10 +59,13 @@ def main():
5959
except psutil.NoSuchProcess:
6060
pass
6161
else:
62+
process_start_command = "`sudo service {} start`"
63+
if "darwin" in platform_running.lower():
64+
process_start_command = "`brew services start {}`"
6265
close(
6366
"service {} is required to be started for autosploit to run successfully (you can do it manually "
64-
"by using the command `sudo service {} start`), exiting".format(
65-
service.title(), service
67+
"by using the command {}), exiting".format(
68+
service.title(), process_start_command.format(service)
6669
)
6770
)
6871

0 commit comments

Comments
 (0)