Yes, that's why it wouldn't work!! There was no way that it would ever evaluate to true because the array is indexed by zero but the len() function doesn't work that way. Never mind, I fixed it..
6
posts
Yeah, I know that arrays are zero-indexed.
But what I don't understand is, I've got this if statement, right?
if len(sys.argv) < 1:
usage()
else:
HOST = sys.argv[1]
If I call sploit.py with no arguments, then the length of sys.argv should be 0, amirite? Which is less than one. So the first condition is true and the second part of the if statement should never be executed. Except that it is.
6
posts