Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help
#1
Hi All,

Please go easy on me, I am new to this and I have never programmed/scripted before.

I am trying to learn python, and really struggling with it... can anyone help me with the following, that I can't seem to get running:
#################
# Main Function #
#################
def main():
print ('Welcome to the Network analysis tool')
userInput = input ('What would you like to do: ')

if userInput == '-p' or '--passive':
#then run in passive mode
# elif userInput == '-a' or '--active':
#then run in active mode
#else
# help():

main()

When I try to run it, I get:
File "./net_recon.py", line 27
main()
^
IndentationError: expected an indented block
I have indented main() and get the same thing....

Thanks, C.
Reply


Messages In This Thread
Help - by virtual_claude - Oct-25-2020, 02:24 PM
RE: Help - by jefsummers - Oct-25-2020, 04:19 PM
RE: Help - by virtual_claude - Oct-26-2020, 01:57 PM
RE: Help - by jefsummers - Oct-26-2020, 09:11 PM
RE: Help - by virtual_claude - Oct-28-2020, 07:49 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020