当前位置:网站首页>Simple use of libnum Library (hexadecimal string conversion)
Simple use of libnum Library (hexadecimal string conversion)
2022-06-24 23:29:00 【Snow moon 30】
import libnum
# String to decimal
s="flag{123}"
print(libnum.s2n(s))
# Decimal to string
j=1889377532526015427453
print(libnum.n2s(j))
# Hexadecimal conversion string
n=0x666c61677b3132337d
print(libnum.n2s(n))
# String to hex
print(hex(libnum.s2n("flag{123}")))
# Binary to string
b='01100001011000110110001001100100'
print(libnum.b2s(b))
# String to binary
s = 'acbd'
print(libnum.s2b(s))
# Digital to binary string
# n=0xfff
# print(s2b(n2s(n)))
# Factorization : return n And the number of each prime factor .
print(libnum.factorize(1024))
# Convert any base to decimal
print(int('01111',2))
print(int('0x64',16))
边栏推荐
- Record the range of data that MySQL update will lock
- R语言dplyr包select函数将dataframe数据中的指定数据列移动到dataframe数据列中的第一列(首列)
- websocket学习
- Jetpack Compose 最新进展
- Concurrent shared model management
- 7-2 求解买股票问题
- 数字IC设计经验整理(二)
- Mousse shares listed on Shenzhen Stock Exchange: becoming popular by mattress and "foreign old man", with a market value of 22.4 billion yuan
- 基于三维GIS开发的水电工程建设方案
- Chapter VI skills related to e-learning 5 (super parameter verification)
猜你喜欢
Quickly build KVM virtual machine on # yyds dry goods inventory # physical machine
Redis source code analysis skip list
Idea creation module prompt already exists
点的螺旋距离
[JS] - [stack, team - application] - learning notes
【js】-【數組、棧、隊列、鏈錶基礎】-筆記
Latest development of jetpack compose
Blogs personal blog project details (servlet implementation)
【js】-【数组、栈、队列、链表基础】-笔记
[basic knowledge] ~ half adder & full adder
随机推荐
Laravel study notes
Blogs personal blog test point (manual test)
安装IBM CPLEX学术版 academic edition | conda 安装 CPLEX
Redis source code analysis skip list
R language dplyr package group_ By function and summarize_ The at function calculates the dataframe to calculate the number of counts and the mean value of different groups (summary data by category v
数字IC设计经验整理(二)
去处电脑桌面小箭头
MySQL semi sync replication
Dig deep into MySQL - resolve the difference between clustered and non clustered indexes
Still using simpledateformat for time formatting? Be careful of project collapse
golang convert map to json string
Chapter VI skills related to e-learning 5 (super parameter verification)
go 语言指针,值引用和指针引用
372. chessboard coverage
監聽 Markdown 文件並熱更新 Next.js 頁面
华为机器学习服务语音识别功能,让应用绘“声”绘色
R语言dplyr包select函数将dataframe数据中的指定数据列移动到dataframe数据列中的第一列(首列)
Building Survey [1]
Construction equipment [4]
Websocket learning