Saravanan666/pypi-org huggingface dataset:
Package: netpackAIO
NetPackNetPack is a Python package that can be used to get information from IP addresses and CIDR ranges. This package uses the whois protocol to fetch the information from the relevant whois server.This package is based on my personal use in real environment.UsageFor now, it's only one method in here. I hope I can add more function when I develop further.from NetPack import NetPack

# Query information about an IPv4 address
ipv4_address = '8.8.8.8'
response = NetPack.inr(NetPack.ServerLocation.AFRINIC, ipv4_address)
print(response)Classes and MethodsThe NetPack package contains the following classes and methods:func.NetPack.inr(server: str, ipv4v6: str, query_flags: str = None) -> strThis is a static method that takes the following parameters, and return the check result from the INR whois server:server: The whois server addressPre-set NetPack.ServerLocationAFRINIC: The AFRINIC whois server addressARIN: The ARIN whois server addressAPNIC: The APNIC whois server addressLACNIC: The LACNIC whois server addressRIPE_NCC: The RIPE NCC whois server addressIANA: The IANA whois server addressRADB: The RADB website URLipv4v6: The IP address or CIDR rangequery_flags: Optional parameter that specifies query flags for certain whois servers(The method returns the response received from the whois server as a string.)func.NetPack.radb(ip: str) -> strThis is a static method that takes an IPv4 address as an input and return the result from RADBfunc.NetPack.ping(host, packet_size=64, ping_type="os", protocol="icmp", interval=0.2, timeout=1, packet_num=5) -> tupleThe ping() method can be used to ping a single host:Argumentshost: the hostname or IP address of the host to ping.packet_size: the size of the packets to send (in bytes). Default is 64.ping_type: using socket to initiate the ping or using inherit from OSprotocol: the protocol to use for the ping test. Must be either "icmp" or "tcp". Default is "icmp".interval: the time (in seconds) to wait between sending each packet. Default is 0.2.timeout: the time (in seconds) to wait for a response before considering the packet lost. Default is 1.packet_num: the number of packets to send. Default is 5.func.NetPack.multiple_ping(hosts, packet_size=64, ping_type="os", protocol="icmp", interval=0.2, timeout=1, packet_num=5) -> dictThe multiple_ping() method can be used to ping multiple hosts in parallel, This will return a dictionary where each key is a host from the hosts list and each value is a dictionary containing the average latency and success rate of the ping test.ArgumentsThe arguments for multiple_ping() are the same as for ping(), except that they are used for all hosts in the hosts list.
Package: netpacket
netpacket, a Python module written in CPythonnetpacket is a packet-creator module that supports ethernet, ARP, IPv4,
IPv6, ICMPv4, TCP, UDP and DHCPv4. It also contains a packet-capturer
called ppcap (Python pcap). The project contains the raw CPython
bindings, and a wrapper library written in Python, which can be found in
the directory “netpacket”.The module tries to be as user-friendly as it can be, leaving tasks like
big-endian and little-endian fields to the module itself, the programmer
only has to fill in the fields without concerning himself about it.Note concerning IPv4 and IPv6IPv4 and IPv6 is the same class, but the programmer will be jailed into
IPv4 or IPv6 usage based on an argument passed to the IP class or
protocol classes above. IPv4: 0x0800, IPv6: 0x86dd. IPv4 is already
default, and no argument needs to be passed.Example:obj=_netpacket.udp()print(obj)obj=_netpacket.udp(0x86dd)print(obj)<_netpacket.udpv4 object at 0x7fbff03e3510> <_netpacket.udpv6 object
at 0x7fbff03e3570>Installation# Install libpcap dependency (using gentoo@portage-tree)
emerge --ask net-libs/libpcap --quiet-build
# Install libpcap dependency (using archlinux)
pacman --sync core/libpcap
# Build
python setup.py build
# Build and install
python setup.py installExamplesAll examples can be found in the directory “examples”. Docstrings is
also available for very protocol class and the ppcap class.Platforms supportednetpacket for now only supports Linux, but will support the Unix
variants and Mac OS X once the BPF (Berkeley Packet Filter) device
implementation is coded in.Python versions supportednetpacket only supports Python3, and will never have any support for
Python2.Things that will be present in later stagesIPv4 options.IPv6 options.TCP options.Application-layer classes:DNS.HTTP.
Package: netpaint
NetPaintNetPaint is a 100% text-only drawing program, compatible with any terminal emulator that supports the mouse, such as PuTTY, Konsole, iTerm2, and many others.  It was inspired by creative ASCII art and my many fond memories of dialup BBSes.  NetPaint provides a robust drawing experience completely within the terminal, allowing you to create a wide range of ASCII art, either locally or remotely.  NetPaint also exports to normal text files, allowing you to incorporate your creations into server MOTDs, software manuals, or any other text environment.Available tools include:Paint - Paint using solid rectangle of the foreground color.  The 'Brush Size' option controls the size of the rectangle.Erase - Erase using solid rectangle (sets to transparent).  The 'Brush Size' option controls the size of the rectangle.Draw - Draw using rectangle of the selected symbol, drawn using foreground and background colors.  The 'Brush Size' option controls the size of the rectangle.Text - Begin writing text using foreground and background colors. Press enter to advance to next line, and escape to exit text mode.Select - Select a new rectangular region for cut/copy/clear (Edit menu).Stamp - Paste the cut/copied region using the original or active colors.Image - View/edit image dimensions.  Click apply to update or reset to revert.Layer - View/edit layer information.  All tools will update the currently active layer.  All layers except 0 may be set as visible or hidden. Flattening the image will combine all layers into layer 0 (applied in order).NetPaint is programmed in Python, and makes use of theUrwidlibrary for curses functionality.
Package: netpalm-client
Netpalm-ClientSimple client library for working withNetpalmDetailed example available inexamplesfolder of this repoInstallpip install netpalm-clientBasic Usagefromnetpalm_clientimportNetpalmClientnetpalm=NetpalmClient(url='https://netpalm.example.org',key='someApiKey',cli_user='cisco',cli_pass='cisco')task_id=netpalm.netmiko_getconfig(command='show run | i bgp router-id',host='192.168.0.1')['task_id']netpalm_result=netpalm.poll_task(task_id)# blocks until polling returns either completion or failureactual_result=netpalm_result['task_result'][command]# failures will have a 'task_errors' key, but not a 'task_result' key.print(f'{actual_result=}')Changelog1.0.0 - 1.0.3: Initial submissions1.0.4: Fix #3: Don't use Walrus operator in code targeting python version 3.7.
Package: netpbm
NetPBM Raster Bitmap Pure Python 3 Image Encoder/Decoder/Class.
No dependencies, Python 3.5+ standard libs only.
Color (16M Colors), Grayscale (256 Colors) or Black&White (2 Colors).
PNG Export, JSON Import/Export, Pretty-Print.
Useful manipulation functions, Darken, Lighten, Invert, Crop, Shrink, etc.
Package: netplan
netplan - a Python library for parsing the netplan configuration data.DescriptionThis module parses the YAML configuration files describing the system's
network configuration in the format used by the netplan.io package.
The main parser is the "netplan.parser.Parser" class (also exported as
"netplan.Parser"); its "parse()" method returns a data structure of
the "netplan.config.NetPlan" class (also exported as "netplan.NetPlan").Example usageimport netplan

p = netplan.Parser()
data = p.parse()
for iface, cfg in data.items():
    print('{section}/{name}'.format(section=cfg.section, name=iface)

p = netplan.Parser()
data = p.parse(exclude=['set-mtu.yaml'])
fix = {'version': 2}
for iface, cfg in data.get_all_interfaces(['br-enp4s0']).data.items():
    if cfg.get('mtu') != 9000:
        if cfg.section not in fix:
            fix[cfg.section] = {}
        fix[cfg.section][iface] = {'mtu': 9000}
fix = {'network': fix}
with open('/etc/netplan/set-mtu.yaml', mode='w') as f:
    print(yaml.dump(fix), file=f, end='')The netplan-parser toolThe three types of queries - parse the interface data, get all related
interfaces, and get only the physical related interfaces - are also
available via the command-linenetplan-parsertool:# Show the configuration of all interfaces in YAML format
netplan-parser show

# Show the configuration of the specified interfaces in JSON format
netplan-parser -f json show eno1 eno2.617

# List the names of the interfaces related to the specified one
netplan-parser -f names related eno2.617

# Show the configuration of the physical interfaces related to
# the specified ones
netplan-parser --format=json physical eno2.617 br1-eno1ContactThenetplanPython library was written by Peter Pentchev as part of
theOpenStack developmentteam atStorPool.
Package: netplanner
netplannerDescriptionNetplanner implements the top-down datacenter approach for IP and Network Interface Management.
It plans the network on the host by usingsystemd-networkdas the underlying network configuration provider.It refuses to implement L2 capabilities such as DHCP.It also implements interfaces which are needed for L3 capabilities such asVethandDummyinterface types.It is open to be extended with other providers which have a different text-based input.ArchitectureLicensesRunning Code LicensesPython 3.x - today |PSF LICENSE AGREEMENT FOR PYTHONdacite |MIT LicensePyYaml |MIT Licensefqdn   |MPL-2 LicenseJinja2 |BSD-3 LicenseBuilding Tool for Dynamic Linked CLI BinaryPyOxidizer |MPL-2 LicenseWe relicensed this project to GPLv3 recently to cater for derivative work fromnetplanand to ease integration.How to use it#Thisisadevelopercommand--localensuresthat./issetontheoutput.$netplanner--local--configexamples/worker-config-old.yaml--output/run/systemd/network--only-networkdconfigure$netplanner--helpusage: netplanner [-h] [--version] [--config CONFIG] [--debug] [--local] [--only-sriov] [--reload] [--only-networkd] [--output OUTPUT] {configure,apply,generate,rebind} ...options:-h, --help            show this help message and exit--version             show program's version number and exit--config CONFIG       Defines the path to the configuration file or directory.--debug               Enables debug logging.--local               This templates the configuration into a local directory--only-sriov          This only runs sriov configuration on supported interfaces.--reload              This reloads networkd and networkctl via systemd.--only-networkd       This templates only networkd configuration files.--output OUTPUT       The output directory to which the files will be written.subcommands:valid subcommands{configure,apply,generate,rebind}sub-command helpconfigure           Configure Network Adapters flawlessly with the knowledge of the netplanner.apply               Configure Network Adapters flawlessly with the knowledge of the netplanner.generate            Configure Network Adapters flawlessly with the knowledge of the netplanner.rebind              Rebind SR-IOV interfacesExamples DirectoryInside the examples directory you can have a overview of different types of configurations.
Package: netplot
NetplotA ultra-lightweight 3D renderer of the Tensorflow/Keras neural network architectures.
This Library is working on Matplotlib visualization for now. In future the visualization can be moved to plotly
for a more interactive visual of the neural network architecture.Note:For now the rendering is working in Jupyter only Google Colab support is in works.For more details visitNetPlotInstall with PippipinstallnetplotUsage guidefromnetplotimportModelPlotimporttensorflowastfimportnumpyasnp%matplotlibnotebookX_input=tf.keras.layers.Input(shape=(32,32,3))X=tf.keras.layers.Conv2D(4,3,activation='relu')(X_input)X=tf.keras.layers.MaxPool2D(2,2)(X)X=tf.keras.layers.Conv2D(16,3,activation='relu')(X)X=tf.keras.layers.MaxPool2D(2,2)(X)X=tf.keras.layers.Conv2D(8,3,activation='relu')(X)X=tf.keras.layers.MaxPool2D(2,2)(X)X=tf.keras.layers.Flatten()(X)X=tf.keras.layers.Dense(10,activation='relu')(X)X=tf.keras.layers.Dense(2,activation='softmax')(X)model=tf.keras.models.Model(inputs=X_input,outputs=X)modelplot=ModelPlot(model=model,grid=True,connection=True,linewidth=0.1)modelplot.show()
Package: netport
NetportNetport is a tool for managing single-access resources on the target Unix machine. Netport manages
the access to different types of resources on the operating system by not allowing multiple requests
to the same resource. For example ports, files, processes, network interfaces, and more...How it worksflowchart TD
    client([Client])
    server[/Netport Server\]
    database[(Database)]
    resources{{Resources}}
    ports(Ports)
    interfaces(Interfaces)
    fs(File System)
    proc(System Processes)
    info(System Info)
    
    client <--REST API requests--> server
    server <--stores server state---> database
    server <----> resources
    resources --- ports
    resources --- interfaces
    resources --- fs
    resources --- proc
    resources --- infoFrameworkNetport runs in a single python process on the target machine. It uses theFastAPIframework to make a high performance and easy to use REST
api server. By using this api, users can easily perform a variety of requests to various resources.There are many types of requests that can be made:Acquire a free port.Check if file existsDeclare that a file is being usedStart a processGet a list of already acquired resourcesAnd many more...Backend StorageIn order to maintain an active memory of the used resources, Netport communicates with a database.
There are 2 types of supported databases that netport uses:Redis databaseLocal pythonic database.Both databases serve the same purpose for netport, but their inner functionality still a bit
different, with one draw back for the local database.The local database doesn't save netport's
state after a shutdown or a reboot.The decision whether to use redis DB or a local one, depends by the user. In case of an unexpected
shutdown, with redis the state of netport will be stored and on reboot it will continue from where
it stopped. On the other hand, for much simpler systems this feature might be unnecessary
complicated.InstallationMake sure that python is installed on your machine (3.7 and above). Open your terminal and run the
following command:pipinstallnetportIt is advised to use a dedicated python virtual environment for netport.Developer InstallationInstall poetry by following the instructionshere.Clone this repository:gitclonehttps://github.com/IgalKolihman/netport.gitInstall the development environment:poetryinstall--withdevUsagePlease follow theinstallation procedureto be able to run Netport. After that
netport will be available to you as long as you are using it's virtual environment.To run netport with basic configurations, run:netportAfter executing this command, a link will appear in the terminal to the server's url. The API
documentation will be available at:"http://host_ip:port/docs"For more advanced information regarding netport execution, run the following command:netport-h
Package: netprocmon
Network Process Monitor makes it easy for Python developers to monitor a proccess’ network usage.Currently, it works with IPv4 and tested against Python 2.7.Development site.© Network Process Monitor contributors 2019 under theThe GNU General Public License v3.0.InstallationInstall usingpipwith:pip install netprocmonOr,download a wheel or source archive from PyPI.Basic>>> import time
>>> from netprocmon import Monitor
>>> pid = 586
>>> with Monitor() as a:
...      a.add_pid(pid)
...      a.start()
...      while True:
...          time.sleep(5)
...          print [str(n) for n in a.get_count_by_pid(pid)]
...
['NetworkTraffic(interface=eth1, recv=2302, pid=586, send=6806)']
['NetworkTraffic(interface=eth1, recv=2832, pid=586, send=9104)']
['NetworkTraffic(interface=eth1, recv=3548, pid=586, send=10742)', 'NetworkTraffic(interface=eth2, recv=0, pid=586, send=121)']Listen address/interfaceLimit listening to an interface by providing the interface address>>> import time
>>> from netprocmon import Monitor
>>> pid = 586
>>> with Monitor() as a:
...      a.add_pid(pid)
...      a.add_address("10.0.0.21")
...      a.start()
...      while True:
...          time.sleep(5)
...          print [str(n) for n in a.get_count_by_pid(pid)]
...
['NetworkTraffic(interface=eth1, recv=530, pid=586, send=2758)']
['NetworkTraffic(interface=eth1, recv=1538, pid=586, send=5044)']
['NetworkTraffic(interface=eth1, recv=2386, pid=586, send=8166)']Available constants and methodsConstantsP_TCP: Define the TCP protocol numberP_UDP: Define the UDP protocol numberProcess Identificationadd_pid(PID):                 Add a process identification to have the traffic countedremove_pid(PID):              Remove a process identification and the traffic countget_pids():                   Get a list of process identifications that get the traffic countedget_pid_by_port(proto, port): Get the process identification based on a supervise portclear_pids():                 Remove all process identificationsListeningadd_address(addr):                  Add a listening restriction; The address should fit with an interface addressget_addresses():                    Return a list of listening restrictionsremove_address(addr):               Remove a listening restrictionclear_addresses():                  Remove all listening restrictionget_listen_addrs():                 Return a list of interface addresses that are being listed toget_listen_interfaces():            Return a list of interfaces with their addresses that are being listed toget_listen_interface_by_addr(addr): Return the interface name based on a address; If the address is not listened to, None will be returnedRunstart(): Start the monitorTraffic Infoget_count_by_pid(PID): Get network traffic based on a process identificationPort Infoget_ports_by_pid(PID):     Get a list of supervise ports based on a process identificationget_ports_by_proto(proto): Get a list of supervise ports based on TCP or UDP protocol; See P_TCP, P_UDPget_ports():               Get a list of all supervise ports
Package: netprot
netprotA system-independent network protocol manipulation and evaluation library.netprodwants to be a library capable of standardizing and evaluating a list of strings representing Network Protocols. The idea is to provide a tool similar to netaddr that can help to enhance and simplify code logic wherever is required.Installationpip3installnetprodPackage availablehereHOW TOFirst thing, we need to initialize an instance ofNetprodclass, passing as arguments a list of strings - where each string should represent a network protocol and corresponding port. Aseparatorargument is also possible to pass as kwarg and will be used to standardize our strings. By default, separator is equal to/>>>fromnetprot.netprotimportNetprot>>>my_list=['tcp-443-https','UDP/53','tcp/1024-1026','TCPP-80','tcp/443']>>>my_protocols=Netprot(my_list,exceptions=['ICMP','any'],separator='/')Once the instance of the class is created, we can callstandardizemethod which will return a tuple containing pontential unlegal protocols and ports, duplicates - if any, and a standardize list of protocols and port.>>>my_protocols.standardize()(['TCPP/80'],['TCP/443'],['ANY','ICMP','TCP/1024','TCP/1025','TCP/1026','TCP/443','UDP/53'])As we can see, we have:Strings using the sameseparator.Trailing words such ashttpsis removed as not neededProtocols defined astcp/1024-1026are unpacked for each port in range definedIllegal protocols such as TCPP/80 are removedDuplicates are also removedAll strings are upper casesList is sortedICMPandANYare recognized as legal - because defined underexceptionsargument - and passed throughNetprodnot only standardizes data, but also evaluates them. Let's have a look to the other methods:warning:
List of protocols must be standardized first.Let's check if the ports are part of well known range of ports (0 to 1024)>>>my_protocols.is_well_known()(False,[False,False,True,False,False,True,True])As we can see, some ports are failing to be lower than 1024, hence we returnFalseplus a list of bools for each ports.What about if we want to find those areTCP...>>>my_protocols.is_tcp()(False,[False,False,True,True,True,True,False])... orUDP?>>>my_protocols.is_udp()(False,[False,False,False,False,False,False,True])Great! What if we want figure out if our port and protocols are safe or not?
Let's define a list of safe - or unsafe - ports and protocols and passed them tois_safeoris_unsafemethod.>>>my_safe_applications=['TCP/443','UDP/53']>>>my_protocols.is_safe(my_safe_applications)[False,False,False,False,False,True,True]>>>my_unsafe_applications=['ICMP','ANY']>>>my_protocols.is_unsafe(my_unsafe_applications)[True,True,False,False,False,False,False]And that's all, folks!
Package: net-puppy
net-puppyA light-weight and fast network controlled puppy for command line interface.
This enables you to control your linux terminal from your mobile application over a low latency network.The program relies on the push bullet service to control the linux command line interface from a network
controlled device. The controller can be an another PC too, running a web browser for push notifications.InstallationFor python 2pip install net-puppyorpython -m pip install net-puppyFor python 3pip3 install net-puppyorpython3 -m pip install net-puppyHow to use it?Step 1:Create a account onpush bullet.Step 2:Login to your push bullet account, and under settings, create an Access Token
Note down this token somewhere for future use.Additional Step 2:Download push bulletandroid app, and login with your push bullet credentials.Step 3:Import the core module from net_puppy package in your python application.python
>> from net_puppy import coreStep 4:Start the core module with start function, by providing your 34 character push bullet token.>> core.start("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")Step 5:From androd app (in the ME tab), type "C command"For example: "C ls" for ls on the terminal.Upcoming featuresIn the next, full blown terminal info will be avalable on your push bullet app.Raise bugs and feature requests:https://github.com/vishal-keshav/net_puppyDeveloper's infoVishal Keshav (vishal.keshav.1993@gmail.com)
Package: netpwn
Netpwn - A netcat listener alternativeThe idea of this Linux tool is to be an alternative to a Netcat listener but with the ability to determine if the received conection is a shell or not. If the conection is a shell Netpwn will also try to stabilize it to get a pty (Only Linux and MacOS shells).InstallationJust executepip3 install netpwnand enjoy! You can use a virtual env or intall it system wide.UsageNetpwn  - A netcat listener alternative

usage: netpwn [-h] [-v] [--no-pty] [-P LPORT]

A listener capable of stabilize Linux and MacOS reverse shells automatically

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --no-pty              if this flag is set, no shell stabilization is perform
  -P LPORT, --lport LPORT
                        the port used to listen for the reverse shell (Default: 8080)