bugku No one knows regex better than me

2024-01-31 20:32
文章标签 better one bugku regex knows

本文主要是介绍bugku No one knows regex better than me,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

error_reporting(0)表示不报告错误

然后用$_REQUEST传zero和first,second等于zero.first

second要包括/Yeedo|wants|a|girl|friend|or|a|flag/里面的一个,不分大小写。

key等于second等于zero.first

key不能有..或flag

third等于first

前面三个数字是八进制,最后一个数字是十六进制

\nml,如果 n 为八进制数字 (0-3),且 m 和 l 均为八进制数字 (0-7),则匹配八进制转义值 nml。

\xn,匹配 n,其中 n 为十六进制转义值。

转换为十进制是46 112 104 112,asscll意思是 .php

substr是截取字符,这个从第五个字符开始截取

zero用base64解码,并且提示说flag在flag.php.

所以我们最后要构造出flag.php

而第一个if会把flag过滤,又考虑到最后是base64解码的zero和end构成。

所以flag就用base64编码,传到zero中

由于第二个if把..过滤了,直接在first中传入.php后,second就变成了flag..php,就被过滤了。

再加上substr截取,就要在first之前加入四个字符并且这四个字符必须是这里面的/Yeedo|wants|a|girl|friend|or|a|flag/

又因为他不分大小写,所以直接把这四个字符定为FLAG

再用或(|)把FLAG和.php组合即可

x|y,匹配 x 或 y。例如,'z|food' 能匹配 "z" 或 "food"。'(z|f)ood' 则匹配 "zood" 或 "food"。

所以构建?zero=ZmxhZw==&first=FLAG|.php

 

这篇关于bugku No one knows regex better than me的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/664975

相关文章

pytorch torch.nn.functional.one_hot函数介绍

torch.nn.functional.one_hot 是 PyTorch 中用于生成独热编码(one-hot encoding)张量的函数。独热编码是一种常用的编码方式,特别适用于分类任务或对离散的类别标签进行处理。该函数将整数张量的每个元素转换为一个独热向量。 函数签名 torch.nn.functional.one_hot(tensor, num_classes=-1) 参数 t

leetcode#66. Plus One

题目 Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not contain any leading zero, except the number 0 itself. The digi

[论文笔记]Making Large Language Models A Better Foundation For Dense Retrieval

引言 今天带来北京智源研究院(BAAI)团队带来的一篇关于如何微调LLM变成密集检索器的论文笔记——Making Large Language Models A Better Foundation For Dense Retrieval。 为了简单,下文中以翻译的口吻记录,比如替换"作者"为"我们"。 密集检索需要学习具有区分性的文本嵌入,以表示查询和文档之间的语义关系。考虑到大语言模

@vueup/vue-quill使用quill-better-table报moduleClass is not a constructor

quill官方中文文档:https://www.kancloud.cn/liuwave/quill/1434144 扩展表格的使用 注意:想要使用表格 quill的版本要是2.0以后 升级到这个版本后 其他一些插件就注册不了了。 安装: npm install quill@latest   版本需要大于2.0版本 npm install quill-better-table 引入&

One-Shot Imitation Learning

发表时间:NIPS2017 论文链接:https://readpaper.com/pdf-annotate/note?pdfId=4557560538297540609&noteId=2424799047081637376 作者单位:Berkeley AI Research Lab, Work done while at OpenAI Yan Duan†§ , Marcin Andrychow

One-Shot Imitation Learning with Invariance Matching for Robotic Manipulation

发表时间:5 Jun 2024 论文链接:https://readpaper.com/pdf-annotate/note?pdfId=2408639872513958656&noteId=2408640378699078912 作者单位:Rutgers University Motivation:学习一个通用的policy,可以执行一组不同的操作任务,是机器人技术中一个有前途的新方向。然而,

51单片机-第十一节-DS18B20温度传感器(One_Wire单总线)

一、DS18B20温度传感器介绍: DS18B20是一种数字温度传感器。 测温范围:-55C - +125C 通信接口:1-Wire(单总线) 二、引脚及应用电路: 很简单,电源,接地,通讯接口。        三、内部结构: 总图: (1)备用电源 (2)器件地址 (3)控制器 (4)存储器 (5)存储器内部: B1,B2存储最低有效温度和最高有效温度。

Two to One——C语言提高题【7 kyu】

一、原题 链接:Training on Two to One | Codewars Take 2 strings s1 and s2 including only letters from a to z. Return a new sorted string (alphabetical ascending), the longest possible, containing distinct

If an application has more than one locale, then all the strings declared in one language should als

字符串资源多国语言版本的出错问题 假如你仅仅针对国内语言 加上这句即可 //保留中文支持resConfigs "zh"

More than one file was found with OS independent path ‘lib/arm64-v8a/libopencv_java4.so‘

解决方案: 在app下的build.gradle中加入以下代码: packagingOptions {pickFirst 'lib/arm64-v8a/libopencv_java4.so'}