All Projects → npryce → Snodge

npryce / Snodge

Licence: apache-2.0
Randomly mutate JSON, XML, HTML forms, text and binary data for fuzz testing

Programming Languages

javascript
184084 projects - #8 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to Snodge

Render
Go package for easily rendering JSON, XML, binary data, and HTML templates responses.
Stars: ✭ 1,562 (+1190.91%)
Mutual labels:  json, xml, binary, text
Iguana
universal serialization engine
Stars: ✭ 481 (+297.52%)
Mutual labels:  json, xml, binary
Fspickler
A fast multi-format message serializer for .NET
Stars: ✭ 299 (+147.11%)
Mutual labels:  json, xml, binary
Ps Webapi
(Migrated from CodePlex) Let PowerShell Script serve or command-line process as WebAPI. PSWebApi is a simple library for building ASP.NET Web APIs (RESTful Services) by PowerShell Scripts or batch/executable files out of the box.
Stars: ✭ 24 (-80.17%)
Mutual labels:  json, xml, text
I7j Pdfhtml
pdfHTML is an iText 7 add-on for Java that allows you to easily convert HTML and CSS into standards compliant PDFs that are accessible, searchable and usable for indexing.
Stars: ✭ 104 (-14.05%)
Mutual labels:  xml, forms
Iso 3166 Countries With Regional Codes
ISO 3166-1 country lists merged with their UN Geoscheme regional codes in ready-to-use JSON, XML, CSV data sets
Stars: ✭ 1,372 (+1033.88%)
Mutual labels:  json, xml
Jafar
🌟!(Just another form application renderer)
Stars: ✭ 107 (-11.57%)
Mutual labels:  json, forms
React Jsonschema Form
A React component for building Web forms from JSON Schema.
Stars: ✭ 10,870 (+8883.47%)
Mutual labels:  json, forms
Test Each
🤖 Repeat tests. Repeat tests. Repeat tests.
Stars: ✭ 89 (-26.45%)
Mutual labels:  fuzzing, fuzz-testing
Ansvif
A Not So Very Intelligent Fuzzer: An advanced fuzzing framework designed to find vulnerabilities in C/C++ code.
Stars: ✭ 107 (-11.57%)
Mutual labels:  fuzzing, fuzz-testing
Webapiclient
An open source project based on the HttpClient. You only need to define the c# interface and modify the related features to invoke the client library of the remote http interface asynchronously.
Stars: ✭ 1,618 (+1237.19%)
Mutual labels:  json, xml
Crawlerpack
Java 網路資料爬蟲包
Stars: ✭ 99 (-18.18%)
Mutual labels:  json, xml
Metayaml
A powerful schema validator!
Stars: ✭ 92 (-23.97%)
Mutual labels:  json, xml
Filecontextcore
FileContextCore is a "Database"-Provider for Entity Framework Core and adds the ability to store information in files instead of being limited to databases.
Stars: ✭ 91 (-24.79%)
Mutual labels:  json, xml
Repurrrsive
Recursive lists to use in teaching and examples, because there is no iris data for lists.
Stars: ✭ 112 (-7.44%)
Mutual labels:  json, xml
Yq
Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
Stars: ✭ 1,688 (+1295.04%)
Mutual labels:  json, xml
Bible Database
Bible databases as XML, JSON, SQL & SQLITE3 Database format for various languages. Developers can download it freely for their development works. Freely received, freely give.
Stars: ✭ 111 (-8.26%)
Mutual labels:  json, xml
Marklogic Data Hub
The MarkLogic Data Hub: documentation ==>
Stars: ✭ 113 (-6.61%)
Mutual labels:  json, xml
Formatfuzzer
FormatFuzzer is a framework for high-efficiency, high-quality generation and parsing of binary inputs.
Stars: ✭ 117 (-3.31%)
Mutual labels:  binary, fuzzing
Internettools
XPath/XQuery 3.1 interpreter for Pascal with compatibility modes for XPath 2.0/XQuery 1.0/3.0, custom and JSONiq extensions, XML/HTML parsers and classes for HTTP/S requests
Stars: ✭ 82 (-32.23%)
Mutual labels:  json, xml

Snodge

Kotlin Build Status Maven Central npm

A small, extensible Kotlin library to randomly mutate JSON & XML documents, text and binary data. Useful for fuzz testing.

Examples of things you can test by mutating known good data:

  • unexpected structures will not make your application code throw unchecked exceptions
  • your application code ignores additional properties
  • your application code does not throw unchecked exceptions when parsing values from text properties
  • your application does not instantiate arbitrary classes named in data (a potential security risk)
  • your application copes with invalid Unicode encoding of text
  • and much, much more!

See an interactive demonstration.

In a Nutshell

Add a dependency on Snodge (replace <version> with the version of Snodge you wish to use):

testImplementation 'com.natpryce:snodge:<version>'

For the JVM platform, add an implementation of the JSR-374 JSONP API, such as:

testRuntimeOnly 'org.glassfish:javax.json:1.1'

Import the library:

import com.natpryce.snodge.mutants
import com.natpryce.snodge.json.defaultJsonMutagens

Output 10 random mutations of the JSON document:

val random = Random()
val originalJson = "{\"x\": \"hello\", \"y\": [1,2,3]}"

random.mutants(defaultJsonMutagens().forStrings(), 10, originalJson)
    .forEach(::println)

Example output:

{"x":"hello","y":[1,2,3,null]}
{"y":[1,2,3],"x":{}}
{"x":"hello","y":[2,3]}
{"x":"hello","y":[{},2,3]}
{"x":"hello"}
{"x":"hello","y":[1,2,{}]}
{"x":"hello","y":[1,null,3]}
{"y":[1,2,3],"x":"hello"}
{"y":[1,2,3],"x":"a string"}
{"x":"hello","y":[99,2,3]}

API Adapters

On the JVM, Snodge can mutate the JSON object models of the Jackson, GSON & JSR-374 JSONP and Argo APIs, XML DOM, and JSON and XML serialised as text and binary.

On JavaScript, Snodge can mutate XML as DOM Documents, and XML and JSON as text.

For more information, continue reading the documentation.

Other versions

The Kotlin library is version 3.x.x.x.

Previous versions:

  • Version 2.x.x.x (java8 branch) is for Java 8, and uses streams and Java 8 function types
  • Version 1.x.x.x (java7 branch) is for Java 7 and depends on Guava

Download from Maven Central

Download from NPM

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].