host

nmap高级用法

前提是你 提交于 2019-12-03 02:37:35
探测主机存活常用方式 (1)-sP :进行ping扫描 打印出对ping扫描做出响应的主机,不做进一步测试(如端口扫描或者操作系统探测): 下面去扫描10.0.3.0/24这个网段的的主机 1 nmap -sP 10.0.3.0 /24 这个命令可以用于探测局域网有哪些机器 1 2 3 4 5 6 7 8 9 10 11 [root@B ~] # nmap -sP 10.0.3.0/24 Starting Nmap 5.51 ( http: //nmap .org ) at 2016-12-29 11:24 CST Nmap scan report for 10.0.3.1 Host is up (0.0079s latency). Nmap scan report for 10.0.3.2 Host is up (0.0046s latency). Nmap scan report for 10.0.3.3 Host is up (0.0037s latency). Nmap done : 256 IP addresses (3 hosts up) scanned in 10.01 seconds [root@B ~] # (2) -sn: -sn: Ping Scan - disable port scan #ping探测扫描主机, 不进行端口扫描

The TCP/IP connection to the host localhost, port 1433 has failed error, need assistance

匿名 (未验证) 提交于 2019-12-03 02:35:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Full error I'm getting: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.". I have already checked that TCP/IP is enabled, using port 1433, and TCP dynamic ports is empty. I have disabled windows firewall. Here is my code: import java.sql.*; public class DBConnect { public static void

python3黑帽子渗透笔记第二章--网络基础

时光怂恿深爱的人放手 提交于 2019-12-03 02:32:10
1 先来看看不可少的socket模块 (1)tcp_client.py 在渗透测试过程中,创建一个tcp客户端连接服务,发送垃圾数据,进行模糊测试等。 (2)udp_client.py 2 nc工具的实现   进入服务器以后如果没有安装nc,这个时候却有,这样子可以创建简单的客户端和服务器传递使用的文件,或者创建监听让自己拥有控制命令行的操作权限 需要学习的模块   getopt模块处理命令行   threading模块   socket模块   subprocess模块 1 #!/usr/bin/env python3 2 # coding=utf-8 3 import sys 4 from socket import * 5 import getopt # 用来处理命令行参数 6 import threading 7 import subprocess # 启动一个shell,并控制输入输出 8 9 # -e和-p有问题,mac下运行没什么问题,win下有问题,运行的命令会出现问题。 10 listen = False 11 command = False 12 upload = False 13 execute = "" 14 target = "" 15 upload_destination = "" 16 port = 0 17 18 #帮助提示 19 def usage

UsbManager.getDeviceList() returns empty

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to use the UsbManager API by wrote following code: In the Activity code: UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE); HashMap<String, UsbDevice> deviceList = manager.getDeviceList(); Log.d(TAG, "size =" + deviceList.size()); In the Manifest: <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" /> <permission android:name="android.hardware.usb.host" > </permission> <uses-feature android:name="android.hardware.usb.host" android:required="true" /> I also followed this question , checked my Galaxy

CUDA - memcpy2d - wrong pitch

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I just started CUDA programming, and was trying to execute the code shown below. The idea is to copy a 2dimensional array to the device, calculate the sum of all elements and to retrieve the sum afterwards (I know that this algorithm is not parallelized. In fact it is doing more work, then necessary. This is however just intended as practice for memcopy). #include<stdio.h> #include<cuda.h> #include <iostream> #include <cutil_inline.h> #define height 50 #define width 50 using namespace std; // Device code __global__ void kernel(float* devPtr,

Python urllib2 force IPv4

匿名 (未验证) 提交于 2019-12-03 02:30:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am running a script using python that uses urllib2 to grab data from a weather api and display it on screen. I have had the problem that when I query the server, I get a "no address associated with hostname" error. I can view the output of the api with a web browser, and I can download the file with wget, but I have to force IPv4 to get it to work. Is it possible to force IPv4 in urllib2 when using urllib2.urlopen? 回答1: Not directly, no. So, what can you do? One possibility is to explicitly resolve the hostname to IPv4 yourself, and then

Keycloak with NGINX proxy server not authenticating rest api

匿名 (未验证) 提交于 2019-12-03 02:27:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a sample app which correctly secures the rest api locally without nginx. Now when I put this in production behind a nginx proxy it does not work. No errors. It allows all request. Front end serer with ssl is https://frontend.com Back end server with ssl is https://backend.com Keycloak proxy forward is true Front end server(node server on 9000) <-> NGINX <-> Keycloak (running on 8180) nginx file sample upstream keycloak_server { server localhost:8180; } upstream node_server { server localhost:9000; } location /auth/ { proxy_pass http:/

Get the IP Address of local computer

匿名 (未验证) 提交于 2019-12-03 02:27:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In C++, what's the easiest way to get the local computer's IP address and subnet mask? I want to be able to detect the local machine's IP address in my local network. In my particular case, I have a network with a subnet mask of 255.255.255.0 and my computer's IP address is 192.168.0.5. I need to get these had two values programmatically in order to send a broadcast message to my network (in the form 192.168.0.255, for my particular case) Edit: Many answers were not giving the results I expected because I had two different network IP's.

MongoDB查询转对象时出错 Element '_id' does not match any field or property of class

左心房为你撑大大i 提交于 2019-12-03 02:23:49
参考:https://www.cnblogs.com/94cool/p/6230202.html 解决方法: 1、在实体类加:[BsonIgnoreExtraElements] 2、或者定义public ObjectId _id { get; set; } 例子: [BsonIgnoreExtraElements] public class BaseData { // public ObjectId _id { get; set; } public string cNo { get; set; } public string customer { get; set; } public long batchNo { get; set; } public DateTime mDate { get; set; } public string mUser { get; set; } } 顺便保存下数据库帮助类 public class MongoDBHelper { #region 构造函数(初始化集合,子类需重写集合名) /// <summary> /// 集合 /// </summary> public string _collName { get; set; } public MongoDBHelper(string collName) { this._collName =

Java unknown host exception

匿名 (未验证) 提交于 2019-12-03 02:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to access textalertapp.com via HTTP Post request from my android application. But I am getting Unknown host error. Can anybody help me solve this issue. 12-13 01:30:16.058: WARN/System.err(473): java.net.UnknownHostException: textalertapp.com 12-13 01:30:16.088: WARN/System.err(473): at java.net.InetAddress.lookupHostByName(InetAddress.java:513) 12-13 01:30:16.088: WARN/System.err(473): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:278) 12-13 01:30:16.088: WARN/System.err(473): at java.net.InetAddress.getAllByName