Skip to content
Snippets Groups Projects
  1. Nov 30, 2015
  2. Nov 29, 2015
  3. Oct 27, 2015
  4. Oct 14, 2015
  5. Oct 09, 2015
  6. Oct 07, 2015
  7. Oct 06, 2015
  8. Oct 05, 2015
  9. Oct 04, 2015
  10. Oct 03, 2015
  11. Oct 02, 2015
  12. Sep 25, 2015
  13. Sep 24, 2015
  14. Sep 21, 2015
  15. Sep 17, 2015
  16. 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
  17. Aug 31, 2015
  18. Aug 28, 2015
  19. Aug 12, 2015
  20. Aug 11, 2015
Loading