Skip to content

Commit

Permalink
Merge pull request #55 from p0dalirius/fix-startup-script-config
Browse files Browse the repository at this point in the history
[bugfix] Fixed variable config.startup_script
  • Loading branch information
p0dalirius authored Jun 22, 2024
2 parents 58f3903 + a2626b0 commit 7f91439
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions smbclientng/core/InteractiveShell.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,11 @@ def __init__(self, smbSession, config):

def run(self):
# Read commands from script file first
if self.config.script:
f = open(self.config.script, 'r')
if self.config.startup_script:
f = open(self.config.startup_script, 'r')
for line in f.readlines():
try:
print("%s%s" % (self.__prompt(), line.strip()))
self.process_line(commandLine=line.strip())
except KeyboardInterrupt as e:
print()
Expand Down

0 comments on commit 7f91439

Please sign in to comment.