Skip to main content

A library that returns naughty strings from an offline database of Big List of Naughty Strings & emojis

Project description

https://badge.fury.io/py/naughty-string-validator.svg https://travis-ci.org/shashikumarraja/naughty_string_validator_python.svg?branch=master https://coveralls.io/repos/github/shashikumarraja/naughty_string_validator_python/badge.svg?branch=master Updates Python 3

A python library that returns naughty strings from an offline database of Big List of Naughty Strings and emojis. The db will be continuously growing with each release.

The Big List of Naughty Strings is an evolving list of strings which have a high probability of causing issues when used as user-input data.

This library can be inluded in the test automation framework for API, UI, or DB testing to validate them against naughty strings.

Installation

pip install naughty_string_validator

Usage

from naughty_string_validator import *
  • To get a random naughty string from the list
print(get_random_naughty_string())

#output
"<a href=\"\\xE2\\x80\\x88javascript…(1)\" id=\"fuzzelement1\">test</a>"
  • To get entire naughty string list
print(get_naughty_string_list())

#output
["", "undefined", "undef", "null", "NULL", "(null)", "nil", …]
  • To get a random emoji from the emoji list
print(get_random_emoji())

#output
"πŸ˜ƒ"
  • To get a entire emoji list
print(get_emoji_list())

#output
["πŸ˜€", "πŸ˜ƒ", "πŸ˜„", "😁", "πŸ˜†", "πŸ˜…", "πŸ˜‚", "🀣", "☺️", "😊", …]

Tests

  • To run tests

    py.test –cov=naughty_string_validator test/ –verbose

History

0.1.1 (2018-09-03)

  • Removed test from build.

0.1.0 (2018-09-03)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for naughty-string-validator, version 0.1.2
Filename, size & hash File type Python version Upload date
naughty_string_validator-0.1.2-py2.py3-none-any.whl (39.9 kB) View hashes Wheel 2.7
naughty_string_validator-0.1.2.tar.gz (40.5 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page