更新README

This commit is contained in:
Zongmin Lei
2014-03-03 19:55:31 +08:00
parent f6b3e2426f
commit 5012eb2ad6
2 changed files with 39 additions and 3 deletions

View File

@@ -58,8 +58,26 @@ Run `npm test` command in the source directary.
## Active Test
Run `node lib/cli.js` command in the source directary, them you can type HTML
code in the command-line, and check the filtered output.
Run the following command, them you can type HTML
code in the command-line, and check the filtered output:
```bash
$ xss -t
```
### Use the xss command line tool
You can use the xss command line tool to process a file. Usage:
**xss -i <input_file> -o <output_file>**
Example:
```bash
$ xss -i origin.html -o target.html
```
For more details, please run `$ xss -h` to see it.
## Usages

View File

@@ -53,7 +53,11 @@
## 在线测试
在源码目录执行命令: `node lib/cli.js` 可在命令行中输入HTML代码并看到过滤后的代码
执行以下命令可在命令行中输入HTML代码并看到过滤后的代码
```bash
$ xss -t
```
## 使用方法
@@ -85,6 +89,20 @@ alert(html);
</script>
```
### 使用命令行工具来对文件进行XSS处理
可通过内置的 `xss` 命令来对输入的文件进行XSS处理。使用方法
**xss -i <源文件> -o <目标文件>**
例:
```bash
$ xss -i origin.html -o target.html
```
详细命令行参数说明,请输入 `$ xss -h` 来查看。
## 自定义过滤规则