随笔分类 -  python

pyhon与python逆向
摘要:由于requests的get请求有各种各样的缺陷,所以我自己用http.client封装了一个 client_get 支持设置代理、 ssl验证、是否重定向 import urllib.parse import http.client def client_get(url,headers=None, 阅读全文
posted @ 2022-11-04 10:56 乘舟凉 阅读(406) 评论(0) 推荐(0)
摘要:compile.py import os, shutil import compileall import sys import re def copy_to_up(path): for f in os.listdir(path): if f == '__pycache__': for f_main 阅读全文
posted @ 2022-10-14 09:56 乘舟凉 阅读(236) 评论(0) 推荐(0)
摘要:传入回调函数大概的原理是用c++构建一个python模块,并将回调函数定义进去 initializer.h #pragma once #include <Python.h> #ifdef _WIN32 #include <Windows.h> #elif defined __APPLE__ #end 阅读全文
posted @ 2022-10-12 16:20 乘舟凉 阅读(845) 评论(0) 推荐(0)
摘要:一般说使用umcompyle6 *.pyc命令就可以,但是也会遇到反编译不出来的情况, core.pyc 这个文件反编译出来的结果是 # uncompyle6 version 3.8.0 # Python bytecode 3.7.0 (3394) # Decompiled from: Python 阅读全文
posted @ 2022-05-08 20:24 乘舟凉 阅读(7657) 评论(0) 推荐(0)
摘要:1. import example 从sys.path列表中去搜索模块,主函数的入口会被加入到sys.path中 2.from . import expamle 从当前包中去搜索模块,但是主函数的入口不能在当前包 python 项目文件结构 example.py def hello(): print 阅读全文
posted @ 2022-03-12 18:59 乘舟凉 阅读(77) 评论(0) 推荐(0)
摘要:testObjs = ["1","2","3","1"] # i=0 # for o in testObjs: # testObjs.pop(i) # print(o) # i+=1 j=0 length = len(testObjs) for i in range(0,length): o = t 阅读全文
posted @ 2021-12-16 00:20 乘舟凉 阅读(108) 评论(0) 推荐(0)
摘要:通过url直接访问静态文件 首先要在Python工程中创建一个目录static(名字和相对位置均不能改动)。如下所示: static目录中的文件分布如下: 脚本代码如下: import webbrowser from flask import Flask app = Flask(__name__) 阅读全文
posted @ 2021-12-04 14:34 乘舟凉 阅读(1244) 评论(0) 推荐(0)
摘要:python逆向实战:反编译pyinstaller打包生成的exe 今天要逆向的软件叫you-dl.exe,它是一个pyinstaller生成的exe,它原本的名字和图标因为版权问题不能放出来了 首先下载pyinstxtractor.py,github可下,然后在运行pyinstxtractor.p 阅读全文
posted @ 2021-08-09 15:20 乘舟凉 阅读(12877) 评论(0) 推荐(4)