old_contents: #!/usr/bin/env python
  # Designed for use with boofuzz v0.0.1-dev3
  from boofuzz import *
  
  
  def main():
      logger = FuzzLogger(fuzz_loggers=[FuzzLoggerText()])
      session = sessions.Session(sleep_time=0.0, fuzz_data_logger=logger)
  
      my_connection = SocketConnection("127.0.0.1", 8021, proto='tcp')
      target = sessions.Target(my_connection)
  
      session.add_target(target)
  
      s_initialize("user")
      s_string("USER")
      s_delim(" ")
      s_string("anonymous")
      s_static("\r\n")
  
      s_initialize("pass")
      s_string("PASS")
      s_delim(" ")
      s_string("james")
      s_static("\r\n")
  
      s_initialize("stor")
      s_string("STOR")
      s_delim(" ")
      s_string("AAAA")
      s_static("\r\n")
  
      s_initialize("retr")
      s_string("RETR")
      s_delim(" ")
      s_string("AAAA")
      s_static("\r\n")
  
      session.connect(s_get("user"))
      session.connect(s_get("user"), s_get("pass"))
      session.connect(s_get("pass"), s_get("stor"))
      session.connect(s_get("pass"), s_get("retr"))
  
      session.fuzz()
  
  
  if __name__ == "__main__":
      main()
  
new_contents: #!/usr/bin/env python
  # Designed for use with boofuzz v0.0.1-dev3
  from boofuzz import *
  
  
  def main():
      session = sessions.Session(
          target=sessions.Target(
              connection=SocketConnection("192.168.56.101", 8021, proto='tcp')))
  
      s_initialize("user")
      s_string("USER")
      s_delim(" ")
      s_string("anonymous")
      s_static("\r\n")
  
      s_initialize("pass")
      s_string("PASS")
      s_delim(" ")
      s_string("james")
      s_static("\r\n")
  
      s_initialize("stor")
      s_string("STOR")
      s_delim(" ")
      s_string("AAAA")
      s_static("\r\n")
  
      s_initialize("retr")
      s_string("RETR")
      s_delim(" ")
      s_string("AAAA")
      s_static("\r\n")
  
      session.connect(s_get("user"))
      session.connect(s_get("user"), s_get("pass"))
      session.connect(s_get("pass"), s_get("stor"))
      session.connect(s_get("pass"), s_get("retr"))
  
      session.fuzz()
  
  
  if __name__ == "__main__":
      main()
  
subject: Simplify boilerplate