Forgot formatting on hostname
This commit is contained in:
parent
5f51f1afad
commit
f76f692483
|
|
@ -179,7 +179,7 @@ class sys_command():
|
||||||
if len(self.opts['triggers']) == 0:
|
if len(self.opts['triggers']) == 0:
|
||||||
if 'debug' in self.opts and self.opts['debug']:
|
if 'debug' in self.opts and self.opts['debug']:
|
||||||
print('[N] Waiting for last command to finish...')
|
print('[N] Waiting for last command to finish...')
|
||||||
if bytes(f'[root@args["hostname"] ~]#'.lower(), 'UTF-8') in output.lower():
|
if bytes(f'[root@{args["hostname"]} ~]#'.lower(), 'UTF-8') in output.lower():
|
||||||
if 'debug' in self.opts and self.opts['debug']:
|
if 'debug' in self.opts and self.opts['debug']:
|
||||||
print('[N] Last command finished, exiting subsystem.')
|
print('[N] Last command finished, exiting subsystem.')
|
||||||
alive = False
|
alive = False
|
||||||
|
|
@ -660,7 +660,7 @@ if __name__ == '__main__':
|
||||||
o = b''.join(sys_command('/usr/bin/systemd-nspawn -D /mnt -b --machine temporary', opts={'triggers' : {
|
o = b''.join(sys_command('/usr/bin/systemd-nspawn -D /mnt -b --machine temporary', opts={'triggers' : {
|
||||||
bytes(f'{args["hostname"]} login', 'UTF-8') : b'root\n',
|
bytes(f'{args["hostname"]} login', 'UTF-8') : b'root\n',
|
||||||
b'Password' : bytes(args['password']+'\n', 'UTF-8'),
|
b'Password' : bytes(args['password']+'\n', 'UTF-8'),
|
||||||
bytes(f'[root@args["hostname"] ~]#', 'UTF-8') : bytes(command+'\n', 'UTF-8'),
|
bytes(f'[root@{args["hostname"]} ~]#', 'UTF-8') : bytes(command+'\n', 'UTF-8'),
|
||||||
}, **opts}).exec())
|
}, **opts}).exec())
|
||||||
|
|
||||||
## And cleanup after out selves.. Don't want to leave any residue..
|
## And cleanup after out selves.. Don't want to leave any residue..
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue