Closed VictorUltre closed 2 years ago
I was able to solve this by updating the helper.py script and replace port 9100 with whatever you need. If I have time I will update the tool with a port flag and see if the merge gets approved.
Also note you can update the port in lpd scripts manually as well or pass with the port flag if present.
I suggest the following code which allows passing port in the target parameter in the format of addr:port
. Just a workaround which should have the fewest changes.
git diff
index fd62ec4..8709271 100644
--- a/helper.py
+++ b/helper.py
@@ -368,7 +368,12 @@ class conn(object):
and stat.S_ISCHR(os.stat(target).st_mode):
self._file = os.open(target, os.O_RDWR)
# treat target as ipv4 socket
- else: self._sock.connect((target, 9100))
+ else:
+ if ":" in target:
+ target, port = target.split(":")
+ else:
+ port = 9100
+ self._sock.connect((target, int(port)))
# close connection
def close(self, *arg):
By default the program scan on 9100 port. But i have to scan on the 9102 port. Is there a command to do this ?