https://github.com/polarspetroll/escapeapi
An API for escaping different kind of queries
https://github.com/polarspetroll/escapeapi
api directory-traversal os-command-injection path-traversal security xss
Last synced: about 1 month ago
JSON representation
An API for escaping different kind of queries
- Host: GitHub
- URL: https://github.com/polarspetroll/escapeapi
- Owner: polarspetroll
- Created: 2021-05-28T20:55:07.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-30T18:38:20.000Z (almost 4 years ago)
- Last Synced: 2025-03-29T06:33:17.740Z (about 2 months ago)
- Topics: api, directory-traversal, os-command-injection, path-traversal, security, xss
- Language: Ruby
- Homepage: https://s.polarspetroll.repl.co/
- Size: 3.91 KB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Escape API
an API for escaping html, shell and path queries
---
## Documentation
**parameters**
- **method** escaping method
- **data** string to be escaped**available methods**
Method | Description | Type | Prevention|
|---|---|---|---|
| html | HTML escape | string | XSS
| shell| UNIX bourne shell escape| string | os command injection
| path | UNIX path escape | string | directory traversal#### examples
```
curl "https://s.polarspetroll.repl.co/api?method=html&data=<>/>,test'"
```
output :
```json
{
"ok":true,
"data":"<>/>,test'"
}
```
---
```
curl "https://s.polarspetroll.repl.co/api?method=shell&data=ls -la | cat /etc/passwd"
```output:
```json
{
"ok":true,
"data":"ls\\ -la\\ \\|\\ cat\\ /etc/passwd"
}
```
---```
curl "https://s.polarspetroll.repl.co/api?method=path&data=../../../../../../../etc/passwd"
```output:
```json
{
"ok":true,
"data":"./././././././etc/passwd"
}
```