Skip to content

jpeisenbarth/C-Sharp-Vuln-test-suite-gen

 
 

Repository files navigation

C# Vulnerability test suite

Collection of vulnerable and fixed C# synthetic test cases expressing specific flaws.

Written in Python 3

Dependencies

  • Jinja2 (depends on MarkupSafe)
  • Docopt
  • Setuptools (for setup.py)
  • Sphinx (for generating the doc)

You have three ways to install these dependencies

Using PIP

We encourage you to use pip (installation instructions) to install these dependencies (choose one):

- [sudo] pip3 install -r requirements.txt (as root, system-wide)
- pip3 install --user -r requirements.txt (only for your user)

Using a Package Manager

You can also install this dependency with your package manager (if such a package exists in your distribution) :

- [sudo] aptitude install python3-jinja2 (for GNU/Linux Debian for example)
- [sudo] aptitude install python3-docopt
- [sudo] aptitude install python3-setuptools
- [sudo] aptitude install python3-sphinx

Manually Installation

Jinja2 installation instructions here

Docopt installation instructions here

Setuptools site

Execute it

$ python3 test_cases_generator.py -l cs

How to indent the generated source code ?

Artistic can indent C# source code.

Instructions :

$ ./astyle -r TestSuiteXXX*.cs --style=java --suffix=none --delete-empty-lines --indent-switches

where TestSuiteXXX*.cs is the path to the file you want to indent (it won't save a copy).

Need help ?

$ python3 test_cases_generator.py --help

Discussion

For discussion please send me an email at: Bertrand 'dot' STIVALET 'at' gmail.com

About

C# synthetic test cases generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 86.3%
  • Makefile 6.7%
  • Batchfile 6.2%
  • Shell 0.8%