Saravanan666/pypi-org huggingface dataset:
Package: pwmled
python-pwmledpython-pwmledcontrols LEDs connected to a micro controller using pulse-width modulation. It supports one-color, RGB and RGBW leds driven by GPIOs of an Raspberry Pi or a PCA9685 controller.Installationpython-pwmledrequires Python 3. It can be installed using pip:pipinstallpwmledWhen directly controlling the GPIOs of a Raspberry Pi using theGpioDriver(seebelow), thepigpio C libraryis required. It can be installed with the following commands:wgetabyz.co.uk/rpi/pigpio/pigpio.zip
unzippigpio.zipcdPIGPIO
make
sudomakeinstallBesides the library, thepigpiodutility is installed, which startspigpioas daemon. The daemon must be running when using theGpioDriver.sudopigpiodUsageConfigurationpython-pwmledsupports several possibilities for connecting LEDs to your micro controller:GPIO: LEDs can be connected directly to the GPIOs of a Raspberry Pi.PCA9885: APCA9685can be used as I2C-bus PWM controller.frompwmled.driver.gpioimportGpioDriverfrompwmled.driver.pca9685importPca9685Driver# GPIO driver, which controls pins 17, 22, 23driver=GpioDriver([17,22,23])driver=GpioDriver([17,22,23],freq=200)# To control the pigpio on a other machine use the host and port parameterdriver=GpioDriver([17,22,23],host='other.host',port=8889)# PCA9685 driver which controls pins 1, 2, 3driver=Pca9685Driver([1,2,3])driver=Pca9685Driver([1,2,3],freq=200,address=0x40)ControlEach LED needs a separated driver, which controls the corresponding pins. The number and order of pins depends on the led type:One-color: 1 pinRGB: 3 pins ([R, G, B])RGBW: 4 pins ([R, G, B, W])The supported operations are shown in the following example:frompwmledimportColorfrompwmled.ledimportSimpleLedfrompwmled.led.rgbimportRgbLedfrompwmled.led.rgbwimportRgbwLedfrompwmled.driver.gpioimportGpioDriver# One-color leddriver=GpioDriver([C])led=SimpleLed(driver)led.on()led.brightness=0.5led.transition(5,brightness=0)led.off()# RGB leddriver=GpioDriver([R,G,B])led=RgbLed(driver)led.on()led.color=Color(255,0,0)led.set(color=Color(0,255,0),brightness=0.5)# set two properties simultaneouslyled.transition(5,color=Color(0,0,255),brightness=1)led.off()# RGBW leddriver=GpioDriver([R,G,B,W])led=RgbwLed(driver)# RgbwLed has same interface as RgbLedContributionsPull-requests are welcome, especially for adding new drivers or led types.LicenseThis library is provided underMIT license.
Package: pwmled-ant
python-pwmledpython-pwmledcontrols LEDs connected to a micro controller using pulse-width modulation. It supports one-color, RGB and RGBW leds driven by GPIOs of an Raspberry Pi or a PCA9685 controller.Installationpython-pwmledrequires Python 3. It can be installed using pip:pipinstallpwmledWhen directly controlling the GPIOs of a Raspberry Pi using theGpioDriver(seebelow), thepigpio C libraryis required. It can be installed with the following commands:wgetabyz.co.uk/rpi/pigpio/pigpio.zip
unzippigpio.zipcdPIGPIO
make
sudomakeinstallBesides the library, thepigpiodutility is installed, which startspigpioas daemon. The daemon must be running when using theGpioDriver.sudopigpiodUsageConfigurationpython-pwmledsupports several possibilities for connecting LEDs to your micro controller:GPIO: LEDs can be connected directly to the GPIOs of a Raspberry Pi.PCA9885: APCA9685can be used as I2C-bus PWM controller.frompwmled.driver.gpioimportGpioDriverfrompwmled.driver.pca9685importPca9685Driver# GPIO driver, which controls pins 17, 22, 23driver=GpioDriver([17,22,23])driver=GpioDriver([17,22,23],freq=200)# To control the pigpio on a other machine use the host and port parameterdriver=GpioDriver([17,22,23],host='other.host',port=8889)# PCA9685 driver which controls pins 1, 2, 3driver=Pca9685Driver([1,2,3])driver=Pca9685Driver([1,2,3],freq=200,address=0x40)ControlEach LED needs a separated driver, which controls the corresponding pins. The number and order of pins depends on the led type:One-color: 1 pinRGB: 3 pins ([R, G, B])RGBW: 4 pins ([R, G, B, W])The supported operations are shown in the following example:frompwmledimportColorfrompwmled.ledimportSimpleLedfrompwmled.led.rgbimportRgbLedfrompwmled.led.rgbwimportRgbwLedfrompwmled.driver.gpioimportGpioDriver# One-color leddriver=GpioDriver([C])led=SimpleLed(driver)led.on()led.brightness=0.5led.transition(5,brightness=0)led.off()# RGB leddriver=GpioDriver([R,G,B])led=RgbLed(driver)led.on()led.color=Color(255,0,0)led.set(color=Color(0,255,0),brightness=0.5)# set two properties simultaneouslyled.transition(5,color=Color(0,0,255),brightness=1)led.off()# RGBW leddriver=GpioDriver([R,G,B,W])led=RgbwLed(driver)# RgbwLed has same interface as RgbLedContributionsPull-requests are welcome, especially for adding new drivers or led types.LicenseThis library is provided underMIT license.
Package: pwm-lib
PAiP Web ModulesActual Version : v.0.0.1-dev1PWM is DRY library (If you need something more just make merge request).Free software: MIT licensePyPi Package:https://pypi.python.org/pypi/pwbs/orhttps://pypi.org/project/pwbs/ModulesTODO: Working on itCreditsCreated by Patryk AdamczykHistory0.0.1-dev0 (10.07.2018)First packaging
Package: pwm-lightness
pwm_lightness moduleGenerates lightness correction tables for eyeball pleasing LED brightness.Want a smooth fade on your pulsing LEDs? Want antialiasing on LED matrix fonts?
Use this library to correct your raw linear brightness values for human eyeball
persistence of vision perception sensitivity.The adjustment is otherwise known as theCIE 1931 Lightness
curve.
It is alsocovered in many
books.  The
research was done in the 1920s, winding up as one part of the International
Commission on Illumination (CIE) 1931 standard.This module does work on CircuitPython (and MicroPython if you build with
floating point enabled).  In microcontroller environments recomputing a table
on device is often overkill.  Precompute the table(s) you need using this
library and store them as data to save precious RAM.Smoothly fade an LEDThis example assumesCircuitPythonoradafruit-blinka.importtime,board,pulseio,pwm_lightnessPWM=pwm_lightness.get_pwm_table(0xffff,max_input=100)output_pin=pulseio.PWMOut(board.D13)whileTrue:forvinrange(100,-1,-1):output_pin.duty_cycle=PWM[v]time.sleep(0.02)forvinrange(1,100):output_pin.duty_cycle=PWM[v]time.sleep(0.02)It is similarly useful with the RGB values you send to programmable LED strips.Improve antialiased fonts or other 8-bit imagesShown here usingPillowto make an
antialiased font shine rather than appearing as a bold blur:This example assumes a RPi connected to anI2C Adafruit charlieplexed
LED matrix.importpwm_lightnessPWM=pwm_lightness.get_pwm_table(60)# 0..255 is our max LED PWM value.importboard,busio,adafruit_is31fl3731,PILi2c=busio.I2C(board.SCL,board.SDA)led_matrix=adafruit_is31fl3731.CharlieBonnet(i2c)font=PIL.ImageFont.truetype('fonts/RobotoCondensed-Regular.ttf',16)image=PIL.Image.new('L',(led_matrix.height,led_matrix.width),0)draw=PIL.ImageDraw.Draw(image)# fill=255 gives us the most antialiasing detail to work with.  Control# brightness using the max_output value passed to get_pwm_table() above.draw.text((0,-1),'?',fill=255,font=font)image=image.point(PWM)# Corrects linear 0..255 values for PWM lightness.image=image.transpose(PIL.Image.ROTATE_90)# Match the matrix orientation.led_matrix.image(image)# Send pixels to our LED display.
Package: pwn4u
Hack4U Academy Courses LibraryUna biblioteca Python para consultar cursos de la academia Hack4U.Cursos disponibles:Introducción a Linux [15 horas]Personalización de Linux [3 horas]Introducción al Hacking [53 horas]InstalaciónInstala el paquete usandopip3:pip3installhack4uUso básicoListar todos los cursosfromhack4uimportlist_coursesforcourseinlist_courses():print(course)Obtener un curso por nombrefromhack4uimportget_course_by_namecourse=get_course_by_name("Introducción a Linux")print(course)Calcular duración total de los cursosfromhack4u.utilsimporttotal_durationprint(f"Duración total:{total_duration()}horas")
Package: pwnage
PwnagePython based command line tool for checking theHave I Been Pwneddatabase.Table of ContentsPrerequisitesInstallationUsageLicenseAcknowledgmentsPrerequisitesYou'll need to have Python installed in order to runPwnage. Start by downloading and installing the latest version ofPython 3.Note:Pwnagehas not been tested with Python 2 and will probably not work without changing some things.Installationpip install pwnageUsagepwnage --help
usage: pwnage [-h] [-a <account>] [-g] [-p <password>] [-r] [-v]

Checks passwords against the Have I Been Pwned database
https://haveibeenpwned.com

optional arguments:
  -h, --help            show this help message and exit
  -a <account>, --account <account>
                        account to check against database
  -g, --generate        generate a random password that has not been
                        compromised
  -p <password>, --password <password>
                        password to check against database
  -r, --prompt          prompt for pass to check against database
  -v, --verbose         verbose output, useful for debugging issues

optional arguments '-p/--password' and '-r/--prompt' cannot be used togetherChecking an accountpwnage --account Zoidberg@freemail.web
Zoidberg@freemail.web has been pwned in these breaches:
Unverified: Collection1 on 2019-01-07. Details leaked: Email addresses, Passwords
Verified: VK on 2012-01-01. Details leaked: Email addresses, Names, Passwords, Phone numbersTrying a bad passwordpwnage --password Password1234
This password has been pwned 3621 times!Trying a better passwordpwnage --password "djf;hjdhfjk3;j4r436@@!"
This password has not been pwned yet.Getting prompted for a passwordpwnage --prompt
Password to check:
This password has been pwned 21961 times!Generating a random password that gets checked against HIBP to make sure it has never been compromisedpwnage --generate
V@0l4uMOqXgtCidqU!'gqwlmfO0igcuMLicenseThis project is licensed under the MIT License - see theLICENSEfile for detailsAcknowledgmentsTroy Huntfor creatingHave I Been PwnedRequests: HTTP for Humans
Package: pwnbox
pwnbox-cliThe CLI tool that lets you easily deploy, customize and manage PwnBox.FeaturesA fully customizable deployment of PwnBox using a config file.Automatic update checks for newer PwnBox images and CLI.Verbose output so you can tell what commands are being run.Easy deployment and teardown of PwnBox containers.View image download progress in real-time.Cool ASCII banners.InstallationUsing Python >= 3.6, you can install this CLI using pip directly:pipinstallpwnboxAnd that's it! You're all set to use PwnBox CLI!Usage$pwnbox-h# or --helpusage:pwnbox[-h][-v][--version][-b][-n][-cCONFIG][-tTIMEOUT]COMMAND

LaunchandmanagePwnBoxcontainers.

positionalarguments:COMMANDTheactiontoperform.

optionalarguments:-h,--helpshowthishelpmessageandexit-v,--verboseEnableverboseoutput.--versionPrintthecurrentversionoftheprogram.-b,--no-bannerDisableprintingthebanner.-n,--no-updateDisabletheautomaticcheckfornewerPwnBoxversions.-cCONFIG,--configCONFIGSpecifythepathtoaPwnBoxconfigfile.-tTIMEOUT,--timeoutTIMEOUTSpecifythetimeoutofwaitingforSSHtobeavailable.

Commands:upStartsthePwnBoxcontainerifnotalreadystarted,andconnectstoit.downStopthePwnBoxcontainer.pullDownloadthelatestPwnBoximage.generateWritethedefaultconfigtoafile.ConfigurationAll configuration of the PwnBox container can be done frompwnbox.conf, which is by default stored (and created on first run) at$HOME/.pwnbox/pwnbox.conf.The configuration file syntax is as follows:[IMAGE]# Where to pull the image from, can be 'ghcr.io' or 'registry.hub.docker.com'DOCKER_REPOSITORY=registry.hub.docker.com# The tag of the image to pull. Can be any specific version you'd likeIMAGE_TAG=latest[CONTAINER]# Name of the container that Docker will giveNAME=pwnbox# Hostname inside the containerHOSTNAME=pwnbox# Should the container run privileged?PRIVILEGED=true# Should the container be removed when stopped?AUTO_REMOVE=true# Enable this to run GUI applications outside the containerX11_FORWARDING=true# Enable this to automatically forward all ports and have direct interace access (only linux)HOST_NETWORKING=true# What ports would you like forwarded? (syntax HOST:CONTAINER with multiple ones being comma seperated)# Should keep 2222 for SSH portFORWARDED_PORT=2222:2222,9000-9010:9000-9010# Where to store the data thats from /mnt/externalEXTERNAL_VOLUME=$HOME/.pnbox/external# Where to fetch public ssh keys fromSSH_VOLUME=$HOME/.sshYou can always re-generate this file usingpwnbox generateand copy it to other places to have multiple configurations.How It WorksWhen bringing up a container, the CLI will:Check if Docker is accesibleCheck if the desired PwnBox image is downloadedIf it is, check if there is a newer version of the PwnBox imageIf not, download the latest version available of the imageBring up the PwnBox container with the desired settingsIf X11 Forwarding is enabled,xhostis executed to whitelist remote connections from localhostWait for SSH to be available, then SSH into the containerContributionsPRs are more than welcome! Fix bugs, add features, improve speed or anything else. I will gladly merge them once I have reviewed them.
Package: pwnc
pwncA python library for finding libc offsets based on leaked addresses.
It utilizes thelibc-databaseAPI.Installationpip3 install pwncUsageget_libcRetrieve a libc in the form of a bytestring. Provide known symbol names mapped
to their addresses in memory. Not all symbol names are stored in the database.
Checkoutlibc-databasefor
information on which symbols are stored.>>> import pwnc
>>> known_addresses = {"strncpy": "0x7fffffff0db0",
                       "strcat": "0x7fffffffd800"}
>>> libc_bytestring = pwnc.get_libc(known_addresses)
>>> libc_bytestring[:4]
b'\x7fELF'
>>>queryThis method returns all known symbol offsets for a libc. Provide a dictionary
of symbol names mapped to their in memory offsets>>> import pwnc
>>> known_addresses = {"strncpy": "0x7fffffff0db0",
                       "strcat": "0x7fffffffd800"}
>>> symbols = pwnc.query(known_addresses)
>>> for sym in symbols.items():
...     print(f"{sym[0]} = {hex(sym[1])}")
...
__libc_start_main_ret = 0x21b97
dup2 = 0x110ab0
printf = 0x64f00
puts = 0x80a30
read = 0x110180
str_bin_sh = 0x1b40fa
system = 0x4f4e0
write = 0x110250
Package: pwnedapi
pwnedapi(Have I Been Pwned)A Python library to leverageTroy Hunt'sHave I Been Pwned API v2and thek-Anonymitymodel. Inspired byPhil Nash'sRuby gempwned.SupportThis library is supported on Python versions 3.5 and up. Some development packages
require Python 3.6 or newer so issues regarding the development environment compatibility
should not be reported without first attempting to install newer version of Python.Installation# Option 1: From the PyPI repositorypipinstallpwnedapi# Option 2: For people of great tastepipenvinstallpwnedapi# Option 3: Locallygitclonehttps://github.com/nikoheikkila/pwnedapicdpwnedapi
pythonsetup.pyinstallUsageIn its simplest form you'll only need to use two methods.
Will probably add more if and when the API grows.You can also scan a file of passwords, and export results in any format
supported by thetabliblibrary.CLI usageThe library also installs a command-line tool which you can use to check
your password from the comfort of your terminal. Runpwnedto see all the possibilities.DevelopmentClone the repository normally. Then runmaketo install the dependencies.While developing it's useful to ensure an acceptable code quality where the
Pylama linter is helpful: runmake lintto check your code. Once you have
written your tests runmake testto invoke the PyTest suites.To run tests and calculate the code coverage runmake coverage. This command
will fail if you haven't set up a Codecov project with$CODECOV_TOKENvariable.Remember to document your features and see that the documentation compiles
successfully by runningmake docs.ContributingCheck the source code and issues from this repository, and should anything
interesting pop out feel free to open a pull request.Before your changes will be merged make sure that Travis CI pipeline is green
and code coverage is on acceptable level. GitHub takes care of these
eventually but to save time always consider running the tests locally before
pushing.
Package: pwnedpass
pwnedpasswords toolThis code enables efficient querying of thePwned Passwordsdatabase,withoutconnecting to an external web service. This is primarily a python port ofpwnedpass.
This version uses the full 32 bit integer for each pwned count, and the searching code is written in python instead
of Go since I need to use it in a Flask web application.This includes both a tool to convert the pwned passwords data dump txt file to a binary database format, and a library/CLI
program to query that database. You can install it using pip:pip install pwnedpassBinary file conversion toolIf you'd rather not go to the hassle of running this, you can download a copy of the .bin fileoff my site.First download the latest Pwned Passwords SHA-1 file from here:https://haveibeenpwned.com/Passwords.
Pick the one that's ordered by hash.$ 7z e -so pwned-passwords-sha1-ordered-by-hash-v8.7z pwned-passwords-sha1-ordered-by-hash-v8.txt | python -m pwnedpass.rewrite - pwned-passwords-v8.bin
Reserving space for the index segment...
Writing data segment...
Writing index segment...
OK(If necessary, this procedure can be done from within python, usingpwnedpass.rewrite(in_file, out_file).)The SHA-256 hash of the outputted file should be0a6c80edf2b542bfa7a2d650c10228b5abc8aead69b6985e145ed3c7f30b1b63.Testing the binary fileAssuming you did use v8 of the pwned passwords file, you can test the output file was generated correctly by
running./test.py <path to the binary file>.Search toolThe querying can be done via a CLI script or from within python code.CLI$ pwnedpass pwned-passwords-v8.bin 9e7c97801cb4cce87b6c02f98291a6420e6400ad
10664
$ echo $?
2
$ pwnedpass pwned-passwords-v8.bin 4e0ff63499ff9931ec2980c6a71d63cab4f94f99
0
$ echo $?
0
$ pwnedpass pwned-passwords-v8.bin
Password: 
6753Wherepwned-passwords-v8.binis the output of the rewrite tool.For compromised password hashes, output the number of times the password was compromised, and return an unsuccessful error code != 1.For non-compromised password hashes, output 0, and exit successfully.As a libraryimport hashlib
import pwnedpass

user_password = read_password_from_web_form()

with open('pwned-passwords-v8.bin', 'rb') as f:
	if count := pwnedpass.search(f, hashlib.sha1(user_password.encode()).digest()):
		return f'Please use a different password. This one has been compromised {count} times.'
	else:
		# DO NOT USE the sha1 digest in your user database. SHA1 should *only* be used for checking if it's compromised.
		hash = salt_and_hash_password(user_password)
		save_to_database(hash)LicenseBSD 3-clause, per the original. See LICENSE for details.
Package: pwnedpasswds
pwnedpasswdsA python wrapper for thePwned PasswordsAPI.UsageYou can either use pwnedpasswds in your python code or as a command line utility.Inside python>>>frompwnedpasswdsimportcheck_passwd>>>count=check_passwd("Password1")>>>count116789Inside the commandlineYou can supply passwords to pwnedpasswds as a command line argument, or thorugh stdin.$pwnedpasswdscorrecthorsebatterystaple120$echo"linux4life"|pwnedpasswds44$catpasswds.txt
troyhunt
p455w0rd
14m501337

$catpasswds.txt|pwnedpasswds111561114
Package: pwned-passwords-django
pwned-passwords-djangoprovides helpers for working with thePwned Passwords database from Have I Been PwnedinDjangopowered sites. Pwned Passwords is
an extremely large database of passwords known to have been
compromised through data breaches, and is useful as a tool for
rejecting common or weak passwords.There are three main components to this application:A password validatorwhich integrates withDjango’s password-validation toolsand checks the Pwned Passwords database.A Django middleware(supporting both sync and async requests) which automatically checks
certain request payloads against the Pwned Passwords database.An API clientproviding direct access (both sync and async) to the Pwned Passwords
database.All three use a secure, anonymized API whichnever transmits any
password or its full hash to any third party.UsageThe recommended configuration is to enable both the validator and the
automatic password-checking middleware. To do this, make the following
changes to your Django settings.First, add the validator to your AUTH_PASSWORD_VALIDATORS list:AUTH_PASSWORD_VALIDATORS=[# ... other password validators ...{"NAME":"pwned_passwords_django.validators.PwnedPasswordsValidator",},]Then, add the middleware to your MIDDLEWARE list:MIDDLEWARE=[# .. other middlewares ..."pwned_passwords_django.middleware.pwned_passwords_middleware",]For more details, consultthe full documentation.
Package: pwnedpasswords-offline
Pwned Passwords check (offline)FeaturesCheck passwords or plain SHA-1 hashes against haveibeenpwned password listFully offline operation, needs to be provided with external database file (~35 GB)OptionalBloom filterto speed up common (negative) caseQuickstartDownload "SHA-1" version "(ordered by hash)" fromhttps://haveibeenpwned.com/PasswordsExtract file, yieldingpwned-passwords-sha1-ordered-by-hash-v8.txt(for current version 8), put intodatadirectory under current directoryInstall withpip install pwnedpasswords_offlineOptional: Seed Bloom filter:pwnedpasswords_offline_seed_bloom, takes about 45min to run, will generate a 512MiB fileSpeed(Results approximate, measured on my personal laptop)w/o Bloom filterw/ Bloom filterPositive match (pwned)61 us/op198 us/opNegative match121 us/op14 us/opAverage @ 1% positive64 us/op16 us/opThese results were measured with batch operation at 20000 items. One-shot operation will be much slower due to the overhead of opening data files.The data files are opened with mmap(2), and accessed in random order. No explicit non-garbage-collected Python objects are generated during operation, so it should be safe to open the data files once at the start of your application and then keep them open until your process ends. Note: The memory mapping will not survive a fork(2), so you cannot use a pre-forking webserver such as gunicorn to only open the data files once. Each process needs to open its own copy.Simple usagefrompwnedpasswords_offlineimportPwnedPasswordsOfflineCheckerifPwnedPasswordsOfflineChecker("data/pwned-passwords-sha1-ordered-by-hash-v8.txt").lookup_raw_password("Password1!"):print("Pwned!")Batch usageYou can also pre-open the database file, especially if you're checking multiple passwords in bulk:frompwnedpasswords_offlineimportPwnedPasswordsOfflineCheckerchecker=PwnedPasswordsOfflineChecker("data/pwned-passwords-sha1-ordered-by-hash-v8.txt")checker.open()forpasswordin["Password1!","correct horse battery staple","actress stapling driver placidly swivel doorknob"]:ifchecker.lookup_raw_password(password):print(f"'{password}' is pwned!")checker.close()You should not forget to call.close()after you're done.As context managerYou can use the object as a context manager to automatically open and close it:frompwnedpasswords_offlineimportPwnedPasswordsOfflineCheckerwithPwnedPasswordsOfflineChecker("data/pwned-passwords-sha1-ordered-by-hash-v8.txt")aschecker:forpasswordin["Password1!","correct horse battery staple","actress stapling driver placidly swivel doorknob"]:ifchecker.lookup_raw_password(password):print(f"'{password}' is pwned!")Check hash directlyInstead of calling.lookup_raw_password()you can call.lookup_hash()if you already have the plain SHA-1 hash:frompwnedpasswords_offlineimportPwnedPasswordsOfflineCheckerifPwnedPasswordsOfflineChecker("data/pwned-passwords-sha1-ordered-by-hash-v8.txt").lookup_hash("32CA9FD4B3F319419F2EA6F883BF45686089498D"):print("Pwned!")