当前位置:网站首页>Guess JWT keyword
Guess JWT keyword
2022-07-24 18:01:00 【Rowing little general】
- Determine the encryption method
- The bag used ( rely on )[authlib.jose,auth0.jwt]
- Crack sercet
It says play , No value , Success is like lottery , Make a note of ;
Just guess , Ha ha ha ~~
python
''' @Author: Jeff.zheng @Date : 2022/4/22 @Desc : '''
from authlib.jose import jwt
def bruteforce(token):
# Here is the secret key , You can try next to , Very low success
easykeys = ["sercet1", "sercet2", "sercet3", "sercet5"]
for easykey in easykeys:
try:
jwt.decode(token.encode(encoding='utf-8'), easykey)
print(" Secret key :", easykey)
except Exception as e:
pass
print(" There is no match to the secret key ")
if __name__ == '__main__':
token = "token"
bruteforce(token)
java Code
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";// Here are the ones to be cracked token
public static void main(String[] args) {
String [] mykeys = {
"sercet1","sercet2","sercet3","sercet4" };// Here is the possible secret key
for (String mykey :mykeys ) {
if(forceToken(mykey)){
System.out.println(" success ,key=》"+mykey);// The success of key
}else {
System.out.println(" Failure ,key=》"+mykey);// The failure of the 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
- 面会菜评论分析
- Dry goods | three sub domain name collection tools worth collecting
- 仅需一个依赖给Swagger换上新皮肤,既简单又炫酷!
- Alibaba /1688 API instructions for searching products by map (pailitao)
- [network security] analysis vulnerability of website Middleware
- 05mysql lock analysis
- Blackmagic Fusion Studio 18
- 干货|值得收藏的三款子域名收集工具
- redis集群的三种方式
猜你喜欢

700. 二叉搜索树中的搜索-dfs法

干货|值得收藏的三款子域名收集工具
![[leetcode] 30. Concatenate substrings of all words](/img/21/3965532a31553cfe6edf64ca5de3f4.png)
[leetcode] 30. Concatenate substrings of all words

SSM framework learning
Link editing tips of solo blog posts illegal links

Array double pointer - deliberate practice

700. Search DFS method in binary search tree

C语言编程训练题目:左旋字符串中的k个字符、小乐乐与欧几里得、打印箭型图案、公务员面试、杨树矩阵

生信常用分析图形绘制02 -- 解锁火山图真谛!

Install jumpserver
随机推荐
简单测试JS代码
Shardingsphere database read / write separation
ROC and AUC details of the recommended system
0625~<config>-<bus>
Development Series III of GaN (lapgan, srgan)
0629 ~ SaaS platform design ~ global exception handling
Mac database management software Navicat premium essentials mac
Three ways of redis cluster
Blackmagic Fusion Studio 18
2022最新短视频去水印解析API接口分享
生信常用分析图形绘制02 -- 解锁火山图真谛!
Link editing tips of solo blog posts illegal links
What are the pitfalls from single architecture to distributed architecture?
面会菜评论分析
Single cell code analysis - gynecological cancer single cell transcriptome and chromatin accessibility analysis 1
Section 7 Data Dictionary: hash followed by Daewoo redis ------- directory post
How does win11 enhance the microphone? Win11 enhanced microphone settings
Class bytecode file
安装JumpServer
[leetcode] 30. Concatenate substrings of all words