Saravanan666/pypi-org huggingface dataset:
Package: pcalg
# CPDAG Estimation using PC-Algorithm## OverviewThis package provides functions to estimate a skeleton graph and a
completed partially acyclic graph (CPDAG) from a data matrix that
describes the appearance patterns of the graph nodes.  The detailed
algorithm is written in [Kalisch2007].## CodeThe source code is available athttps://github.com/keiichishima/pcalg## Bug ReportsPlease submit bug reports or patches through the GitHub interface.## ContributorsSatoru Kobayashi,https://github.com/cpflatbasilnsaeed,https://github.com/basilnsaeedDr. Georg M. Goerglimjcst,https://github.com/limjcstElementAI,https://github.com/ElementAI## References[Kalisch2007] Markus Kalisch and Peter Bhlmann. Estimating
high-dimensional directed acyclic graphs with the pc-algorithm. In The
Journal of Machine Learning Research, Vol. 8, pp. 613-636, 2007.## AuthorKeiichi SHIMA
/ Internet Initiative Japan Inc.
/ WIDE project
Package: pcalibration
probability-calibrationProbability calibration is a technique to calibrate the probabilities of a classifier. This package provides a simple interface to calibrate the probabilities of a sklearn-stype classifier. The package also provides a set of calibration methods.MethodsPlatt ScalingIsotonic RegressionInductive Venn-Abers Predictor (IVAP)Cross Venn-Abers Predictor (CVAP)Installation$pipinstallpcalibrationUsagefrompcalibrationimportCalibratorWrapper,CrossVennAbers# Load the dataX_train,X_test,y_train,y_test=...# Create a CalibratorWrapper objectcalibrator=CalibratorWrapper(model,CrossVennAbers(k=5))# Fit the calibratorcalibrator.fit(X_train,y_train)# Predict the probabilitiesy_pred=calibrator.predict_proba(X_test)
Package: pCanary
pCanary is a opensource application that is used to lookup information on
crafting and ores in the game Minecraft. It is written in Python and should
be compatible with most operating systems however it has been built for
Linux.pCanary will create a tk window that will become the interface of selecting
different ores and recipes by the user. The tk window will give the user
an idea on how to construct the crafting on a grid and it will also show
the different ores and their purpose.pCanary was written by Jeremiah O’Neal aka we6jbo and is released under
the GNU general public licenseSunday, Nov 18 2012 7:42PM PST
Package: pcan-gatewaybus
PCAN Gateway Plugin PackagesTarget Device :PCAN-Ethernet GatewayPCAN-Ethernet Gateway Configurationinuser manual, custom gateway protocol is presented.in Route Configuration Page, add Routing IP Addresses both side(CAN->Ethernet, Ethernet->CAN)Install Plugin Package# install from PyPI$pip3installpcan-gatewaybus

or# local installation$gitclonehttps://github.com/ys-oh/python-can-gatewaybus
$cdpython-can-gatewaybus
$pip3install.Usageimportcanbus=can.Bus(bustype='gateway',channel='<local ip>:<local port>,<remote ip>:<remote port>')...orimportcancan.rc['interface']='gateway'can.rc['channel']='<local ip>:<local port>,<remote ip>:<remote port>'bus=can.Bus()...in 'channel' argument represent Route Addres in PCAN-Ethernet Gateway Routing Configurations.local address (ip:port)receive address from PCAN-Ethernet Gatewaye.g. 192.168.1.1:4000remote address (ip:port)transmit address to PCAN-Ethernet Gatewaye.g. 192.168.1.10:3999if you config routing in Device (device ip : 192.168.1.1)Transmit Channel (CAN->Ethernet) : TCP, 192.168.1.1:3999
Recieve Channle (Ethernet->CAN) : TCP, :4000your channel is...
can.rc['channel'] = '192.168.1.1:3999,192.168.1.1:4000'
...
Package: pcap2http
Pcap2httpParse and show HTTP sites. Python 3.3+ required.This module parses pcap(ng) files, retrieves HTTP data, and gives you the opportunity to see it in your browser or in the file system. Pcap files can be obtained via tcpdump or wireshark or other network traffic capture tools.FeaturesHTTP requests/responses grouped by TCP connections; the requests in one keep-alive http connection will display together.Managed chunked and compressed HTTP requests/responses.Managed character encodingDisplay the site hierarchy, the contents of which were stored in pcap (ng) format.Dump content of sites to the file system with preserving the directory structure.Start the HTTP-Proxy with allows you to view the contents of the intercepted sites in the browser.Integration with Wireshark via Lua plugin.Installpip install pcap2httpExamplesStart the HTTP-Proxy on port 8337, wait for connections to the proxy (that returns contents of all detected url address)python3 pcap2http.py dump.pcapFilter HTTP-packets for domain domain.com, start the HTTP-proxy on port 8337, wait for connections to the proxy (that returns contents of all detected url addresses of domain.com website )python3 pcap2http.py --domain domain.com dump.pcapFilter HTTP-packets for domain domain.com, start the HTTP-proxy on port 8337, wait for connections to the proxy (that returns contents of all detected url addresses of domain.com website, and forwards all other url to the internet (transparent proxy))python3 pcap2http.py --domain domain.com --allow-requests dump.pcapFilter HTTP-packets on the URI “/api/update” pattern, show directory structure on the screen (in this case only domain.com website) and dump contents to the file system.python3 pcap2http.py --uri "/api/update" --print-tree --dump-tree dump.pcapFilter HTTP-packets over ip 123.123.123.123, save data to the file “saved.bin”python3 pcap2http.py --ip "123.123.123.123" --save-storage saved.bin ololo.pcapStart the HTTP-Proxy on port 8337, wait for connections to the proxy (that returns the contents of url addresses previously stored in “saved.bin” file)python3 pcap2http.py saved.bin
Package: pcap2map
pcap2mapPlace IP's from PCAP on world mapThis package enables a user to specify a network traffic file (i.e.
a packet capture or .pcap file), extract the IP addresses from that
file, geo-locate those addresses using a built-in database, and
then place those IP's on a world map (a .png file).Notes:The geolocation is done via a database provided by IP2Location.com. The database is included as part of the package.Only public IP's are extractedTypical runtime is 10 seconds for a small .pcap fileThere are many pre-existing packages that geo-locate IP's but none that extract IP's from a .pcap. pcap2map solves the latter problempcap2map was written to be cross-platformpcap2map was written with Python 3.7Dependencies:Wireshark - pyshark, a Python packet parsing module, relies on Wireshark. Wireshark download instructions can be foundhereorca - The visualization and mapping of the geo-located IP addresses relies on plotly, to include a package called orca. Orca ownload instructions can be foundhereInstallation instructionsvia github:git clone https://github.com/jspeed-meyers/pcap2map
pip install -r requirements.txtvia PYPI (still under construction):pip install pcap2mapNote on Docker: Not currently available. The current Dockerfile file does not work.Usage instructionsafter dowloading from github:cd pcap2map\src\pcap2map
pcap2map.py [filepath\filename]

# Additionally, you can build and install the package
cd pcap2map
python setup.py sdist bdist_wheel
python setup.py install
python -m pcap2map -h  # for help
python -m pcap2map [filename]after downloading from pip (still under construction):python -m pcap2map -h  # for help
python -m pcap2map [filename]Run testsafter downloading from github:cd pcap2map\src\pcap2map
pytest
Package: pcap-fix
Python pcap moduleThis is a simplified object-oriented Python wrapper for libpcap -
the current tcpdump.org version, and the WinPcap port for Windows.example use:>>> import pcap
>>> for ts, pkt in pcap.pcap():
...     print ts, `pkt`
...BuildingJust try ‘make’, and then ‘make install’If your libpcap installation is missing the pcap-int.h header, you
will need to build against a libpcap build directory. Modify the
CONFIG_ARGS in the Makefile to point to the location of your built
libpcap distribution, and try again.See INSTALL file for more detailed build instructions.SupportVisithttp://code.google.com/p/pypcapfor help!
Package: pcapgen
Pcapgen PCAP Generation Suitepgtlibpgtlib is a wrapper built on top of Scapy/Kamene to provide additional flexibility to create custom TCP client<->server packet captures. This module would also provide functionality to prefix 3-way TCP Handshake and close established connections gracefully.UsageLet's say over TCP/5555, you would want to send "----> hey from client\n" from client and server echoes back with a response message saying, "<---- ACK\n". Let's construct a packet based on this:frompcapgen.pgtlibimport*fHandle=PCAP('/tmp/tcp.pcap')# PCAP Output Filenameconn=fHandle.tcp_conn_to_server(5555)# Assign dest port as TCP/5555conn.to_server('----> From Client\r\n')# Client message to serverconn.to_client('<---- From Server\r\n')# Server message to clientconn.finish()# Construct FINfHandle.close()# Close file handleprint('[*]Done.')pftPCAP Fix Tool (pft, in short) is a wrapper on top of scapy/kamene. This utility helps in resolving broken TCP communications, changing endpoint directions and ports etc. This tool takes the C Arrays input of any TCP stream, appends the missing TCP 3-Way handshakes along with adding the necessary FIN TCP flags to terminate the established TCP communication gracefully.UsageOpen faulty pcap and navigate to the faulty TCP stream index that you want to correct.View data as 'C Arrays' and export the output to any flat file e.g. /tmp/raw$python pft.py -p 1337 -w /tmp/rawThis would geneate raw.pcap (currently supports PCAP format only) which would have TCP/1337 as destination port along with the end-to-end PDU data intact.pgtPCAP Genation Tool (pgt) is wrapper built on top of scapy/kamene again which generates simulated HTTP,FTP and Email (SMTP/IMAP) protocols data along with several encoding types i.e. base64, deflate, gzip etc.Usage$pythonpgt.py~/Desktop/sample.docx# Generates HTTP(GET/POST), FTP(active and passive), SMTP and IMAP PCAPs.External dependencieskamene [pip3 install kamene]python-magic [pip3 install python-magic]CreditsMajor credit goes to Andrewg Felinemenace for developing this excellent utility. Those scripts can be foundhereMine is just an add-on with some minor fixes on top of it. :)
Package: pcap-handler
import library as:from pcap_handler import *
			or
from pcap_handler import pcapHandler
			or
from pcap_handler import dfHandlerMake an object of libraryTo convert pcap to pandas DataFrame:pcap2df = pcapHandler(file="path to pcap file", verbose=True)
df = pcap2df.to_DF(head=True)To conver DataFrame to CSV:df2csv = dfHandler(dataFrame=df, verbose=True)
df2csv.to_CSV(outputPath="path to save csv")Descriptive README soon...
Package: pcap-ioc
pcap-iocPython tool to extract potential IOCs from a pcap file usingpysharkList of IOCs extracted :IP addresses from IP packetsDomains and IP addresses from DNS requestsDomains, url and user-agents from HTTP requestsDomains from HTTPs X509 certificatesTo install it, you can just dopip install pcap_iocor install it from this repository withpip install ..UsageAs a libraryfrompcap_iocimportPcapp=Pcap('FILE.pcap')foriinp.indicators:print(i)CLI tool$ pcap_ioc
usage: pcap_ioc [-h] {ioc,misp,shell} ...

Process some pcaps.

positional arguments:
  {ioc,misp,shell}  Subcommand
    ioc             Extract IOCs
    misp            Extract IOCs and search in MISP
    shell           Open a shell with pyshark

optional arguments:
  -h, --help        show this help message and exitTo query MISP servers, you need to create a file~/.mispwith one entry for every MISP server for instance :[server1]
url: https://misp1.example.org/
key: KEYHERE
default: true

[server2]
url: https://misp2.example.org/
key: KEYHEREThen you can query one of these server withpcap_ioc misp -s misp2 file.pcapLicenseThis software is released under the MIT license.
Package: pcaplib
Copyright (c) 2017 Salah GherdaouiPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.Description: Python PCAP Library===================.. image:: https://gitlab.com/salah.gherdaoui/pcaplib/badges/master/build.svg.. image:: https://gitlab.com/salah.gherdaoui/pcaplib/badges/master/coverage.svg``pcaplib`` is a very simple and lightweight library for reading and writing PCAP filesReader example::import pcaplibpcap_reader = pcaplib.Reader('capture.pcap')for ts in pcap_reader:print(packet)(1494608771, 459378, 6, 6, b'\\x00\\x0c)\\xaa4\\xc9')(1494608771, 459556, 6, 6, b'\\x00\\x0c)\\xaa4\\xc9')Writer example::import pcaplibpkt_list = [(1494608771, 459378, 6, 6, b'\\x00\\x0c)\\xaa4\\xc9'),(1494608771, 459556, 6, 6, b'\\x00\\x0c)\\xaa4\\xc9'),]pcap_writer = pcaplib.Writer('capture.pcap', pkt_list)pcap_writer.writer()Platform: UNKNOWNClassifier: Topic :: System :: NetworkingClassifier: Topic :: System :: Networking :: MonitoringClassifier: Programming Language :: Python :: 3.4Classifier: Topic :: Internet :: Log AnalysisRequires-Python: >=3.4
Package: pcapmq
================Python PCAP2MQTT================.. image:: https://img.shields.io/pypi/v/pcapmq.svg:target: https://pypi.python.org/pypi/pcapmq.. image:: https://img.shields.io/travis/rtfol/pcapmq.svg:target: https://travis-ci.org/rtfol/pcapmq.. image:: https://readthedocs.org/projects/pcapmq/badge/?version=latest:target: https://pcapmq.readthedocs.io/en/latest/?badge=latest:alt: Documentation Status.. image:: https://pyup.io/repos/github/rtfol/pcapmq/shield.svg:target: https://pyup.io/repos/github/rtfol/pcapmq/:alt: UpdatesPublish PCAP result to MQTT* Free software: BSD license* Documentation: https://pcapmq.readthedocs.io.Features--------* Sniffer network packet* Publish message to MQTT when found particular packet on networkInstallation--------```sudo apt install libpython3-dev libpcap-devpip install pcapmq```Configuration--------*(TODO)Usage--------* Listening all UDP and ARP packet, display only, no MQTT```sudo pcapmq --filter "udp or arp"```* Send message to broker under topic devices/1/online, when found specific device's MAC address```sudo pcapmq --filter "ether src xx:xx:xx:xx:xx:xx" --topic devices/1/online --broker-url mqtt://username:password@localhost --payload-format "{0} - {1}"```=======History=======0.1.0 (2018-05-04)------------------* First release on PyPI.
Package: pcapstats
pcapstatsInstallpip install pcapstatsCLIpcapstats statsUsage: pcapstats stats [OPTIONS] [FILES]...

  Calculate statistics for one or more pcap files.

Options:
  -o, --output TEXT
  -p, --processes INTEGER  Maximum amount of concurrent processes.
  --help                   Show this message and exit.pcapstats compareUsage: pcapstats compare [OPTIONS] ORIGINAL [TARGETS]...

  Calculate similarity metrics and statistics for one or more pcap file.

Options:
  -o, --output TEXT
  -v, --visualize
  -vo, --visualize-output TEXT
  -p, --processes INTEGER       Maximum amount of concurrent processes.
  --help                        Show this message and exit.pcapstats filterUsage: pcapstats filter [OPTIONS] ORIGINAL [TARGETS]...

  Filter pcap files based on similarity metrics.

Options:
  -o, --output TEXT        File where filter output gets saved.
  -j, --json-file TEXT     JSON containing custom thresholds for the available
                           metrics.

  -p, --processes INTEGER  Maximum amount of concurrent processes.
  --help                   Show this message and exit.
Package: pcap-summary
Pcap_summaryThis is a wrapper script for Scapy that will parse a pcap file and output a summary of the packets in the file.
It will also output a summary of the protocols used in the pcap file.UsageSummarizing a pcap file:pcap_summary <pcap file>Example:pcap_summary http.pcapOutput:Proto    Src                 Dst                Flags      Flow Size    FCount    RCount
-------  ------------------  -----------------  -------  -----------  --------  --------
UDP      24.6.173.220:53867  75.75.75.75:53     --               142         1         1
UDP      24.6.173.220:54997  75.75.75.75:53     --               368         2         2
TCP      24.6.173.220:42379  174.137.42.75:80   SAPFR          14175         7        11
TCP      24.6.173.220:42380  174.137.42.75:80   SAP             7251         7         8
UDP      24.6.173.220:49643  75.75.75.75:53     --               276         1         1
UDP      24.6.173.220:59261  75.75.75.75:53     --               297         1         1
[...]TCP flags are decoded as follows and added to the flow summary:S = SYN
A = ACK
F = FIN
R = RST
P = PSH
U = URG
E = ECE
C = CWRThe flow size is the total size of the flow in bytes incremented via the IP length field.The FCount is the number of packets for a given source and destination socket pair in one directionThe RCount is the number of packets for the given pair in the opposite direction.Summarizing a pcap file and filtering:pcap_summary <pcap file> <search>Example:pcap_summary http.pcap 174.137.42.75Output:Proto    Src                 Dst               Flags      Flow Size    FCount    RCount
-------  ------------------  ----------------  -------  -----------  --------  --------
TCP      24.6.173.220:42379  174.137.42.75:80  SAPFR          14175         7        11
TCP      24.6.173.220:42380  174.137.42.75:80  SAP             7251         7         8
TCP      24.6.173.220:42381  174.137.42.75:80  SAP             8126         5         7
TCP      24.6.173.220:42383  174.137.42.75:80  SAP              452         2         1
TCP      24.6.173.220:42384  174.137.42.75:80  SA               144         2         1The search is performed by looking if the given string is present in the list formed by the flow.InstallationAvailable on Pypi:pip install pcap_summary
Package: pcap_to_ditg
pcap_to_ditgGeneratesDITGflow
definition Files for each IP using a Packet Capture (.pcap) file as
inputInstallationThe package is available to be installed throughPyPI - the Python
Package Indexathttps://pypi.org/project/pcap_to_ditgYou can install the latest version by running:$ sudo pip install pcap_to_ditgThe latest release can be also downloaded from theGithub
repositoryUsageThe help section of therun.pyprogram describes the usage detailsusage: run.py [-h] [-t START_TIME] [-e END_TIME] [-s PACKET_SIZE_OPTIONS] [-p]
      [-c] [-op]
      pcap_file mapper_file list_file

Generate DITG script files from a pcap file

positional arguments:
  pcap_file             .pcap file to be used in generation
  mapper_file           Mapper file to be used in generation
  list_file             File containing all distinct IPs to be used in
                        generation

optional arguments:
  -h, --help            show this help message and exit
  -t START_TIME, --start-time START_TIME
                        Timestamp (in sec) from which the file should be read
  -e END_TIME, --end-time END_TIME
                        Timestamp (in sec) until which the file should be read
  -s PACKET_SIZE_OPTIONS, --packet-size-options PACKET_SIZE_OPTIONS
                        Packet size options to be used for each flow (for ex.
                        For Anonymized trace pcap files). If not provided,
                        *_ps files are created for each flow by using packet
                        sizes as per the pcap file
  -p, --print-all-ips   Print all distinct IPs appearing in the pcap file and
                        exit
  -c, --clean           Remove any older generated files and exit the program
  -op, --orig-ports     Whether original destination ports should be used or a
                        non-clashing port should be assignedThe format oflist_fileis as follows:10.0.1.10,
10.0.2.10,
.
.
.These are the IPs that are appearing in the PCAP file (as
specified bypcap_fileargument)You can generate this list automatically by running the example
program with-poption$ touch list_file
$ python run.py -p pcap_file mapper_file list_file > list_fileNote: While running the program with-poption, the filesmapper_fileandlist_fileare not actually used but still
have to be provided as argument and should exist.The format ofmapper_fileis as follows:Host,Start_row,End_row,Number,IP
h1,1734,1902,169,10.0.0.1
h2,1528,1733,206,10.0.0.2
.
.
.Usage in a different script or in interpreter mode is as:>> from pcap_to_ditg import pcap_to_ditg
>> pcap_file_path = '***'
>> mapper_file_path = '***'
>> list_file_path = '***'
>> options = {'end_time' : 60}
>> p = pcap_to_ditg.pcap_to_ditg(
     pcap_file_path,
     mapper_file_path,
     list_file_path,
     options
   )
The flow scripts and the IDT files have been generated and have been saved in separate sub-folders *_ditg_files.
>>
Package: pca-pwa
pca-pwapca-pwa, a simplified manner for insights and decision-making by visualizing complex relationships with PCA web application.The Purpose of the PackageThe purpose of the package is to offer a simple way of visualizing relatationships between items of any given dataset.
The user could easily obtain a pca plot without needing to configure or compile the application.InstallationTo installpca_pwa, you can use pip. Open your terminal and run:pipinstallpca_pwaOpenIPythonorJupyter Notebook>>>frompca_pwaimportapp>>>app.app.run(debug=True,use_reloader=True,host='0.0.0.0',port=8082)>>># * Serving Flask app 'app'>>># * Debug mode: on>>># * Running on http://127.0.0.1:8082Open the url:http://127.0.0.1:8082Uploadxslx/slxfile (Excel)e.g.:Clickhereto download the excel fileItems/Observations should be in rowsVariables/Features should in columnsChoose a method of imputation for missing valuesThen run the pca by clickingPerform PCAbutton.Otherwise you can usegit clone:Here is theUsage:Clone the github repositorygit clone https://github.com/danymukesha/pca-pwa.gitRun the appcdpca-pwa
python3.1pca-pwa/app.y# * Serving Flask app 'app'# * Debug mode: on# * Running on http://127.0.0.1:8082Open the url:http://127.0.0.1:8082LicenseThis project is licensed under the MIT License.CreditsAuthor: MIT ©Dany MukeshaEmail:danymukesha@gmail.comThank you for usingpca_pwa!