code: def showSectionsHeaders(peInstance):
      
      
      print "[+] Sections information:\n"
      print "--> NumberOfSections: %d\n" % peInstance.ntHeaders.fileHeader.numberOfSections.value
      for section in peInstance.sectionHeaders:
          fields = section.getFields()
          for field in fields:
              if isinstance(fields[field],  datatypes.String):
                  fmt = "%s = %s"
              else:
                  fmt = "%s = 0x%08x"
              print fmt % (field,  fields[field].value)
          print "\n"
docs: Prints IMAGE_SECTION_HEADER for every section present in the file.