当前位置:网站首页>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))
边栏推荐
- 基于三维GIS开发的水电工程建设方案
- OpenSSL SSL_read: Connection was reset, errno 10054
- Chapter VI skills related to e-learning 5 (super parameter verification)
- golang convert json string to map
- 22map introduction and API
- Financial management [5]
- Harmonyos accessing database instances (3) -- use ORM bee to test how good harmonyos is
- 7-2 后序+中序序列构造二叉树
- Laravel add helper file
- Case analysis: using "measurement" to improve enterprise R & D efficiency | ones talk
猜你喜欢

Blogs personal blog test point (manual test)

Jetpack Compose 最新进展

宁德时代定增450亿:高瓴认购30亿 曾毓群仍控制23%股权
![[JS] - [linked list - application] - learning notes](/img/e1/76d2a347b05212de349322f43e0b3a.png)
[JS] - [linked list - application] - learning notes

华为机器学习服务语音识别功能,让应用绘“声”绘色

7-7 数字三角形

Laravel pagoda security configuration

Redis source code analysis skip list

明天就是PMP考试了(6月25日),这些大家都了解了吗?

Simpledateformat concrete classes for formatting and parsing dates
随机推荐
Actipro WPF Controls 2022.1.2
376. machine tasks
Websocket learning
OpenSSL SSL_ read: Connection was reset, errno 10054
Building Survey [1]
【js】-【字符串-应用】- 学习笔记
安装IBM CPLEX学术版 academic edition | conda 安装 CPLEX
Actipro WPF Controls 2022.1.2
Installing IBM CPLEX academic edition | CONDA installing CPLEX
[JS] - [array, Stack, queue, Link List basis] - Notes
Binary lookup array subscript
7-2 求解买股票问题
(Smooth)ScrollToPosition doesn't work properly with RecyclerView
SQL -convert function
Building Survey [3]
Blogs personal blog project details (servlet implementation)
File contains vulnerability issues
Listen to the markdown file and hot update next JS page
257. 关押罪犯
明天就是PMP考试了(6月25日),这些大家都了解了吗?