This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python2.7 | |
# -#- coding: utf-8 -#- | |
# vim:fenc=utf-8 | |
# read.py | |
# Copyright (C) 2019 Jecsan Blanco <[email protected]> | |
# Distributed under terms of the MIT license. | |
from scapy.all import * | |
def main(): | |
packets = packets = rdpcap('Week5.pcap') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from collections import OrderedDict | |
# returns what hand wins against | |
def wins(hand): | |
return {"R": "S", "P": "R", "S": "P"}.get(hand) | |
# returns what wins against hand |