https://github.com/bararchy/crystal-libinjection
Binding in Crystal around Libinjection
https://github.com/bararchy/crystal-libinjection
Last synced: over 1 year ago
JSON representation
Binding in Crystal around Libinjection
- Host: GitHub
- URL: https://github.com/bararchy/crystal-libinjection
- Owner: bararchy
- License: mit
- Created: 2015-05-27T10:46:14.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-11T08:36:44.000Z (about 11 years ago)
- Last Synced: 2025-02-05T21:36:48.113Z (over 1 year ago)
- Language: Crystal
- Size: 617 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# crystal-libinjection
Crystal binding around client9 [libinjection](https://github.com/client9/libinjection)
[](http://www.docrystal.org/github.com/bararchy/crystal-libinjection)
## Installation
Add it to `Projectfile`
```crystal
deps do
github "bararchy/crystal-libinjection"
end
```
## Usage
```crystal
require "crystal-libinjection"
# Pass a string to the module, and check if the string contains SQL Injections
if Libinjection::SqliScan.contains_sqli?(user_request)
puts "SQL injection found".colorize.green
else
puts "String is clear".colorize.green
end
```
```crystal
user_request = "Hello Just Testing"
=> String is clear
user_request = "Hello' OR 'a' = 'a' --DROP TABLE"
=> SQL injection found
```
## Development
* Add instructions on how to compile libinjection from sources
* Add a script to update it
## Contributing
1. Fork it ( https://github.com/bararchy/crystal-libinjection/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
## Contributors
- [bararchy](https://github.com/bararchy) bararchy - creator, maintainer