当前位置:网站首页>猜JWT关键字
猜JWT关键字
2022-07-24 17:59:00 【划水小将军】
- 确定加密方式
- 使用的包(依赖)[authlib.jose,auth0.jwt]
- 破解sercet
写着玩的,没有什么价值,成功就和彩票一样,记录一下;
就是靠猜,哈哈哈~~
python
''' @Author: Jeff.zheng @Date : 2022/4/22 @Desc : '''
from authlib.jose import jwt
def bruteforce(token):
#这里是秘钥,可以挨着试,成功极低
easykeys = ["sercet1", "sercet2", "sercet3", "sercet5"]
for easykey in easykeys:
try:
jwt.decode(token.encode(encoding='utf-8'), easykey)
print("秘钥:", easykey)
except Exception as e:
pass
print("没有匹配到秘钥")
if __name__ == '__main__':
token = "token"
bruteforce(token)
java代码
import com.auth0.jwt.JWT;
import com.auth0.jwt.JWTVerifier;
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.interfaces.DecodedJWT;
/** * @author: Jeff.zheng * @description: * @date: 2022/7/20 15:02 * @version: 1.0.0 */
public class TestToken {
public static String token ="token";//这里放要破解的token
public static void main(String[] args) {
String [] mykeys = {
"sercet1","sercet2","sercet3","sercet4" };//这里放可能的秘钥
for (String mykey :mykeys ) {
if(forceToken(mykey)){
System.out.println("成功,key=》"+mykey);//成功的key
}else {
System.out.println("失败,key=》"+mykey);//失败的key
}
}
}
static Boolean forceToken(String secrete){
try {
JWTVerifier jwtVerifier = JWT.require(Algorithm.HMAC256(secrete)).build();
DecodedJWT verify = null;
verify = jwtVerifier.verify(token);
return true;
}catch (Exception e){
return false;
}
}
}
边栏推荐
- 继承与派生
- Tensorflow introductory tutorial (38) -- V2 net
- 使用Prometheus+Grafana监控MySQL性能指标
- Section 10 cache breakdown follow Daewoo redis ------- directory post
- [leetcode] 30. Concatenate substrings of all words
- 0629 ~ SaaS platform design ~ global exception handling
- Single cell code analysis - gynecological cancer single cell transcriptome and chromatin accessibility analysis 1
- Definition and storage of adjacency table and adjacency storage of directed graph and undirected graph
- In depth analysis of the famous Alibaba cloud log4j vulnerability
- 05mysql lock analysis
猜你喜欢
Link editing tips of solo blog posts illegal links

Codeforces Round #794 (Div. 2)(A.B.C)

PXE efficient batch network installation

Internship report 1 - face 3D reconstruction method

Inherit, override, overload

Use prometheus+grafana to monitor MySQL performance indicators

OpenCV 图片旋转

Three ways of redis cluster

使用Prometheus+Grafana监控MySQL性能指标

Step by step introduction to the development framework based on sqlsugar (12) -- split the content of the page module into components to realize the division and rule processing
随机推荐
生信常用分析图形绘制02 -- 解锁火山图真谛!
[leetcode] 30. Concatenate substrings of all words
0701~ holiday summary
获取1688app上原数据 API
文件上传漏洞——.user.ini与.htaccess
0621~ES&Lucene
JS & TS learning summary
再见收费的Navicat!这款开源的数据库管理工具界面更炫酷!
0621~ES&Lucene
Alibaba /1688 API instructions for searching products by map (pailitao)
T245982 "kdoi-01" drunken flower Yin
Opencv picture rotation
C语言实现静态版本的通讯录
Laravel notes - RSA encryption of user login password (improve system security)
700. Search DFS method in binary search tree
Has polardb for PostgreSQL entered the list of Xinchuang database?
The use and Simulation of character and string library functions in C language
C language to achieve a static version of the address book
Laravel笔记-用户登录时密码进行RSA加密(提高系统安全性)
213. Looting II - Dynamic Planning