
python
freshfox
这个作者很懒,什么都没留下…
展开
-
sql 盲注
为原创 2022-07-14 11:27:30 · 88 阅读 · 0 评论 -
python 线程池
python 多线程原创 2022-07-03 11:26:47 · 261 阅读 · 0 评论 -
jpg2pdf--demo
# -*- coding: utf-8 -*-# python3 linux import fitz # 导入本模块需安装pymupdf库 安装pymupdf jpgFilePostfix ='.jpg'jpgFileNum = 2outputPdfFilename ='2.pdf'# 将文件夹中所有jpg图片全部转换为一个指定名称的pdf文件,并保存至指定文件夹doc = fitz.open()for index in range(jpgFileNum): .原创 2020-12-01 09:51:57 · 648 阅读 · 0 评论 -
python 解析html xml 中的img 信息
了解 编译和链接的真正过程: 真实验证一下 预处理,编译,链接。原创 2022-06-27 11:48:59 · 321 阅读 · 0 评论 -
html xml python 解析
BeautifulSoup 教程|极客教程原创 2022-05-19 15:15:27 · 253 阅读 · 0 评论 -
nuitka 打包pandas
随便新建一个python 例子# This is a sample Python script.# Press Shift+F10 to execute it or replace it with your code.# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.import pandas as pdmydataset = { 'sit原创 2022-02-21 21:57:15 · 2192 阅读 · 0 评论 -
python 解析html 表格
<table id ="table"><tr> <th width="10%">序号</th> <th width="18%">学校</th> <th width="18%">学科</th> <th width="18%">姓名</th> <th width="18%">得分 <span>.原创 2022-01-15 10:02:00 · 1328 阅读 · 0 评论 -
webpy-mydemo
import weburls = ( '/(.*)', 'hello')app = web.application(urls, globals())db = web.database(dbn='mysql', user='root', pw='ilovevC6aA!', db='test')# todos = db.select('todo')# xxx =0## for item in todos:# xx =0class hello: def GET(se.原创 2020-11-18 17:45:05 · 168 阅读 · 0 评论 -
python words to json file
# -*- coding: utf-8 -*-import xlrdimport json#python3 第一列 英文, 中文,wordfromwb = xlrd.open_workbook(filename="words.xlsx") # 打开文件cjSheet = wb.sheet_by_name("Sheet1") # 通过名字获xx =1wordsjson =[]for row in range(cjSheet.nrows): # for col in.原创 2020-10-27 10:29:42 · 351 阅读 · 0 评论 -
切割excel 文件
# -*- coding: utf-8 -*-__author__ = '10043467'import xlwtimport xlrdsrcChenjifileName = 'cj-x班.xls'srcChenjiSheetName = '所有成绩'classIdIndexInSrc = 5 #第一列是从0开始classNum =14 #班级数dstFile...原创 2019-12-17 11:35:26 · 391 阅读 · 0 评论 -
python监控demo
{ "urls": [ { "url": "https://www.qianxin.com:443/", "headers": {"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0", ...原创 2019-06-03 17:22:28 · 823 阅读 · 0 评论 -
检测是否存在弱口令问题
#!/usr/bin/env python# -*- coding: utf-8 -*-import urlparse,hackhttp,time,requests,os,sys,reimport random,ssl,socket,urllib,chardetimport threading,datetime,Queuefrom bs4 import BeautifulSoup ...原创 2019-05-14 11:20:33 · 2132 阅读 · 0 评论 -
python 文件处理的例子
def writeInjectPointUrlToSuccLog(url): with open(sqlInjectSuccLogFile, 'a+') as file_to_read: file_to_read.write(url + '\r\n')def checkSqlInResult(filename): injectSuccStr = 'the f...原创 2019-05-08 10:36:10 · 422 阅读 · 0 评论 -
python lxml 安装
首先安装最新的python 2.7.15。 下载pocsuite 之后安装,其会自动安装lxml组件。原创 2018-09-03 22:54:09 · 311 阅读 · 0 评论 -
pyqt 多线程 例子
# -*- coding: utf-8 -*-import sysfrom PyQt5 import QtWidgets, QtCoreimport time, datetimeclass Main(QtWidgets.QWidget): def __init__(self, parent=None): super(Main, self).__init__原创 2017-06-28 17:15:48 · 672 阅读 · 0 评论 -
python pyqt 环境搭建。 随笔
目前以最新的python 3 为基准搭建比较方便。 安装sippython3 -m pip install sippython3 -m pip install pyqt5 python3 -m pip install PyQt5-tools原创 2017-06-22 11:42:54 · 245 阅读 · 0 评论 -
python webhelp 类
webhelp.py#coding:utf-8import urllibimport http.cookiejarimport jsonclass MyWeb(object): def postUrl(self, url, params, headers): params = urllib.parse.urlencode(params).enco原创 2017-06-24 13:51:28 · 355 阅读 · 0 评论 -
python lxml 安装
安装最新的python3 版本 > =3.6python3 -m pip install lxml原创 2017-06-29 14:20:48 · 441 阅读 · 0 评论 -
python xpath 例子
#coding:utf-8import urllibimport http.cookiejarimport jsonfrom lxml import etreeclass MyWeb(object): def httpSendUrl(self,url,params,headers): if params : _params = url原创 2017-06-29 15:31:14 · 840 阅读 · 0 评论 -
python send mail
# -*- coding: UTF-8 -*-'''发送txt文本邮件小五义:http://www.cnblogs.com/xiaowuyi'''import smtplibfrom email.mime.text import MIMETextmailto_list = ['huxinxiang@zte.com.cn']mail_host = "smtp.XXX.com" #转载 2017-07-18 18:37:27 · 835 阅读 · 0 评论 -
python 常见异常错误处理
UnicodeEncodeError: 'ascii' codec can't encode characters in position 33-34: ordinal not in range(128)import sysreload(sys)sys.setdefaultencoding('utf-8')原创 2017-07-27 10:16:19 · 343 阅读 · 0 评论 -
python 例子
socket 编程 例子代码中s.recv 如果接受不到数据,会阻塞,需要对这块代码进行优化,否则循环不会结束。 import socketports = [21, 22, 53, 445, 80, 443, 3389, 8080]hosts = ['127.0.0.1', '10.10.10.10', '192.168.1.1']for host in hosts:原创 2018-01-26 14:23:18 · 224 阅读 · 0 评论 -
python 整体打包
@echo offset "AGENT_PATH=%~dp0"set "PYTHON_PATH=%AGENT_PATH%python27"set "LIB_PATH=%PYTHON_PATH%\Lib"set "PYTHON_LIB_PATH=%PYTHON_PATH%\Lib"set "PYTHON_SITE_PATH=%PYTHON_LIB_PATH%\site-packages...原创 2018-08-03 08:31:12 · 504 阅读 · 0 评论 -
jenkins 监控代理是否在线脚本
import urllib2import jsonbaseapi = 'http://10.42.188.2:8080/computer/%s/api/json?pretty=true'agentList =[]def request(slaves): # slaveapis = slaves.split(",") # offlineapi = "" for ap...原创 2018-08-25 10:55:49 · 469 阅读 · 0 评论 -
python sqlite help类
import sqlite3import uuidimport timeclass dbsqlite(object): def __init__(self): self.cx = sqlite3.connect("d:/test.db") self.cu = self.cx.cursor() self.create() de原创 2017-06-27 10:25:03 · 907 阅读 · 0 评论