Skip to content

Instantly share code, notes, and snippets.

@mainframed
Created May 6, 2017 21:34
Show Gist options
  • Save mainframed/381724f4537b1e893d66a206e4ab1d9b to your computer and use it in GitHub Desktop.
Save mainframed/381724f4537b1e893d66a206e4ab1d9b to your computer and use it in GitHub Desktop.
import tn3270lib,time,sys
# This requires the tn3270lib library available here: https://github.com/zedsec390/tn3270lib
host = sys.argv[1]
port = int(sys.argv[2])
print "Simple Python Script to find LUs"
# Copyright Philip Young
tn3270 = tn3270lib.TN3270()
for i in range(0,99):
# Change 'CICSLU' to whatever your LU is
lu = 'CICSLU' + "{0:0>2}".format(i)
tn3270.set_LU(lu)
if tn3270.initiate(host,port):
print lu,": True"
else:
print lu,": False"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment