.mht文件图片解析工具

网上找了一下没有找到比较现成的好用的工具,找到一个mht-viewer 的windows下的查看工具,但是实际实用的时候发现啥都看不了,就是个文本编辑器?还是我打开的姿势不对?

并且对于中文目录和文件名直接无法显示,我都不知道查看的是什么东西,就这个还尼玛有付费版本?

搜索了一下发现了几个python脚本,实际使用效果也一般。网上搜索了一下并没有找到相关的文件格式的说明

直接查看文件就可以发现文件格式并不是十分复杂,于是可以遍历来解析文件中的图片

已经保存的图片如下:

Continue Reading

m3u8 下载工具 v20.5.14 [Windows]

更新功能:

1. 增加支持从文件读取下载链接功能,参数-f J:\Porn\202005\list\list.txt;

2. 支持直接从mp4,avi, mov, mpeg链接下载文件。列表下载过程中对于已经存在的文件会直接跳过(youtube-dl 支持从文件读取下载链接,但是下载过程中对于多个url最终字符一样的情况没有做处理,导致会误认为文件已经下载,没有找到用什么参数来修改下载后的文件名。例如下图的列表格式就无法下载文件,因为youtube-dl 直接吧下载的文件命名成了index.m3u8.mp4 。 下载其他连接的时候就会认为文件已经存在了。)。

文件格式如下:

实例: 

 m3u8_downloader.exe -f J:\Porn\202005\list\list.txt -p J:\Porn\202005\squirt 

使用-f参数的时候-o参数无效

Continue Reading

Qingdao Gov Facial Mask Appointment

import pytesseract
from pyfiglet import Figlet
import requests
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains

driver = webdriver.Chrome()

# driver.get('http://www.baidu.com') #vux-x-input-twq0s
# driver.get('file:///Volumes/DATA/python_projects/kz/口罩预约/顺丰预约.html')
# driver.get('file://F:\\PyCharmProjects\\facial-mask-appointment\\口罩预约\\顺丰预约.html')
# driver.get('file://F:\\PyCharmProjects\\facial-mask-appointment\\快递预约2\\快递预约.html')
driver.get('http://kzyynew.qingdao.gov.cn:81/dist/index.html#/preOrder')
# driver.get('http://kzyynew.qingdao.gov.cn:81/dist/index.html#/SFOrder')

link_list = [
    {'name': '钟灵',
     'tel': '1856130xxx0',
     'id_number': '3707251xxxxxxxxxxx5'},
    {'name': '钟灵',
     'tel': '1856130xxx0',
     'id_number': '3707251xxxxxxxxxxx5'},
]


def clear_input(input):
    ActionChains(driver).move_to_element(input).send_keys(Keys.CONTROL, "a")
    ActionChains(driver).move_to_element(input).send_keys(Keys.DELETE)

def fill_link_data(name, tel, id_number):
    try:
        check_button = driver.find_element_by_xpath('//*[@id="app"]/div/div/div[3]/div/div/div/i[3]')
        check_button.click()
    except:
        pass

    weuis = driver.find_elements_by_xpath("//input")
    # 姓名
    # print(weuis[0])
    weuis[0].clear()
    clear_input(weuis[0])
    # weuis[0].sendKeys(Keys.CONTROL, "a")
    # weuis[0].sendKeys(Keys.DELETE)
    weuis[0].send_keys(name)
    # 电话
    weuis[1].clear()
    clear_input(weuis[1])
    weuis[1].send_keys(tel)
    # 身份证号
    weuis[2].clear()
    clear_input(weuis[2])
    weuis[2].send_keys(id_number)
    #
    selects = driver.find_elements_by_xpath("//select")
    selects[0].send_keys('李沧区')
    selects[1].send_keys('浮山路街道办事处')

    driver.find_element_by_xpath('//*[@id="app"]/div/div/div[1]/div/div[6]/div[2]/textarea').clear()
    driver.find_element_by_xpath('//*[@id="app"]/div/div/div[1]/div/div[6]/div[2]/textarea').send_keys(
        '李沧区')

Continue Reading

alipay rsa2 签名验证

长时间没有使用支付宝的支付接口,再次实用的发现现在验签方式只剩ras2了。比较蛋疼的一点在于自己怎么处理都处理不对,于是使用支付宝的签名工具进行验签发现依然验证失败。

代码根据支付宝的相关文档进行了处理,但是依然失败。直到搜索到了这篇文章https://bbs.csdn.net/topics/392301160?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task,里面提到可能是签名工具版本的问题:

支付宝提供了RSA的验签生成工具,之前我使用的是1.0版的,生成的密钥可以支持支付,但是在回调的时候会校验失败,后面重新下载了1.3版的,就好了

Continue Reading

python3.7 安装alipay-sdk-python(PyCrypto)

安装vs相关工具之后继续报错:

warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building ‘Crypto.Random.OSRNG.winrandom‘ extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc/ -Isrc/inc-msvc/ -IC:\Python36\include -IC:\Python36\include
winrand.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(26): error C2061: syntax error: identifier ‘intmax_t‘
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(27): error C2061: syntax error: identifier ‘rem‘
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(27): error C2059: syntax error: ‘;‘
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(28): error C2059: syntax error: ‘}‘
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(30): error C2061: syntax error: identifier ‘imaxdiv_t‘
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(30): error C2059: syntax error: ‘;‘
Continue Reading

‘WebElement’ object has no attribute ‘sendKeys’

1.应广大市民反映,为减少人员集聚,自2020年2月24日(含)起,暂停“门店自取”口罩预约方式。

2.前期市民放弃预约各门店购买资格的口罩,将于2月23日在“门店自取”预约系统中全部投放,当天预约成功的市民可在2月25日(含)前到预约门店购买,逾期不再保留。

3.市民可继续通过“快递配送”方式自愿预约购买。自2月25日(含)起,“快递配送”预约系统开放时间,按照快递公司不同分为每天上午9:30和10:00两个时段。邮政、顺丰等量承担配送任务,市民可自行选择配送公司。

因为一个病毒导致很多事情都变的面目全非,口罩、消毒液都成了紧俏用品。为了能够买到口罩,就需要弥补手速过慢的问题。手速太慢了是抢不到口罩的,所以此时就需要自动提交数据。找到网址之后。很容易就可以定位到所有的输入框:

Continue Reading

iOS iap receipt 服务器校验

import json
import requests

SAND_BOX_VERIFY_URL = 'https://sandbox.itunes.apple.com/verifyReceipt'
VERIFY_URL = 'https://buy.itunes.apple.com/verifyReceipt'

#  /**
#          * 服务器二次验证代码
#          * 21000 App Store不能读取你提供的JSON对象
#          * 21002 receipt-data域的数据有问题
#          * 21003 receipt无法通过验证
#          * 21004 提供的shared secret不匹配你账号中的shared secret
#          * 21005 receipt服务器当前不可用
#          * 21006 receipt合法,但是订阅已过期。服务器接收到这个状态码时,receipt数据仍然会解码并一起发送
#          * 21007 receipt是Sandbox receipt,但却发送至生产系统的验证服务
#          * 21008 receipt是生产receipt,但却发送至Sandbox环境的验证服务
#          */


def verify_receipt_with_apple(receipt, is_sandbox=False):
    jsonStr = json.dumps({"receipt-data": receipt})

    headers = {'Content-Type': 'application/json'}
    url = VERIFY_URL
    if is_sandbox:
        url = SAND_BOX_VERIFY_URL
    rep = requests.post(url=url, data=jsonStr, headers=headers)
    # print(rep.text)
    return rep.text


def verify_receipt_with_apple_json(receipt, is_sandbox=False):
    resp = verify_receipt_with_apple(receipt, is_sandbox)
    try:
        json_data = json.loads(resp)
    except:
        return None
    return json_data

if __name__ == "__main__":
    receipt = "MIITrQYJKoZIhvcNAQcCoIITnjCCE5oCAQExCzAJBgUrDgMCGg"

    js = verify_receipt_with_apple_json(recpt, True)

    print(js['receipt'])

    print(js['receipt']['in_app'])
    print(js['receipt']['in_app'][0])

Continue Reading