base64

ctf题目writeup(8)

对着背影说爱祢 提交于 2019-12-25 04:41:38
2019.2.11 南京邮电的ctf平台: 地址http://ctf.nuptzj.cn/challenges# 他们好像搭新的平台了。。。我注册弄了好半天。。。 1. 签到题,打开网址: 查看一下页面源代码: 2. 这道题很熟悉,就是找 md5后开头为0e的 然后传参就行了: 比如 ?a=s878926199a nctf{md5_collision_is_easy} 3. 这里查看页面源代码: 这里最大长度是10 肯定不够 改成12什么的,足够我们输入 zhimakaimen nctf{follow_me_to_exploit} 4. 打开后: 查看页面源代码,没发现什么有用的。试了试把index.html改成Index.php也不行。 就把图片保存到本地,notepad++打开: 最后一行: nctf{photo_can_also_hid3_msg} 5. 这道题打开后是这样的: 打开后查看页面源代码(总共需要三次) 分别是 S0.html S0.htm 404.htm 最后进入404.html: 这个后退没什么用。直接查看源代码: 这段注释 竖着看 就是flag nctf{this_is_a_fl4g} 6. 打开后这样: 这里需要用unicode看: 去百度一下aaencode http://utf-8.jp/public/aaencode.html

ISCC2016-BASIC、WEB、MISC简单writeup

删除回忆录丶 提交于 2019-12-25 04:40:42
RE和PWN题目的wp有大神已经放出来了,我也不擅长,就不搬了。bin求带。 BASIC BASIC-1 50 仿射函数,百度“仿射加密法”,它讲的够清楚了。 BASIC-2 50 结尾的“=”这个特征很明显,base64解密,需要解多次,直到出现flag。 BASIC-3 50 题目说在这个页面却看不到,那么应该是藏在页面的某个地方,F12进入调试模式,找到下图的内容: 提示直接提交貌似不对,那么应该是有加密。ROT13加密,解密一下就OK了。 BASIC-1 100 心灵鸡汤 丢进OD搜了一下,发现了一个字符串。卡了一会,甚至连它的出处都搜到了。然后看了看这串字符只有大小写区别,可能是培根加密,然后解密出来得到flag。 BASIC-1 100 小伟密码 一个老旧无用的加密工具加密了文件,百度上有很多针对它的攻击方法。注意版本问题。(值得一提:如果不是专业的人员,不要自己乱搞什么加密,这就是例证。) BASIC 200 JJ 文档是JFf*ck编码,不确定代码具体是什么,还是最好解码一下。然后找到网盘地址,下载。然后又是编码(泥煤)。查了一圈,是JJencode,然后在github上找到了脚本,解密出来,是一个JS压缩加密,再解一下吧。最后是一个alert。早知道就放进<script>标签里让它弹出了。 解密脚本获取:github搜索JJencode,第一个就是decoder

ctf题目writeup(7)

风流意气都作罢 提交于 2019-12-25 04:40:09
2019.2.10 过年休息归来,继续做题。 bugku的web题,地址:https://ctf.bugku.com/challenges 1. http://123.206.87.240:8002/web16/ 提示是备份,不由自主想到bak。这里可以扫路径或者自己多试试: http://123.206.87.240:8002/web16/index.php.bak 就是备份,直接保存下来。 打开后是一段源代码: 大概意思就是,获取key1和key2,但是会过滤掉你输入的key。 然后如果两个key的md5相等,且两个key本身不相等,就会打印出flag的值。 在这里可以用 kekeyy1 和 kekeyy2来绕过这个过滤。 而在php中,md5函数无法处理数组,返回的都是null,两个null也是相等。 所以构造payload: http://123.206.87.240:8002/web16/?kekeyy1[]=sss&kekeyy2[]=xxx (key后面的值随便写就ok) Bugku{OH_YOU_FIND_MY_MOMY} 2. http://123.206.87.240:8002/chengjidan/ 输入1的时候是这样(这个submit是post方式) 加个' 这里猜下,总共四列 (名字,三科目) 1' union select 1,2,3,4# 都有回显

procmail giving “no match” on content-type

大憨熊 提交于 2019-12-25 04:37:25
问题 I am trying to have procmail decode a base64 encoded attachment. To begin with I am following a simple recipe, found here: http://www.linuxquestions.org/questions/linux-software-2/procmailrc-decode-data-from-base64-encoded-emails-trying-to-decode-with-uudeview-933670/ However, it appears procmail cannot find the match: procmail: [7459] Mon Aug 10 10:54:43 2015 procmail: Assigning "LOGFILE=/home/myself/procmail.log" procmail: Opening "/home/myself/procmail.log" procmail: Assigning "LOGABSTRACT

200kb image to base64 cannot send to web service

喜欢而已 提交于 2019-12-25 04:13:40
问题 I got bad request 400 when i send base64 image in the web service, I put base64 string to JSON and POST it using retrofit. here is my code Bitmap bm = BitmapFactory.decodeFile("IMAGE PATH"); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); bm.compress(Bitmap.CompressFormat.PNG, 50, byteArrayOutputStream); byte[] byteArray = byteArrayOutputStream .toByteArray(); String imgbase64 = Base64.encodeToString(byteArray, Base64.NO_WRAP + Base64.URL_SAFE); And add to

Creating images in SVG and rendering them in HTML using Base64 encoding URI and JAVA

断了今生、忘了曾经 提交于 2019-12-25 04:08:16
问题 I am trying to create a service that returns SVG. The requirement is that the SVG has to work in an img tag (script tag would be a bonus) and also to avoid JavaScript. I have figured that encoding the img in BASE 64 and using it as a URI ,is my best bet. Java Servlet String imageString = g2.getSVGElement(); // creates svg html string e.g <svg> blah blah</svg> byte[] imageData = Base64.encodeBase64(imageString.getBytes()); OutputStream out = response.getOutputStream(); out.write(imageData);

C++ Base64 Unicode - null bytes

不想你离开。 提交于 2019-12-25 03:50:14
问题 I am trying to base64 encode a unicode string. I am running into problems, after the encoding, the output is my string base64'ed however, there is null bytes at random places in throughout the code, I don't know why, or how to get them out. Here is my Base64Encode function: static char Base64Digits[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; int Base64Encode(const BYTE* pSrc, int nLenSrc, wchar_t* pDst, int nLenDst) { int nLenOut= 0; while ( nLenSrc > 0 ) { if

Is Base64 an encryption or encoding algorithm?

倾然丶 夕夏残阳落幕 提交于 2019-12-25 03:32:08
问题 I have to use an encryption algorithm using Base64 but when I researched online I find forums state it is an encoding algorithm. This has me confused. :( Is Base64 an encryption or encoding algorithm? How do we differentiate between the two except for the fact that one is publicly decipherable while the other needs a key for that? 回答1: It's an encoding algorithm (hence "Base64 encoding") to allow people to move data in an ASCII friendly environment (i.e. no control characters or anything non

Is Base64 an encryption or encoding algorithm?

三世轮回 提交于 2019-12-25 03:32:06
问题 I have to use an encryption algorithm using Base64 but when I researched online I find forums state it is an encoding algorithm. This has me confused. :( Is Base64 an encryption or encoding algorithm? How do we differentiate between the two except for the fact that one is publicly decipherable while the other needs a key for that? 回答1: It's an encoding algorithm (hence "Base64 encoding") to allow people to move data in an ASCII friendly environment (i.e. no control characters or anything non

Java, convert string to a RSA publicKey

删除回忆录丶 提交于 2019-12-25 03:24:30
问题 i am trying ton convert a string representation of a public key into a publicKey java object use to encrypt data but i keep getting the following error below: java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException: Detect premature EOF at sun.security.rsa.RSAKeyFactory.engineGeneratePublic(RSAKeyFactory.java:188) at java.security.KeyFactory.generatePublic(KeyFactory.java:304) at com.josh.crypto.CryptoUtil.convertKeytoKeyObject(CryptoUtil.java:96) at com