Skip to content
Snippets Groups Projects
  1. Oct 05, 2015
  2. Oct 04, 2015
  3. Oct 03, 2015
  4. Oct 02, 2015
  5. Sep 25, 2015
  6. Sep 24, 2015
  7. Sep 21, 2015
  8. Sep 17, 2015
  9. Sep 09, 2015
    • Corentin Henry's avatar
      Fix packet generator for classes inheritating from list · d6d61091
      Corentin Henry authored
      SetGen is broken for custom list classes as illustrated by the following
      example:
      
          >>> packet = Ether() / IP()
          >>> packet_list = [packet, packet]
          >>> sendp(packet_list)
          ..
          Sent 2 packets.
          >>> # Now let's do the same with a custom class
          >>> class MyList(list): pass
          ...
          >>> weird_packet_list = MyList(packet_list)
          >>> len(weird_packet_list)
          2
          >>> sendp(weird_packet_list)
          .
          Sent 1 packets.
          >>> # Only one packet is sent instead of two.
          >>> # This is due to SetGen using type() instead of insinstance() to check
          >>> # the nature of the arguments. Indeed:
          >>> type(weird_packet_list)
          <class 'scapy.all.MyList'>
          >>> isinstance(weird_packet_list, list)
          True
      
      --HG--
      extra : rebase_source : aeb2b7bd46f3cb4cf0491bbea4a38157e93ecb71
      d6d61091
  10. Aug 31, 2015
  11. Aug 28, 2015
  12. Aug 12, 2015
  13. Aug 11, 2015
  14. Aug 10, 2015
  15. Jul 30, 2015
  16. Jul 29, 2015
  17. Jul 13, 2015
  18. Jun 17, 2015
  19. Jun 08, 2015
  20. May 12, 2015
Loading