【综合】简单加解密——寻找序列号

article/2025/9/14 15:34:27

【综合】简单加解密——寻找序列号

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

下面文字对你可能有用(复制+粘贴):

#include <stdlib.h>

#include <string.h>
#include “malloc.h”
#define MaxPass 66 // 最多66段密文
#define NumbPwdTable 5 // 密码表的份数
#define SizePwdTable 0x210 // 每份密码表占用字节数

struct PassStru // 密码表结构: 编移(4字节),密文长度(2字节),钥匙(1字节)。 结构体长度此处须为 4的倍数
{unsigned int Offset; unsigned short int Size; unsigned char Key; char cJiangYou;} // cJiangYou打酱油

char MsgErr[]=“Wrong Key!”,MsgSn[]="Serial No.: ",MsgMD9[]="MD9: ";

文件下载

话说这些文件被我放在我的“图床”里了哈哈哈,有人能get到我的笑点吗
VxCrp2018A1.VDF
VxCrp2018A2.VDF
VxCrp2018A3.VDF
VxCrp2018A4.VDF
VxCrp2018A5.VDF
VxCrp2018A6.VDF
VxCrp2018A7.VDF

思路

真的很简单就是按照题目模拟就行了,没有特别的,这道题的文件结构很简单也用不到KMP,所以就不多解释了

代码

#include <stdio.h>
#include <string.h>
struct key{unsigned int offset;unsigned short size;unsigned char K;
}table;
int main(){char pos[20],ciph[10000];int N,i,j = 1,s,m;scanf("%s\n%d",pos,&N);FILE *fp = fopen(pos,"rb");for(i = 0;i < 5;i++){fseek(fp,(N-1)*8+i*0x210,0);fread(&(table.offset),7,1,fp);fseek(fp,table.offset,0);fread(ciph,table.size,1,fp);ciph[0] += table.K;if(ciph[0] == 'W') continue;else{while(j < table.size){ciph[j] += table.K;if(ciph[j] == 'e' && ciph[j - 1] == 'S') s = j - 1;if(ciph[j] == 'D' && ciph[j - 1] == 'M') m = j - 1;j ++;}break;}}printf("XH: %02d\n",N);printf("SN: %.19s\n",ciph + s + 12);printf("M9: %.32s\n",ciph + m + 5);
}

或者

#include <stdio.h>
#include <string.h>
struct key{unsigned int offset;unsigned short size;unsigned char K;
}table;
int main(){char pos[20],ciph[10000];int N,i;scanf("%s\n%d",pos,&N);FILE *fp = fopen(pos,"rb");for(int i = 0;i < 5;i++){fseek(fp,(N-1)*8+i*0x210,0);fread(&(table.offset),7,1,fp);fseek(fp,table.offset,0);fread(ciph,table.size,1,fp);for(int j = 0;j < table.size;j++) ciph[j] += table.K;if(!strncmp(ciph,"Wrong Key!",9)) continue;else break;}printf("XH: %02d\n",N);for(i = 0;;i++){if(strncmp(ciph+i,"Serial No.: ",11)==0){printf("SN: %.19s\n",ciph + i + 12);break;}}for(;;i++){if(strncmp(ciph+i,"MD9: ",4)==0){printf("M9: %.32s\n",ciph + i + 5);break;}}
}

java版

鉴于有个小朋友一直想要JAVA版,所以写了一下(java对二进制的读取是真滴难受,有大佬有好的方法请教给我)

import java.io.*;public class Main {public static void main(String[] args) throws IOException {BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));String pos = reader.readLine();int N = Integer.parseInt(reader.readLine());FileInputStream fp = new FileInputStream(pos);byte[] ciph = null;int s = 0;int m = 0;for (int i = 0; i < 5; i++) {fp.getChannel().position((N - 1) * 8 + i * 0x210);DataInputStream dis = new DataInputStream(fp);//下面这三行就是我吐槽的地方了int offset = Integer.reverseBytes(dis.readInt());int size = dis.readUnsignedShort();int K = dis.readUnsignedByte();Key table = new Key(offset, size, K);fp.getChannel().position(table.offset);ciph = new byte[table.size];fp.read(ciph);ciph[0] += table.K;if (ciph[0] == 'W') continue;else {int j = 0;for(int t = 0; t < table.size; t ++) ciph[t] += table.K;while (++j < table.size){if (ciph[j] == 'e' && ciph[j - 1] == 'S') s = j - 1;if (ciph[j] == 'D' && ciph[j - 1] == 'M') m = j - 1;if(s != 0 && m != 0) break;//都找到就可以走了}break;}}fp.close();System.out.printf("XH: %02d\n", N);System.out.printf("SN: %.19s\n", new String(ciph, s + 12, 19));System.out.printf("M9: %.32s\n", new String(ciph, m + 5, 32));}
}class Key {int offset;int size;int K;public Key(int offset, int size, int K) {this.offset = offset;this.size = size;this.K = K;}
}

http://chatgpt.dhexx.cn/article/Y4wIP1Vg.shtml

相关文章

Inpaint破解版 - 图片去水印神器

Inpaint是一款强大实用的图片去水印软件&#xff0c;您的图片中不想要的部分&#xff0c;如额外的线&#xff0c;人物&#xff0c;文字等……选定后补绘都会帮你全自动进行擦除&#xff0c;同时补绘会根据附近图片区域重建擦除的区域&#xff0c;使看起来完美无暇&#xff0c;没…

截图软件 : Snipaste

说到截图软件&#xff0c;用过win10、win11的同学第一个想到的应当是PrtSc键或WinShiftS启动系统自带的截图软件&#xff0c;再“老”一点的可能会想到QQ截图。小编在之前也是怎么想的&#xff0c;因此看到其他小编写关于截图软件的文章就很不屑&#xff0c;认为这是多此一举。…

Source Insight 4.0 序列号 license文件

安装程序下载 在官网上下载Source Insight 4.0的安装程序. 版本4.00.0098可用 已经分享到网盘 链接: https://pan.baidu.com/s/1xyprwNSXLpj7kpDa7LaF_Q 提取码: v3cy 版本4.00.0124可用 https://pan.baidu.com/s/1paa_48tv1c0AHhBapqo2TA?pwdxnsx 提取码: xnsx 30天的…

CorelDRAW2021序列号 专业的矢量图像设计软件

CorelDRAW是一款专业的图像设计软件&#xff0c;提供一站式的图片修改功能&#xff0c;附带功能强劲的点阵图向矢量图转化的工具&#xff0c;使用方便简单&#xff0c;是设计师们的必不可少的软件。详见文章内容。 CDR2021新功能&#xff1a; 1、颠覆性协作工具 CorelDRAW …

Android Doze模式分析

Android 6.0 Doze模式分析 Doze模式是Android6.0上新出的一种模式,是一种全新的、低能耗的状态,在后台只有部分任务允许运行,其他都被强制停止。当用户一段时间没有使用手机的时候,Doze模式通过延缓app后台的CPU和网络活动减少电量的消耗。PowerManagerService中也有Doze模…

Android的Doze模式

也是偶然之间听到这个词的 Doze模式 Doze模式 Doze 翻译为打盹, 那么Android的Doze模式呢 , 就是让手机进入了类似打盹的一个状态 , 在这个半梦半醒的状态下 , 手机的后台、服务、广播等都会发生相应的延迟。 Doze模式在Android M&#xff08;6.0&#xff09;时引入&#xff0c…

Android---Alarm定时任务 Doze模式

Android的定时任务有两种&#xff0c;一种是JavaAPI提供的Timer类&#xff0c;另一种就是使用Android的Alarm机制。 Timer不太适合那些需要长期在后台运行的定时任务&#xff0c;因为每个手机都有自己的休眠策略&#xff0c;Android手机长时间不操作就会导致Timer定时任务无法…

Android 8.1 Doze模式分析(三)——Deep Doze模式

概述 Deep Doze&#xff0c;也就是Android的Doze模式了&#xff0c;表示深度Doze&#xff0c;比起LightDoze&#xff0c;它将进行更多的限制&#xff1a;无法进行网络访问和 GPS/WLAN 扫描、唤醒被忽略、闹钟和作业/同步被延迟。当然&#xff0c;它的触发条件也将更加苛刻&…

Android7.0 Doze模式

在Android M中&#xff0c;Google就引入了Doze模式。它定义了一种全新的、低能耗的状态。 在该状态&#xff0c;后台只有部分任务被允许运行&#xff0c;其它任务都被强制停止。 本篇博客中&#xff0c;我们就来分析一下Android 7.0中Doze模式相关的流程。 一、基本原理 Do…

Android Doze模式和app Standby模式

对低电耗模式(app Standby)和应用待机模式(Doze)进行针对性优化 从 Android 6.0&#xff08;API 级别 23&#xff09;开始&#xff0c;Android 引入了两个省电功能&#xff0c;可通过管理应用在设备未连接至电源时的行为方式为用户延长电池寿命。低电耗模式通过在设备长时间处…

adb shell dumpsys deviceidle whitelist 打盹模式(Doze)白名单

Android 6.0开始引入了打盹模式(Doze)&#xff0c;若想使自己的App不受打盹模式的影响&#xff08;推迟Alarm唤起时间、限制CPU调用、限制网络请求等&#xff09;&#xff0c;需终端手机厂商为该App添加这个白名单。 Android developer 针对低电耗模式和应用待机模式进行优化&…

Android 8.1 Doze模式分析(二)——Light Doze模式

概述 LightDoze表示轻度doze模式&#xff0c;如果设备处于未充电且屏幕关闭状态&#xff0c;但未处于静止状态时&#xff0c;就会进入Light Doze模式&#xff0c;在LightDoze模式中&#xff0c;会定期进行维护&#xff0c;这种维护会持续N分钟&#xff0c;在维护状态(maintena…

Doze模式时序调研

Doze模式 机型 Light idle Deep idle 时序 定制白名单 AppStandby BLE Scanning管控 华为P20 Pro 开启 64.5分钟进入deep idle 有 开启 禁止BLE scanning OPPO F11 Pro 开启 30分钟进入deep idle 有 开启 允许BLE scanning 小米 MI 8 Pro 开启 64.5分钟进入…

Android7.0 Doze模式分析(一)Doze介绍 DeviceIdleController

参考&#xff1a;http://blog.csdn.net/gaugamela/article/details/52981984 在Android M中&#xff0c;Google就引入了Doze模式。它定义了一种全新的、低能耗的状态。 在该状态&#xff0c;后台只有部分任务被允许运行&#xff0c;其它任务都被强制停止。 在之前的博客中分…

android 7.0低电耗Doze模式

从 Android 6.0&#xff08;API 级别 23&#xff09;开始&#xff0c;Android 引入了两个省电功能&#xff0c;可通过管理应用在设备未连接至电源时的行为方式为用户延长电池寿命。 低电耗(Doze)模式通过在设备长时间处于闲置状态时推迟应用的后台 CPU 和网络 Activity 来减少电…

Android O Doze模式的状态

现象 以下是BugReport日志 日志 STATE_ACTIVE 2,006: 11-17 10:24:59.876137 900 900 I DeviceIdleController: updateChargingLocked: chargingtrue 2,007: 11-17 10:24:59.876244 900 900 I DeviceIdleController: becomeActiveLocked, reason charging 2,25…

【Android】Doze模式识别与检测

从 Android 6.0&#xff08;API 级别 23&#xff09;开始&#xff0c;Android 引入了两个省电功能&#xff1a;Doze模式&#xff08;官方翻译为低电耗模式&#xff09;和 App Standby模式&#xff08;官方翻译为应用待机模式&#xff09;&#xff0c;可通过管理应用在设备未连接…

Android 8.1 Doze模式分析(一)——Doze简介和DeviceIdleController的启动

概述 Doze模式&#xff0c;官方翻译为低电耗模式&#xff0c;是Andoriod6.0增加的一项系统服务&#xff0c;主要目的是为了优化电池性能&#xff0c;增加电池续航时间&#xff0c;Doze模式又分两种模式&#xff1a;深度Doze模式(Deep Doze)和轻度Doze模式(Light Doze)&#xf…

Android 6.0的省电技术Doze作用影响以及避免方法

从android 6.0开始&#xff0c;谷歌引入了两项新的省电技术延长电池使用时间&#xff0c;分别是Doze&#xff08;休眠&#xff09;和App Standby&#xff08;app待命模式&#xff09;&#xff0c;只要app是运行在6.0&#xff08;api 23&#xff09;及以上的系统&#xff0c;无论…