一个命令行工具,用于检测共享密码
列出选项:
Shard (1.5) can run in 3 modes:
1) Single user single password - Use -u and -p
2) Single user multiple passwords - Use -u and -f
3) Multiple users and multple passwords - Use -f only
For more detailed usage examples see the wiki.
Usage: java -jar shard-1.5.jar [options]
-u, --username <value> Username to test
-p, --password <value> Password to test
-f, --file <value> A path to a file containing a set of credentials or passwords
--format <value> The format of the credentials. Must be a regular expression with 2 capture groups. The first capture group for the username and the second capture group for the password. Defaults to a regex that will match:
"username":"password"
-l, --list List available modules
-v, --version Print the version
--modules <value> Only run specific modules. A comma separated list
--help Prints this usage text
列出可用模块:
$ java -jar shard.jar -l
Available modules:
Facebook
LinkedIn
Reddit
Twitter
Instagram
GitHub
BitBucket
Kijiji
DigitalOcean
Vimeo
Laposte
DailyMotion
给定用户名和密码,shard 将尝试在多个站点上进行身份验证:
$ java -jar shard.jar -u username-here -p password-here
21:16:25.950 [+] Running in single credential mode
21:16:30.302 [+] username-here:password-here - Reddit, Instagram
要测试多个凭据,请提供文件名。默认情况下,它期望每行一个凭据,格式为 "username":"password"。可以通过 --format 选项提供自定义格式:
$ java -jar shard.jar -f /tmp/creds.txt
21:16:39.501 [+] Running in multi-credential mode
21:16:39.516 [+] Parsed 2 credentials
21:16:42.794 [+] username1:password1 - Reddit, Instagram
21:16:45.189 [+] username2:password2 - Facebook, LinkedIn, Twitter
从 发布标签页 获取最新版本,该版本使用 sbt assembly 构建为一个 fat jar。
或者自己构建,使用 sbt:sbt assembly
添加新模块很简单。创建一个继承自 AbstractModule 的新类,放在模块包中,并将模块添加到 ModuleFactory。
AbstractModule 有一个抽象方法:
def tryLogin(creds: Credentials): Boolean
该方法接受一个 Credentials 对象,并返回一个布尔值,表示登录是否成功。我建议使用 TwitterModule 作为模板。关于添加新模块的深入说明,请参见 wiki 上的示例
依赖:
如果你不喜欢 Scala,可以查看 secondary_implementations,这些是 shard 在其他语言中的重写。如果你为其中一个实现添加了模块,我也会将其用 Scala 重写并添加到主项目中。
联系我,加入 Gitter 房间,或使用此 GitHub 项目
喜欢这个项目?考虑捐赠:1EpSQumsD2EFKnisJXjStsUVsXpF4ge8dj