Code Monkey home page Code Monkey logo

asn.1-tools's Introduction

ASN.1 工具使用手册

Environment

  1. Python 3.9
  2. asntools - Python and install with cmd pip install asn1tools

更新记录

版本 时间 P 说明
v1.01 10/12/2022 Hasan 1. 可以加密和解密
v1.02 10/23/2022 Hasan 1. 修复由于结构体编译失败,加密和解密失败闪退
2. 可以拉伸窗口至全屏
3. 增加解密后结果前缩进,提高可读性
v1.03 10/29/2022 Hasan 1. 添加打开ASN库文件按钮 单击选中后可直接编译;双击可以查看文件内容
2. 添加错误提示窗口,错误信息打印至Result窗口
3. 添加图标和作者信息

1. 界面

image

  1. 点击Reset按钮可以重置四个文本框

  2. 点击Compile按钮可以编译ASN.1结构体,编译过程信息、错误信息在Results框中展示

  3. 选择Encode进行加密,选择Decode进行解密

    image

  4. 点击Encode/Decode按钮可以对加密/解密框中的内容进行加密/解密,结果在Output框中展示

  5. 选择编译格式,默认为 uper

  6. 点击Encode/Decode按钮可以进行加密或解密

  7. 结果在Console Output框中展示

  8. 点击 Open ASN1 Library按钮可以打开ASN库文件,位置是当前exe所在目录下的asn_dir文件夹。将您所需的ASN库复制到该文件夹下,重新打开工具后即可查看到库文件

    image

  9. 单击选中某个库文件后,再点击Compile按钮即可编译该库文件

  10. 双击选中某个库文件即可查看该库文件内容,点击Compile即可编译该库文件

  11. 点击Close ASN1 Library即可返回文本输入界面

2. 流程

(加密流程为1 -> 2 -> 3 -> 4 -> 5)(解密流程为1 -> 2 -> 3 -> 6 -> 7)

  1. 在图中所示的文本框中输入ASN1结构体,红框中内容自行替换

    image

  2. 选择默认的编码格式"UPER"

    image

  3. 点击Compile,Results框会显示编译成功

    image

  4. 在文本框中输入需要加密的内容

    image

  5. 点击Encode,Output文本框中会显示加密后的内容

    image

  6. 将加密的内容(Hex)复制到Decode文本框

    image

  7. 点击Decode,Output文本框会显示解密后的内容

    image

3. 测试

  1. ASN1结构体
Foo DEFINITIONS ::= BEGIN

    Question ::= SEQUENCE {
        id        INTEGER,
        question  IA5String
    }

    Answer ::= SEQUENCE {
        id        INTEGER,
        answer    BOOLEAN
    }

END
  1. 加密内容
{'id': 1, 'question': 'Is 1+1=3?'}
  1. 解密内容
01010993cd03156c5eb37e

asn.1-tools's People

Contributors

daimageiwokankan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.