当前位置: 首页 > news >正文

攻防世界---->埃尔隆德32

做题笔记。

下载 查壳。

32ida 打开。

发现就一个判断。

跟进看看。

// 首次a2=0
int __cdecl sub_8048414(_BYTE *a1, int a2)
{int result; // eaxswitch ( a2 ){case 0:if ( *a1 == 105 )goto LABEL_19;result = 0;break;case 1:if ( *a1 == 101 )                         // egoto LABEL_19;result = 0;break;case 3:if ( *a1 == 110 )                         // ngoto LABEL_19;result = 0;break;case 4:if ( *a1 == 100 )                         // dgoto LABEL_19;result = 0;break;case 5:if ( *a1 == 97 )                          // agoto LABEL_19;result = 0;break;case 6:if ( *a1 == 103 )                         // ggoto LABEL_19;result = 0;break;case 7:if ( *a1 == 115 )                         // sgoto LABEL_19;result = 0;break;case 9:if ( *a1 == 114 )                         // r
LABEL_19:result = sub_8048414(a1 + 1, 7 * (a2 + 1) % 11);elseresult = 0;break;default:result = 1;break;}return result;
}

因为首次值a2=0,已知,所以我们可以手动计算也可以用代码去获取a1打印的值。

这是大佬的代码:

#include <stdio.h>
#include <string.h>int main()
{int a1[20] = { 105,101,0,110,100,97,103,115,0,114,0,0 };int a2[20];int k = 0;for (int i = 0;; i = 7 * (i + 1) % 11, k++){a2[k] = a1[i];printf("*%d\n", i);if (i == 2 || i == 8 || i>9)break;}//a2={105,115,101,110,103,97,114,100,0}return 0;
}

这里我选择动态查看其值。

最终脚本:

#include <stdio.h>
#include <string.h>int main()
{int a[] = { 0x0f,0x1f,0x04,0x09,0x1c,0x12,0x42,0x09,0x0c,0x44,0x0d,0x07,0x09,0x06,0x2d,0x37,0x59,0x1e,0x00,0x59,0x0f,0x08,0x1c,0x23,0x36,0x07,0x55,0x02,0x0c,0x08,0x41,0x0a,0x14 };int b[8] = { 105,115,101,110,103,97,114,100}; //难点。int len_a = sizeof(a) / sizeof(a[0]);char flag[50] = " ";for (int i = 0; i < len_a; i++){flag[i] = a[i] ^ b[i % 8];printf("%c", flag[i]);}return 0;
}

flag{s0me7hing_S0me7hinG_t0lki3n}

http://www.lryc.cn/news/438480.html

相关文章:

  • redis短信登录模型
  • 【React】React18.2.0核心源码解读
  • 深度学习-目标检测(四)-Faster R-CNN
  • MATLAB中的无线通信系统设计有哪些最佳实践
  • Java的发展史与前景
  • 2024年上海小学生古诗文大会倒计时30多天:做几道今年的官方模拟题
  • IDEA 常用配置和开发插件
  • 还在为企微联系人烦恼?一招解决!企业微信2024年效率升级全攻略
  • 【docker npm】npm 私库
  • 完整gpt应用(自用)
  • 【信息论基础第二讲】离散信源的数学模型及其信息测度包括信源的分类、信源的数学模型、离散信源的信息测度、二元信源的条件熵联合熵
  • 在 Spring Boot 项目中连接 IBM AS/400 数据库——详细案例教程
  • VUE + NODE 历史版本安装
  • git reset 几点疑问
  • Rust Windows下编译 静态链接VCRuntime140.dll
  • 从“天宫课堂”到人工智能:中国少儿编程的未来在哪里?
  • ARM base instruction -- blr
  • 宠物猫领养馆会员管理系统---附源码72579
  • 驾驶员注意力分神状态检测系统源码分享
  • 基于less和scss 循环生成css
  • opencv之Canny边缘检测
  • springBoot 集成https
  • 数据库连接池与Druid【后端 16】
  • C#使用Access数据库使用总结
  • 使用Dataherald组件进行数据分析:从安装到查询的完整指南
  • sqlx1.3.4版本的问题
  • Rust 编译器使用的 C++ 编译器吗?
  • Python计算机视觉 第10章-OpenCV
  • 多层感知机 (Multilayer Perceptron, MLP)
  • reg和wire的区别 HDL语言