Skip to content

Commit 68fc136

Browse files
committed
Added arch detection
1 parent 9589cb0 commit 68fc136

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

flashsploit.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ def win():
6767
elif win_choice == '':
6868
pass
6969
elif win_choice == 'exit' or win_choice == 'quit':
70-
subp.call(['systemctl', 'stop', 'ssh.service'])
70+
distro = os.system('uname -r')
71+
if 'ARCH' in distro:
72+
subp.call(['systemctl', 'stop', 'sshd.service'])
73+
else:
74+
subp.call(['systemctl', 'stop', 'ssh.service'])
7175
subp.call(['pkill', 'php'])
7276
exit()
7377
else:
@@ -79,5 +83,9 @@ def win():
7983
main()
8084
except KeyboardInterrupt:
8185
print(R + '[-]' + C + ' Keyboard Interrupt.' + W)
82-
subp.call(['systemctl', 'stop', 'ssh.service'])
86+
distro = os.system('uname -r')
87+
if 'ARCH' in distro:
88+
subp.call(['systemctl', 'stop', 'sshd.service'])
89+
else:
90+
subp.call(['systemctl', 'stop', 'ssh.service'])
8391
subp.call(['pkill', 'php'])

0 commit comments

Comments
 (0)