使用JavaScript扫描端口
<html>
<title>端口扫描</title>
<head></head>
<form>
<label for="target">target</label><br/>
<input type="text" name="target" value="127.0.0.1"/><br/>
<label for="port">port</label><br/>
<input type="text" name="port" value="80"/><br/>
<p>you can use sequence as well 80,81,8080</p>
<label for="timeout">timeout</label><br/>
<input type="text" name="timeout" value="1000"/><br/>
<label for="result">result</label><br/>
<textarea id="result" name="result" rows="7" cols="50"></textarea><br/>
<input class="button" type="button" value="scan" onClick="javascript:scan(this.form)"/>
</form>
<script>
var AttackAPI = {
version: 0.1,
author: "Petko Petkov (architect)",
homepage: "http://www.gnucitizen.org"
};
AttackAPI.PortScanner = {};
AttackAPI.PortScanner.scanPort = function (callback, target, port, timeout) {
var timeout = (timeout == null)?100:timeout;
var img = new Image();
img.onerror = function () {
if (!img) return;
img = undefined;
callback(target, port, "open");
};
img.onload = img.onerror;
img.src = "http://" + target + ":" + port;
setTimeout(function () {
if (!img) return;
img = undefined;
callback(target, port, "closed");
}, timeout);
};
AttackAPI.PortScanner.scanTarget = function (callback, target, ports, timeout)
{
for (index = 0; index < ports.length; index++)
AttackAPI.PortScanner.scanPort(callback, target, ports[index], timeout);
};
</script>
<script>
var result = document.getElementById("result");
var callback = function (target, port, status) {
result.value += target + ":" + port + status + " \n";
};
var scan = function (form) {
AttackAPI.PortScanner.scanTarget(callback, form.target.value, form.port.value.split(","), form.timeout.value);
};
</script>
</html>
使用JavaScript扫描端口的更多相关文章
- JavaScript 扫描枪使用(一)
JavaScript 扫描枪应用(一)com.js为主要的代码实现,test.html文件为测试的页面,其中包括了com.js文件中方法的调用.以下为测试成功代码:com.js //com.js /* ...
- 使用Python扫描端口情况
#!/usr/bin/python# -*- coding:utf8 -*-# Python: 2.7.8# Platform: Windows# Authro: ...
- python扫描端口脚本
# -*- coding:utf8 -*- # # Python: 2.7.8 # Platform: Windows # Authro: wucl # Program: 端口扫描 # History ...
- nmap扫描端口导致线上大量Java服务FullGC甚至OOM
nmap扫描端口导致线上大量Java服务FullGC甚至OOM 最近公司遇到了一次诡异的线上FullGC保障,多个服务几乎所有的实例集中报FullGC,个别实例甚至出现了OOM,直接被docker杀掉 ...
- X-Scan扫描端口80,443提示http TRACE 跨站攻击漏洞解决办法
在用X-Scan-v3.3扫描主机端口提示http TRACE 跨站攻击漏洞; 一,修改配置文件httpd.conf 1.1 apache下面修改httpd.conf文件,在文件最后面新建一行加入:T ...
- 获取mac地址和扫描端口
获取IP mac地址 arp -a 10.0.0.34 扫描指定IP 1到30000端口 nmap -p1-30000 10.0.0.36
- 关于nmap扫描端口
nmap查看一个服务器的端口,是通过扫描来实现的.所以在本机执行nmap扫描的端口有可能被防火墙阻止,在外部是访问不了的. 如:开启ORACLE监听后,在本机使用nmap 127.0.0.1是可以扫描 ...
- (转)使用NMAP工具扫描端口
原文:http://www.linuxde.net/2013/02/12354.html nmap 是一个用于网络探索或安全评测的工具.它支持 ping 扫描(判定哪些主机在运行),多端口扫描技术(判 ...
- nmap 扫描端口 + iftop 实时监控流量
sleep 1|telnet 127.0.0.1 223 nmap 127.0.0.1 -p 223 -PN (对禁ping IP) iftop -P -n -B -B 按字节显示 -N 切换 端 ...
随机推荐
- c++相关知识回顾
1.typedef typedef用来定义同类型的同义词.如: typedef unsingned int size_t; typedef int ptrdiff_t; typedef T * ite ...
- linux系统中whereis的用法详解
whereis命令只能用于程序名的搜索,而且只搜索二进制文件(参数-b).man说明文件(参数-m)和源代码文件(参数-s).如果省略参数,则返回所有信息. 和find相比,whereis查找的速度非 ...
- php运用curl触发后台脚本不超时执行某项任务
运用curl 设置超时,触发后台脚本执行 例如一些需要长时间等待的任务,如创建数据库,下载网络图片等 $ch = curl_init();//$ch资源可以请求多个连接 curl_setopt($ch ...
- C#一个字符串的加密与解密
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.S ...
- Android Activity 管理
- JavaScriptCore-b
JavaScriptCore提供了JavaScript和Objective-C桥接的Obj-C API.JavaScriptCore提供了让我们脱离UIWebView执行JavaScript脚本的能力 ...
- MySQL驱动阅读------Connection连接的建立,基于JDBC-----5.1.26
一般获取数据库连接的程序 Class.forName("com.mysql.jdbc.Driver"); final Connection connection = (Connec ...
- vc2010配置opencv2.4.4库(图文 转)
VC 2010下安装OpenCV2.4.4 说明: 安装平台:32位XP,VS2010: OpenCV 2.4.4不支持VC 6.0: 网上有很多用CMake编译OpenCV的安装教程,这 ...
- 应用安全技术趋势之 Top 5
而今,大多数应用都依赖于像入侵防护系统(Instrusion Prevention System)和 Web 应用防火墙(Web Application Firewall,以下全文简称 WAF)这样的 ...
- Bluetooth LE(低功耗蓝牙) - 第五部分
回顾: 在本系列前面的文章中我们完成了发现BLE传感器并与之建立连接.现在只剩下从其中获取数据了,但是这并没有看起来那么简单.在这篇文章中我们将讨论GATT的特点以及如何促进主机与传感器之间的数据交换 ...