解决Metasploit调用Nessus报错问题

问题描述

Error while running command nessus_scan_new: undefined method `[]’ for nil:NilClass

在这里插入图片描述

解决方法

发现报错,经过网上查询解决方法
在这里插入图片描述
在Nessus服务器执行,下面的版本号可能有所不同,根据自己的情况更改,需要管理员身份执行。

curl "https://raw.githubusercontent.com/QKaiser/nessus_rest-ruby/nessus-protected-api-support/lib/nessus_rest.rb" > /usr/share/metasploit-framework/vendor/bundle/ruby/版本号/gems/nessus_rest-0.1.6/lib/nessus_rest.rb

可能会遇到打不开的情况下,这个时候可以用一台能打开网址的电脑,将内容复制下来粘贴到一个文本文档中,然后将名称命名为nessus_rest.rbNessus服务器中的文件替换掉(建议将原文件改名,然后再将新建的文件放入目标文件夹中即可,以免有问题可以改回来)

https://raw.githubusercontent.com/QKaiser/nessus_rest-ruby/nessus-protected-api-support/lib/nessus_rest.rb

Ps:遇到打不开的童鞋,我把打开的内容贴在文章的最后方便大家直接复制。
然后退出msfconsole,在重新进入msfconsole,加载nessus

exit
msfconsole
load nessus

这个时候发现问题已经解决,能正常执行nessus_scan_new命令
在这里插入图片描述

nessus_rest.rb内容

#!/usr/bin/env ruby
# coding: utf-8
# = nessus_rest.rb: communicate with Nessus(6+) over JSON REST interface
#
# Author:: Vlatko Kosturjak
#
# (C) Vlatko Kosturjak, Kost. Distributed under MIT license.
# 
# == What is this library? 
# 
# This library is used for communication with Nessus over JSON REST interface. 
# You can start, stop, pause and resume scan. Watch progress and status of scan, 
# download report, etc.
#
# == Requirements
# 
# Required libraries are standard Ruby libraries: uri, net/https and json. 
#
# == Usage:
# 
#   require 'nessus_rest'
#
#   n=NessusREST::Client.new ({:url=>'https://localhost:8834', :username=>'user', :password=> 'password'})
#   qs=n.scan_quick_template('basic','name-of-scan','localhost')
#   scanid=qs['scan']['id']
#   n.scan_wait4finish(scanid)
#   n.report_download_file(scanid,'csv','myscanreport.csv')
#require 'openssl'
require 'uri'
require 'net/http'
require 'net/https'
require 'json'# NessusREST module - for all stuff regarding Nessus REST JSON
# module NessusREST# Client class implementation of Nessus (6+) JSON REST protocol. # Class which uses standard JSON lib to parse nessus JSON REST replies. # # == Typical Usage:##   require 'nessus_rest'##   n=NessusREST::Client.new ({:url=>'https://localhost:8834', :username=>'user', :password=> 'password'})#   qs=n.scan_quick_template('basic','name-of-scan','localhost')#   scanid=qs['scan']['id']#   n.scan_wait4finish(scanid)#   n.report_download_file(scanid,'csv','myscanreport.csv')#class Clientattr_accessor :quick_defaultsattr_accessor :defsleep, :httpsleep, :httpretry, :ssl_use, :ssl_verify, :autologinattr_reader :x_cookieclass << self@connection@tokenend# initialize quick scan defaults: these will be used when not specifying defaults## Usage: # #  n.init_quick_defaults()def init_quick_defaults@quick_defaults=Hash.new@quick_defaults['enabled']=false@quick_defaults['launch']='ONETIME'@quick_defaults['launch_now']=true@quick_defaults['description']='Created with nessus_rest'end# initialize object: try to connect to Nessus Scanner using URL, user and password# (or any other defaults)## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')def initialize(params={})# defaults@nessusurl = params.fetch(:url,'https://127.0.0.1:8834/')@username = params.fetch(:username,'nessus')@password = params.fetch(:password,'nessus')@ssl_verify = params.fetch(:ssl_verify,false)@ssl_use = params.fetch(:ssl_use,true)@autologin = params.fetch(:autologin, true)@defsleep = params.fetch(:defsleep, 1)@httpretry = params.fetch(:httpretry, 3)@httpsleep = params.fetch(:httpsleep, 1)init_quick_defaults()uri = URI.parse(@nessusurl)@connection = Net::HTTP.new(uri.host, uri.port)@connection.use_ssl = @ssl_useif @ssl_verify@connection.verify_mode = OpenSSL::SSL::VERIFY_PEERelse@connection.verify_mode = OpenSSL::SSL::VERIFY_NONEendyield @connection if block_given?authenticate(@username, @password) if @autologinend# Tries to authenticate to the Nessus REST JSON interface## returns: true if logged in, false if not## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :autologin=>false)#  if n.authenticate('user','pass')#	puts "Logged in"#  else#	puts "Error"#  enddef authenticate(username, password)@username = username@password = passwordauthdefaultendalias_method :login, :authenticate# Tries to authenticate to the Nessus REST JSON interface## returns: true if logged in, false if not## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :autologin=>false, #     :username=>'nessususer', :password=>'nessuspassword')#  if n.authdefault#	puts "Logged in"#  else#	puts "Error"#  enddef authdefaultpayload = {:username => @username,:password => @password,:json => 1,:authenticationmethod => true}res = http_post(:uri=>"/session", :data=>payload)if res['token']@token = "token=#{res['token']}"# Starting from Nessus 7.x, Tenable protects some endpoints with a custom header# so that they can only be called from the user interface (supposedly).res = http_get({:uri=>"/nessus6.js", :raw_content=> true})@api_token = res.scan(/([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})/).first.last@x_cookie = {'X-Cookie'=>@token, 'X-API-Token'=> @api_token}return trueelsefalseendend# checks if we're logged in correctly## returns: true if logged in, false if not## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  if n.authenticated#	puts "Logged in"#  else#	puts "Error"#  enddef authenticatedif (@token && @token.include?('token='))return trueelsereturn falseendend# try to get server properties## returns: JSON parsed object with server properties## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.get_server_propertiesdef get_server_propertieshttp_get(:uri=>"/server/properties", :fields=>x_cookie)endalias_method :server_properties, :get_server_properties# Add user to server## returns: JSON parsed object## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.user_add('user','password','16','local')## Reference:# https://localhost:8834/api#/resources/users/createdef user_add(username, password, permissions, type)payload = {:username => username, :password => password, :permissions => permissions, :type => type, :json => 1}http_post(:uri=>"/users", :fields=>x_cookie, :data=>payload)end# delete user with user_id## returns: result code## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  puts n.user_delete(1)def user_delete(user_id)res = http_delete(:uri=>"/users/#{user_id}", :fields=>x_cookie)return res.codeend# change password for user_id## returns: result code## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  puts n.user_chpasswd(1,'newPassword')def user_chpasswd(user_id, password)payload = {:password => password, :json => 1}res = http_put(:uri=>"/users/#{user_id}/chpasswd", :data=>payload, :fields=>x_cookie)return res.codeend# logout from the server## returns: result code## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  puts n.user_logoutdef user_logoutres = http_delete(:uri=>"/session", :fields=>x_cookie)return res.codeendalias_method :logout, :user_logout# Get List of Policies## returns: JSON parsed object with list of policies## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.list_policiesdef list_policieshttp_get(:uri=>"/policies", :fields=>x_cookie)end# Get List of Users## returns: JSON parsed object with list of users## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.list_usersdef list_usershttp_get(:uri=>"/users", :fields=>x_cookie)end# Get List of Folders## returns: JSON parsed object with list of folders## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.list_foldersdef list_foldershttp_get(:uri=>"/folders", :fields=>x_cookie)end# Get List of Scanners## returns: JSON parsed object with list of scanners## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.list_scannersdef list_scannershttp_get(:uri=>"/scanners", :fields=>x_cookie)end# Get List of Families## returns: JSON parsed object with list of families## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.list_familiesdef list_familieshttp_get(:uri=>"/plugins/families", :fields=>x_cookie)end# Get List of Plugins## returns: JSON parsed object with list of plugins## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.list_pluginsdef list_plugins(family_id)http_get(:uri=>"/plugins/families/#{family_id}", :fields=>x_cookie)end# Get List of Templates## returns: JSON parsed object with list of templates## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.list_templatesdef list_templates(type)res = http_get(:uri=>"/editor/#{type}/templates", :fields=>x_cookie)enddef plugin_details(plugin_id)http_get(:uri=>"/plugins/plugin/#{plugin_id}", :fields=>x_cookie)end# check if logged in user is administrator## returns: boolean value depending if user is administrator or not## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  if n.is_admin#	puts "Administrator"#  else#	puts "NOT administrator"#  enddef is_adminres = http_get(:uri=>"/session", :fields=>x_cookie)if res['permissions'] == 128return trueelsereturn falseendend# Get server status## returns: JSON parsed object with server status## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.server_statusdef server_statushttp_get(:uri=>"/server/status", :fields=>x_cookie)enddef scan_create(uuid, settings)payload = {:uuid => uuid, :settings => settings,:json => 1}.to_jsonhttp_post(:uri=>"/scans", :body=>payload, :fields=>x_cookie, :ctype=>'application/json')enddef scan_launch(scan_id)http_post(:uri=>"/scans/#{scan_id}/launch", :fields=>x_cookie)end# Get List of Scans## returns: JSON parsed object with list of scans## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.scan_listdef scan_listhttp_get(:uri=>"/scans", :fields=>x_cookie)endalias_method :list_scans, :scan_listdef scan_details(scan_id)http_get(:uri=>"/scans/#{scan_id}", :fields=>x_cookie)enddef scan_pause(scan_id)http_post(:uri=>"/scans/#{scan_id}/pause", :fields=>x_cookie)enddef scan_resume(scan_id)http_post(:uri=>"/scans/#{scan_id}/resume", :fields=>x_cookie)enddef scan_stop(scan_id)http_post(:uri=>"/scans/#{scan_id}/stop", :fields=>x_cookie)enddef scan_export(scan_id, format)payload = {:format => format}.to_jsonhttp_post(:uri=>"/scans/#{scan_id}/export", :body=>payload, :ctype=>'application/json', :fields=>x_cookie)enddef scan_export_status(scan_id, file_id)request = Net::HTTP::Get.new("/scans/#{scan_id}/export/#{file_id}/status")request.add_field("X-Cookie", @token)res = @connection.request(request)res = JSON.parse(res.body)return resend# delete scan with scan_id## returns: boolean (true if deleted)## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  puts n.scan_delete(1)def scan_delete(scan_id)res = http_delete(:uri=>"/scans/#{scan_id}", :fields=>x_cookie)if res.code == 200 thenreturn trueendreturn falseenddef policy_delete(policy_id)res = http_delete(:uri=>"/policies/#{policy_id}", :fields=>x_cookie)return res.codeend# Get template by type and uuid. Type can be 'policy' or 'scan'## returns: JSON parsed object with template## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.editor_templates('scan',uuid)def editor_templates (type, uuid)res = http_get(:uri=>"/editor/#{type}/templates/#{uuid}", :fields=>x_cookie)end# Performs scan with templatename provided (name, title or uuid of scan).# Name is your scan name and targets are targets for scan## returns: JSON parsed object with scan info## Usage:##   require 'nessus_rest'##   n=NessusREST::Client.new ({:url=>'https://localhost:8834', :username=>'user', :password=> 'password'})#   qs=n.scan_quick_template('basic','name-of-scan','localhost')#   scanid=qs['scan']['id']#   n.scan_wait4finish(scanid)#   n.report_download_file(scanid,'csv','myscanreport.csv')#def scan_quick_template (templatename, name, targets)templates=list_templates('scan')['templates'].select do |temp| temp['uuid'] == templatename or temp['name'] == templatename or temp['title'] == templatenameendif templates.nil? thenreturn nilendtuuid=templates.first['uuid']et=editor_templates('scan',tuuid)et.merge!(@quick_defaults)et['name']=nameet['text_targets']=targetssc=scan_create(tuuid,et)end# Performs scan with scan policy provided (uuid of policy or policy name).# Name is your scan name and targets are targets for scan## returns: JSON parsed object with scan info## Usage:##   require 'nessus_rest'##   n=NessusREST::Client.new ({:url=>'https://localhost:8834', :username=>'user', :password=> 'password'})#   qs=n.scan_quick_policy('myscanpolicy','name-of-scan','localhost')#   scanid=qs['scan']['id']#   n.scan_wait4finish(scanid)#   n.report_download_file(scanid,'nessus','myscanreport.nessus')#def scan_quick_policy (policyname, name, targets)policies=list_policies['policies'].select do |pol|pol['id'] == policyname or pol['name'] == policynameendif policies.nil? thenreturn nilendpolicy = policies.firsttuuid=policy['template_uuid']et=Hash.newet.merge!(@quick_defaults)et['name']=nameet['policy_id'] = policy['id']et['text_targets']=targetssc=scan_create(tuuid,et)enddef scan_status(scan_id)sd=scan_details(scan_id)if not sd['error'].nil?return 'error'endreturn sd['info']['status']enddef scan_finished?(scan_id)ss=scan_status(scan_id)if ss == 'completed' or ss == 'canceled' or ss == 'imported' thenreturn trueendreturn falseenddef scan_wait4finish(scan_id)while not scan_finished?(scan_id) do# puts scan_status(scan_id)sleep @defsleependend# Get host details from the scan## returns: JSON parsed object with host details## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.host_detail(123, 1234)def host_detail(scan_id, host_id)res = http_get(:uri=>"/scans/#{scan_id}/hosts/#{host_id}", :fields=>x_cookie)enddef report_download(scan_id, file_id)res = http_get(:uri=>"/scans/#{scan_id}/export/#{file_id}/download", :raw_content=> true, :fields=>x_cookie)enddef report_download_quick(scan_id, format) se=scan_export(scan_id,format)# ready, loadingwhile (status = scan_export_status(scan_id,se['file'])['status']) != "ready" do# puts statusif status.nil? or status == '' thenreturn nilendsleep @defsleependrf=report_download(scan_id,se['file'])return rfenddef report_download_file(scan_id, format, outputfn)report_content=report_download_quick(scan_id, format)File.open(outputfn, 'w') do |f| f.write(report_content)endend## private?## Perform HTTP put method with uri, data and fields## returns: HTTP result object## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  payload = {#    :password => password, #    :json => 1#  }#  res = n.http_put(:uri=>"/users/#{user_id}/chpasswd", :data=>payload, :fields=>n.x_cookie)#  puts res.code def http_put(opts={})ret=http_put_low(opts)if ret.is_a?(Hash) and ret.has_key?('error') and ret['error']=='Invalid Credentials' thenauthdefaultret=http_put_low(opts)return retelsereturn retendenddef http_put_low(opts={})uri    = opts[:uri]data   = opts[:data]fields = opts[:fields] || {}res    = niltries  = @httpretryreq = Net::HTTP::Put.new(uri)req.set_form_data(data) unless (data.nil? || data.empty?)fields.each_pair do |name, value|req.add_field(name, value)endbegintries -= 1res = @connection.request(req)rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError => eif tries>0sleep @httpsleepretryelsereturn resendrescue URI::InvalidURIErrorreturn resendresend# Perform HTTP delete method with uri, data and fields## returns: HTTP result object## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  res = n.http_delete(:uri=>"/session", :fields=>n.x_cookie)#  puts res.codedef http_delete(opts={})ret=http_delete_low(opts)if ret.is_a?(Hash) and ret.has_key?('error') and ret['error']=='Invalid Credentials' thenauthdefaultret=http_delete_low(opts)return retelsereturn retendenddef http_delete_low(opts={})uri    = opts[:uri]fields = opts[:fields] || {}res    = niltries  = @httpretryreq = Net::HTTP::Delete.new(uri)fields.each_pair do |name, value|req.add_field(name, value)endbegintries -= 1res = @connection.request(req)rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError => eif tries>0sleep @httpsleepretryelsereturn resendrescue URI::InvalidURIErrorreturn resendresend# Perform HTTP get method with uri and fields## returns: JSON parsed object (if JSON parseable)## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.http_get(:uri=>"/users", :fields=>n.x_cookie)def http_get(opts={})raw_content = opts[:raw_content] || falseret=http_get_low(opts)if !raw_content thenif ret.is_a?(Hash) and ret.has_key?('error') and ret['error']=='Invalid Credentials' thenauthdefaultret=http_get_low(opts)return retelsereturn retendelsereturn retendenddef http_get_low(opts={})uri    = opts[:uri]fields = opts[:fields] || {}raw_content = opts[:raw_content] || falsejson   = {}tries  = @httpretryreq = Net::HTTP::Get.new(uri)fields.each_pair do |name, value|req.add_field(name, value)endbegintries -= 1res = @connection.request(req)rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError => eif tries>0sleep @httpsleepretryelsereturn jsonendrescue URI::InvalidURIErrorreturn jsonendif !raw_contentparse_json(res.body)elseres.bodyendend# Perform HTTP post method with uri, data, body and fields## returns: JSON parsed object (if JSON parseable)## Usage:##  n=NessusREST::Client.new (:url=>'https://localhost:8834', :username=>'user', :password=> 'password')#  pp n.http_post(:uri=>"/scans/#{scan_id}/launch", :fields=>n.x_cookie)def http_post(opts={})if opts.has_key?(:authenticationmethod) then# i know authzmethod = opts.delete(:authorizationmethod) is short, but not readableauthzmethod = opts[:authenticationmethod]opts.delete(:authenticationmethod)endret=http_post_low(opts)if ret.is_a?(Hash) and ret.has_key?('error') and ret['error']=='Invalid Credentials' thenif not authzmethodauthdefaultret=http_post_low(opts)return retendelsereturn retendenddef http_post_low(opts={})uri    = opts[:uri]data   = opts[:data]fields = opts[:fields] || {}body   = opts[:body]ctype  = opts[:ctype]json   = {}tries  = @httpretryreq = Net::HTTP::Post.new(uri)req.set_form_data(data) unless (data.nil? || data.empty?)req.body = body unless (body.nil? || body.empty?)req['Content-Type'] = ctype unless (ctype.nil? || ctype.empty?)fields.each_pair do |name, value|req.add_field(name, value)endbegintries -= 1res = @connection.request(req)rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError => eif tries>0sleep @httpsleepretryelsereturn jsonendrescue URI::InvalidURIErrorreturn jsonendparse_json(res.body)end# Perform JSON parsing of body## returns: JSON parsed object (if JSON parseable)#def parse_json(body)buf = {}beginbuf = JSON.parse(body)rescue JSON::ParserErrorendbufendend # of Client class
end # of NessusREST module

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/420594.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

AI预测地球未来,温室效应失控?地球变金星?

想象一下&#xff0c;如果地球的气候突然失控&#xff0c;我们熟悉的蓝色星球会变成什么模样&#xff1f; 最近&#xff0c;一项由法国科学家使用人工智能系统进行的气候模拟研究揭示了一个惊人的未来景象&#xff1a;地球可能会变得如同金星一般&#xff0c;拥有高达270个大气…

Jupyter Notebook设置代码提示和自动代码补全

算法学习、4对1辅导、论文辅导或核心期刊可以通过公众号滴滴我 文章目录 在使用Jupyter Notebook中&#xff0c;会出现Jupyter不像Pycharm一样&#xff0c;可以 自动补全代码以及 代码方法提示等功能&#xff0c;这时候就需要通过给Jupyter安装插件来进行实现。 执行步骤&#…

《PneumoLLM:利用大型语言模型的力量进行尘肺病诊断》|文献速递--基于深度学习的医学影像病灶分割

Title 题目 PneumoLLM: Harnessing the power of large language model for pneumoconiosis diagnosis 《PneumoLLM&#xff1a;利用大型语言模型的力量进行尘肺病诊断》 01 文献速递介绍 在计算机辅助诊断领域&#xff0c;对医学数据的处理和分析能力至关重要。这不仅有助…

Nature Communications 多模触觉-视觉融合机器人:用于灵巧机器人做家务

随着机器人越来越多地参与人类日常生活&#xff0c;对模仿人类能力的追求推动了机器人多模态感官的进步。然而&#xff0c;目前的感知技术仍然不能满足机器人在家庭任务/环境中的需求&#xff0c;特别是在多感官整合和融合、快速反应能力和高灵敏度感知方面面临着巨大的挑战。 …

91、K8s之ingress上集

一、Ingress service模式&#xff1a; loadbalance NodePort&#xff1a;每个节点都会有一个指定的端口 30000-32767 内网 clusterip&#xff1a;默认模式&#xff0c;只能pod内部访问 externalName&#xff1a;需要dns提供域名 1.1、对外提供服务的ingress service&…

动态单窗口IP代理:提升网络操作的灵活性和安全性

互联网时代&#xff0c;各种网络工具层出不穷&#xff0c;而动态单窗口IP代理无疑成为了近年来的热门话题。今天&#xff0c;我们就来聊聊这个神奇的工具&#xff0c;看看它到底有什么独特之处。 什么是动态单窗口IP代理&#xff1f; 动态单窗口IP代理&#xff0c;顾名思义&a…

OpenGL Texture C++ 预览Camera视频

OpenGL是一个图形API&#xff0c;并不是一个独立的平台。包含了一系列可以操作图形、图像的函数。基于Texture纹理强大的功能&#xff0c;本篇文章实现Android OpenGL Texture C 预览Camera视频流的功能。 项目github地址&#xff1a;https://github.com/wangyongyao1989/WyFFm…

动手学深度学习(pytorch)学习记录27-深度卷积神经网络(AlexNet)[学习记录]

目录 创建模型读取数据集训练AlexNet AlexNet 是由 Alex Krizhevsky、Ilya Sutskever 和 Geoffrey Hinton 在 2012 年提出的深度卷积神经网络&#xff0c;它在当年的 ImageNet 大规模视觉识别挑战赛&#xff08;ILSVRC&#xff09;中取得了显著的成绩&#xff0c;从而引起了深度…

15.3 JDBC数据库编程2

15.3.1 数据库访问步骤 使用JDBC API连接和访问数据库&#xff0c;一般分为以下5个步骤: (1) 加载驱动程序 (2) 建立连接对象 (3) 创建语句对象 (4) 获得SQL语句的执行结果 (5) 关闭建立的对象&#xff0c;释放资源 下面将详细描述这些步骤 15.3.2 加载驱动程序 要使…

计算机网络408考研 2022

https://zhuanlan.zhihu.com/p/695446866 1 1 1SDN代表软件定义网络。它是一种网络架构&#xff0c;旨在通过将网络控制平面从数据转发平面分离出来&#xff0c;从而实现网络的灵活性和可编程性。在SDN中&#xff0c;网络管理员可以通过集中式控制器 来动态管理网络流量&…

2024 年 8 月区块链游戏研报:用户增长与加密货币市场波动并存

作者&#xff1a;Stella L (stellafootprint.network) 数据来源&#xff1a;Footprint Analytics Games Research 页面 8 月&#xff0c;加密货币市场面临严峻挑战&#xff0c;比特币和以太币的价值都大幅下跌。比特币下跌了 9.3%&#xff0c;而以太坊的跌幅更为严重&#x…

代码随想录27期|Python|Day51|​动态规划|​115.不同的子序列|​583. 两个字符串的删除操作​|

115. 不同的子序列 本题是在原来匹配子序列的基础上增加了统计所匹配的子序列个数&#xff0c;也就是dp数组的定义和更新公式和原来的有所区别。 1、dp数组的定义 dp[i][j]表示以i-1和j-1为末尾的字符串中&#xff0c;给定字符串s包含目标字符串t的个数。注意这里不是长度。…

CTF入门教程(非常详细)从零基础入门到竞赛,看这一篇就够了!

一、CTF简介 CTF&#xff08;Capture The Flag&#xff09;中文一般译作夺旗赛&#xff0c;在网络安全领域中指的是网络安全技术人员之间进行技术竞技的一种比赛形式。CTF起源于1996年DEFCON全球黑客大会&#xff0c;以代替之前黑客们通过互相发起真实攻击进行技术比拼的方式。…

多个微信是怎么进行管理的?

随着微信逐渐成为企业商务沟通的重要平台&#xff0c;对于业务咨询量较大的行业&#xff08;例如教育培训、旅游、美容以及医疗等&#xff09;而言&#xff0c;在利用微信进行营销活动和客户服务的过程中&#xff0c;往往会遭遇多微信管理的困境。 在此情形下&#xff0c;选用工…

企业出海网络方案,助力TikTok直播

在全球贸易蓬勃发展的今天&#xff0c;出海电商已成为引领增长的新动力&#xff0c;政府对此的支持力度也在持续加大&#xff0c;为企业带来了前所未有的出海机遇。越来越多的企业开始进军TikTok直播等业务&#xff0c;而在这一过程中&#xff0c;一个适应全球化运营的出海网络…

RS485网关在工业自动化控制系统中的应用-天拓四方

随着工业自动化控制系统的不断发展&#xff0c;各种现场总线技术在工业领域得到了广泛应用。其中&#xff0c;RS485作为一种半双工的通信方式&#xff0c;因其通信距离远、抗干扰能力强、传输速率高等优点&#xff0c;在工业现场得到了广泛应用。而RS485网关作为连接不同网络之…

“人大金仓”正式更名为“电科金仓”; TDSQL-C支持回收站/并行DDL等功能; BigQuery支持直接查询AlloyDB

重要更新 1. “人大金仓”正式更名为“电科金仓”&#xff0c;完整名称“中电科金仓&#xff08;北京&#xff09;科技股份有限公司”&#xff0c;突出金仓是中国电子科技集团有限公司在基础软件领域产品( [1] ) 。据悉人大金仓在上半年营收入为9056万元&#xff0c;净利润约21…

并发编程:Future类

一、Future 类有什么用&#xff1f; Future 类是异步思想的典型运用&#xff0c;主要用在一些需要执行耗时任务的场景&#xff0c;避免程序一直原地等待耗时任务执行完成&#xff0c;执行效率太低。具体来说是这样的&#xff1a;当我们执行某一耗时的任务时&#xff0c;可以将…

使用Python自动抓取亚马逊网站商品信息

全量数据抓取不现实&#xff0c;但可以自动化、小批量采集亚马逊数据&#xff0c;现在可用的工具也非常多&#xff0c;包括Python以及一些专门的爬虫软件&#xff0c;我用过几个比较好入手的&#xff0c;像web scraper、八爪鱼、亮数据。 比如亮数据爬虫&#xff0c;它提供数据…

Dubbo精要

1、为什么需要 Dubbo&#xff1f; 分布式系统中的服务调用和协调问题&#xff1a;在分布式系统中&#xff0c;服务之间的相互依赖会导致复杂的通信和协调问题。Dubbo提供了高效的服务调用和自动注册、发现等功能&#xff0c;使得构建分布式应用程序更加容易。服务治理和服务调…