Metasploit 一些重要模块使用介绍

  本文是"T00LS Metasploit(第一季)"的文档版,是个人在观看视频动手操作的一个记录,仅供学习。文中会介绍Metasploit的一些基本使用:端口扫描、smb扫描、服务识别、密码嗅探等

一、端口扫描

  关于端口扫描的话,我们首先想到的可能会是nmap,除此之外呢,Metasploit也内置了相应的扫描模块。以目标:192.168.1.111为例

Nmap扫描

[email protected]:~# nmap -v -sV 192.168.1.111

Starting Nmap 7.50 ( https://nmap.org ) at 2017-08-22 07:56 EDT
NSE: Loaded 41 scripts for scanning.
Initiating ARP Ping Scan at 07:56
Scanning 192.168.1.111 [1 port]
Completed ARP Ping Scan at 07:56, 0.24s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 07:56
Completed Parallel DNS resolution of 1 host. at 07:56, 0.01s elapsed
Initiating SYN Stealth Scan at 07:56
Scanning 192.168.1.111 [1000 ports]
Discovered open port 443/tcp on 192.168.1.111
Discovered open port 445/tcp on 192.168.1.111
Discovered open port 139/tcp on 192.168.1.111
Discovered open port 135/tcp on 192.168.1.111
Discovered open port 3306/tcp on 192.168.1.111
Discovered open port 80/tcp on 192.168.1.111
Completed SYN Stealth Scan at 07:56, 7.16s elapsed (1000 total ports)
Initiating Service scan at 07:56
Scanning 6 services on 192.168.1.111
Completed Service scan at 07:57, 43.56s elapsed (6 services on 1 host)
NSE: Script scanning 192.168.1.111.
Initiating NSE at 07:57
Completed NSE at 07:57, 0.19s elapsed
Initiating NSE at 07:57
Completed NSE at 07:57, 0.00s elapsed
Nmap scan report for 192.168.1.111
Host is up (0.00058s latency).
Not shown: 994 closed ports
PORT     STATE SERVICE      VERSION
80/tcp   open  http         Apache httpd 2.4.3 ((Win32) OpenSSL/1.0.1c PHP/5.4.7)
135/tcp  open  msrpc        Microsoft Windows RPC
139/tcp  open  netbios-ssn  Microsoft Windows netbios-ssn
443/tcp  open  ssl/ssl      Apache httpd (SSL-only mode)
445/tcp  open  microsoft-ds Microsoft Windows XP microsoft-ds
3306/tcp open  mysql        MySQL (unauthorized)
MAC Address: 00:0C:29:4B:66:A6 (VMware)
Service Info: OSs: Windows, Windows XP; CPE: cpe:/o:microsoft:windows, cpe:/o:microsoft:windows_xp

Read data files from: /usr/bin/../share/nmap
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 51.86 seconds
           Raw packets sent: 1224 (53.840KB) | Rcvd: 1128 (45.152KB)

Metasploit扫描

[email protected]:~# msfconsole
msf > nmap -v -sV 192.168.1.111        【可以直接调用nmap】
[*] exec: nmap -v -sV 192.168.1.111
...
结果同上,就不过多展示了
...
msf > search portscan

Matching Modules
================

   Name                                              Disclosure Date  Rank    Description
   ----                                              ---------------  ----    -----------
   auxiliary/scanner/http/wordpress_pingback_access                   normal  Wordpress Pingback Locator
   auxiliary/scanner/natpmp/natpmp_portscan                           normal  NAT-PMP External Port Scanner
   auxiliary/scanner/portscan/ack                                     normal  TCP ACK Firewall Scanner
   auxiliary/scanner/portscan/ftpbounce                               normal  FTP Bounce Port Scanner
   auxiliary/scanner/portscan/syn                                     normal  TCP SYN Port Scanner
   auxiliary/scanner/portscan/tcp                                     normal  TCP Port Scanner
   auxiliary/scanner/portscan/xmas                                    normal  TCP "XMas" Port Scanner
   auxiliary/scanner/sap/sap_router_portscanner                       normal  SAPRouter Port Scanner

端口扫描模块:可以看到有ack、syn、tcp等,以tcp端口扫描为例,目标机器:192.168.1.111。

auxiliary/scanner/portscan/tcp

msf > use auxiliary/scanner/portscan/tcp
msf auxiliary(tcp) > show options

Module options (auxiliary/scanner/portscan/tcp):

   Name         Current Setting  Required  Description
   ----         ---------------  --------  -----------
   CONCURRENCY  10               yes       The number of concurrent ports to check per host
   DELAY        0                yes       The delay between connections, per thread, in milliseconds
   JITTER       0                yes       The delay jitter factor (maximum value by which to +/- DELAY) in milliseconds.
   PORTS        1-10000          yes       Ports to scan (e.g. 22-25,80,110-900)
   RHOSTS                        yes       The target address range or CIDR identifier
   THREADS      1                yes       The number of concurrent threads
   TIMEOUT      1000             yes       The socket connect timeout in milliseconds

msf auxiliary(tcp) > set rhosts 192.168.1.111      【设置扫描目标】
rhosts => 192.168.1.111      
msf auxiliary(tcp) > set threads 5             【设置扫描线程数】
threads => 5
msf auxiliary(tcp) > show options

Module options (auxiliary/scanner/portscan/tcp):

   Name         Current Setting  Required  Description
   ----         ---------------  --------  -----------
   CONCURRENCY  10               yes       The number of concurrent ports to check per host
   DELAY        0                yes       The delay between connections, per thread, in milliseconds
   JITTER       0                yes       The delay jitter factor (maximum value by which to +/- DELAY) in milliseconds.
   PORTS        1-10000          yes       Ports to scan (e.g. 22-25,80,110-900)
   RHOSTS       192.168.1.111    yes       The target address range or CIDR identifier
   THREADS      5                yes       The number of concurrent threads
   TIMEOUT      1000             yes       The socket connect timeout in milliseconds

msf auxiliary(tcp) > run

[*] 192.168.1.111:        - 192.168.1.111:135 - TCP OPEN
[*] 192.168.1.111:        - 192.168.1.111:139 - TCP OPEN
[*] 192.168.1.111:        - 192.168.1.111:443 - TCP OPEN
[*] 192.168.1.111:        - 192.168.1.111:445 - TCP OPEN
[*] 192.168.1.111:        - 192.168.1.111:3306 - TCP OPEN...

从上面可以看到tcp端口扫描的开放情况。

二、SMB扫描

  可以用来获取操作系统信息,请看...

msf auxiliary(tcp) > search smb_version

Matching Modules
================

   Name                               Disclosure Date  Rank    Description
   ----                               ---------------  ----    -----------
   auxiliary/scanner/smb/smb_version                   normal  SMB Version Detection

msf auxiliary(tcp) > use auxiliary/scanner/smb/smb_version
msf auxiliary(smb_version) > show options

Module options (auxiliary/scanner/smb/smb_version):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   RHOSTS                      yes       The target address range or CIDR identifier
   SMBDomain  .                no        The Windows domain to use for authentication
   SMBPass                     no        The password for the specified username
   SMBUser                     no        The username to authenticate as
   THREADS    1                yes       The number of concurrent threads

msf auxiliary(smb_version) > set rhosts 192.168.1.111    【设置目标主机,单个主机】
rhosts => 192.168.1.111
msf auxiliary(smb_version) > set threads 5           【设置线程数】 
threads => 5
msf auxiliary(smb_version) > run

[*] 192.168.1.111:445     - Host is running Windows XP SP2+ (language:Chinese - Traditional) (name:CHINA-5D20EA9B7) (workgroup:WORKGROUP )
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

上面展示的是扫描单个主机的情况,我们还可以用来扫描一个网段...

msf auxiliary(smb_version) > set rhosts 192.168.1.0/24    【当然也可以指定多个ip或一个ip范围】
rhosts => 192.168.1.0/24
msf auxiliary(smb_version) > set threads 10
threads => 10
msf auxiliary(smb_version) > run

[*] Scanned  30 of 256 hosts (11% complete)
[*] Scanned  52 of 256 hosts (20% complete)
[*] Scanned  77 of 256 hosts (30% complete)
[*] 192.168.1.101:445     - Host is running Windows 10 Pro (build:15063) (name:TTCN-WYX) (workgroup:WORKGROUP )
[*] 192.168.1.103:445     - Host is running Windows XP SP0 / 1 (language:Chinese - Traditional) (name:STARNIGHT) (workgroup:WORKGROUP )
[*] Scanned 103 of 256 hosts (40% complete)
[*] 192.168.1.111:445     - Host is running Windows XP SP2+ (language:Chinese - Traditional) (name:CHINA-5D20EA9B7) (workgroup:WORKGROUP )
[*] Scanned 128 of 256 hosts (50% complete)
[*] Scanned 155 of 256 hosts (60% complete)
[*] Scanned 180 of 256 hosts (70% complete)
[*] Scanned 206 of 256 hosts (80% complete)
[*] Scanned 231 of 256 hosts (90% complete)
[*] Scanned 256 of 256 hosts (100% complete)
[*] Auxiliary module execution completed

三、服务识别

SSH服务识别

msf > search ssh_version

Matching Modules
================

   Name                                       Disclosure Date  Rank    Description
   ----                                       ---------------  ----    -----------
   auxiliary/fuzzers/ssh/ssh_version_15                        normal  SSH 1.5 Version Fuzzer
   auxiliary/fuzzers/ssh/ssh_version_2                         normal  SSH 2.0 Version Fuzzer
   auxiliary/fuzzers/ssh/ssh_version_corrupt                   normal  SSH Version Corruption
   auxiliary/scanner/ssh/ssh_version                           normal  SSH Version Scanner

msf > use auxiliary/scanner/ssh/ssh_version
msf auxiliary(ssh_version) > show options

Module options (auxiliary/scanner/ssh/ssh_version):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   RHOSTS                    yes       The target address range or CIDR identifier
   RPORT    22               yes       The target port (TCP)
   THREADS  1                yes       The number of concurrent threads
   TIMEOUT  30               yes       Timeout for the SSH probe

msf auxiliary(ssh_version) > set rhosts 165.227.29.209
rhosts => 165.227.29.209
msf auxiliary(ssh_version) > set threads 10
threads => 10
msf auxiliary(ssh_version) > run

[*] 165.227.29.209:22     - SSH server version: SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 ( service.version=7.2p2 openssh.comment=Ubuntu-4ubuntu2.2 service.vendor=OpenBSD service.family=OpenSSH service.product=OpenSSH os.vendor=Ubuntu os.device=General os.family=Linux os.product=Linux os.certainty=0.75 service.protocol=ssh fingerprint_db=ssh.banner )
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

FTP服务识别

msf > search ftp_version

Matching Modules
================

   Name                               Disclosure Date  Rank    Description
   ----                               ---------------  ----    -----------
   auxiliary/scanner/ftp/ftp_version                   normal  FTP Version Scanner

msf > use auxiliary/scanner/ftp/ftp_version
msf auxiliary(ftp_version) > show options

Module options (auxiliary/scanner/ftp/ftp_version):

   Name     Current Setting      Required  Description
   ----     ---------------      --------  -----------
   FTPPASS  [email protected]  no        The password for the specified username
   FTPUSER  anonymous            no        The username to authenticate as
   RHOSTS                        yes       The target address range or CIDR identifier
   RPORT    21                   yes       The target port (TCP)
   THREADS  1                    yes       The number of concurrent threads

msf auxiliary(ftp_version) > set rhosts 112.86.69.175    【随手在shodan上搜索到的一台主机】
rhosts => 112.86.69.175
msf auxiliary(ftp_version) > set threads 10
threads => 10
msf auxiliary(ftp_version) > run

[*] 112.86.69.175:21      - FTP Banner: ‘220 Microsoft FTP Service\x0d\x0a‘
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

四、密码嗅探

FTP密码嗅探

在测试机ubuntu16.04: 192.168.1.105安装了一个vsftpd服务,kali:192.168.1.110进行登录测试和嗅探密码。

msf > search psnuffle

Matching Modules
================

   Name                        Disclosure Date  Rank    Description
   ----                        ---------------  ----    -----------
   auxiliary/sniffer/psnuffle                   normal  pSnuffle Packet Sniffer

msf > use auxiliary/sniffer/psnuffle
msf auxiliary(psnuffle) > show options

Module options (auxiliary/sniffer/psnuffle):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   FILTER                      no        The filter string for capturing traffic
   INTERFACE                   no        The name of the interface
   PCAPFILE                    no        The name of the PCAP capture file to process
   PROTOCOLS  all              yes       A comma-delimited list of protocols to sniff or "all".
   SNAPLEN    65535            yes       The number of bytes to capture
   TIMEOUT    500              yes       The number of seconds to wait for new data

Auxiliary action:

   Name     Description
   ----     -----------
   Sniffer  

msf auxiliary(psnuffle) > set protocols ftp    【有必要设置一下监听的协议】
protocols => ftp
msf auxiliary(psnuffle) > run
[*] Auxiliary module execution completed
msf auxiliary(psnuffle) >
[*] Loaded protocol FTP from /usr/share/metasploit-framework/data/exploits/psnuffle/ftp.rb...
[*] Sniffing traffic.....
[!] *** auxiliary/sniffer/psnuffle is still calling the deprecated report_auth_info method! This needs to be updated!
[!] *** For detailed information about LoginScanners and the Credentials objects see:
[!]      https://github.com/rapid7/metasploit-framework/wiki/Creating-Metasploit-Framework-LoginScanners
[!]      https://github.com/rapid7/metasploit-framework/wiki/How-to-write-a-HTTP-LoginScanner-Module
[!] *** For examples of modules converted to just report credentials without report_auth_info, see:
[!]      https://github.com/rapid7/metasploit-framework/pull/5376
[!]      https://github.com/rapid7/metasploit-framework/pull/5377
[*] Successful FTP Login: 192.168.1.110:34362-192.168.1.105:21 >> lz / 123456

登录截图:

嗅探密码运行截图:

五、几个重要模块

SNMP登录

msf > search snmp_login

Matching Modules
================

   Name                               Disclosure Date  Rank    Description
   ----                               ---------------  ----    -----------
   auxiliary/scanner/snmp/snmp_login                   normal  SNMP Community Login Scanner

msf > use auxiliary/scanner/snmp/snmp_login
msf auxiliary(snmp_login) > show options

Module options (auxiliary/scanner/snmp/snmp_login):

   Name              Current Setting                                                       Required  Description
   ----              ---------------                                                       --------  -----------
   BLANK_PASSWORDS   false                                                                 no        Try blank passwords for all users
   BRUTEFORCE_SPEED  5                                                                     yes       How fast to bruteforce, from 0 to 5
   DB_ALL_CREDS      false                                                                 no        Try each user/password couple stored in the current database
   DB_ALL_PASS       false                                                                 no        Add all passwords in the current database to the list
   DB_ALL_USERS      false                                                                 no        Add all users in the current database to the list
   PASSWORD                                                                                no        The password to test
   PASS_FILE         /usr/share/metasploit-framework/data/wordlists/snmp_default_pass.txt  no        File containing communities, one per line
   RHOSTS                                                                                  yes       The target address range or CIDR identifier
   RPORT             161                                                                   yes       The target port
   STOP_ON_SUCCESS   false                                                                 yes       Stop guessing when a credential works for a host
   THREADS           1                                                                     yes       The number of concurrent threads
   USER_AS_PASS      false                                                                 no        Try the username as the password for all users
   VERBOSE           true                                                                  yes       Whether to print output for all attempts
   VERSION           1                                                                     yes       The SNMP version to scan (Accepted: 1, 2c, all)

SNMP枚举

msf > search snmp_enum

Matching Modules
================

   Name                                          Disclosure Date  Rank    Description
   ----                                          ---------------  ----    -----------
   auxiliary/scanner/snmp/cambium_snmp_loot                       normal  Cambium ePMP SNMP Enumeration
   auxiliary/scanner/snmp/sbg6580_enum                            normal  ARRIS / Motorola SBG6580 Cable Modem SNMP Enumeration Module
   auxiliary/scanner/snmp/snmp_enum                               normal  SNMP Enumeration Module
   auxiliary/scanner/snmp/snmp_enum_hp_laserjet                   normal  HP LaserJet Printer SNMP Enumeration
   auxiliary/scanner/snmp/snmp_enumshares                         normal  SNMP Windows SMB Share Enumeration
   auxiliary/scanner/snmp/snmp_enumusers                          normal  SNMP Windows Username Enumeration

msf > use auxiliary/scanner/snmp/snmp_enum
msf auxiliary(snmp_enum) > show options

Module options (auxiliary/scanner/snmp/snmp_enum):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   COMMUNITY  public           yes       SNMP Community String
   RETRIES    1                yes       SNMP Retries
   RHOSTS                      yes       The target address range or CIDR identifier
   RPORT      161              yes       The target port (UDP)
   THREADS    1                yes       The number of concurrent threads
   TIMEOUT    1                yes       SNMP Timeout
   VERSION    1                yes       SNMP Version <1/2c>

SMB登录

  登录验证在实验的时候,并没有完美成功,而是出现一个这样的错误"This system does not accept authentication with any credentials, proceeding with brute force"。故这里不做过多演示:

msf auxiliary(smb_login) > search smb_login

Matching Modules
================

   Name                                           Disclosure Date  Rank    Description
   ----                                           ---------------  ----    -----------
   auxiliary/fuzzers/smb/smb_ntlm1_login_corrupt                   normal  SMB NTLMv1 Login Request Corruption
   auxiliary/scanner/smb/smb_login                                 normal  SMB Login Check Scanner

msf auxiliary(smb_login) > use auxiliary/scanner/smb/smb_login
msf auxiliary(smb_login) > show options

Module options (auxiliary/scanner/smb/smb_login):

   Name              Current Setting  Required  Description
   ----              ---------------  --------  -----------
   ABORT_ON_LOCKOUT  false            yes       Abort the run when an account lockout is detected
   BLANK_PASSWORDS   false            no        Try blank passwords for all users
   BRUTEFORCE_SPEED  5                yes       How fast to bruteforce, from 0 to 5
   DB_ALL_CREDS      false            no        Try each user/password couple stored in the current database
   DB_ALL_PASS       false            no        Add all passwords in the current database to the list
   DB_ALL_USERS      false            no        Add all users in the current database to the list
   DETECT_ANY_AUTH   true             no        Enable detection of systems accepting any authentication
   PASS_FILE                          no        File containing passwords, one per line
   PRESERVE_DOMAINS  true             no        Respect a username that contains a domain name.
   Proxies                            no        A proxy chain of format type:host:port[,type:host:port][...]
   RECORD_GUEST      false            no        Record guest-privileged random logins to the database
   RHOSTS            192.168.1.111    yes       The target address range or CIDR identifier
   RPORT             445              yes       The SMB service port (TCP)
   SMBDomain         .                no        The Windows domain to use for authentication
   SMBPass           123456           no        The password for the specified username
   SMBUser           administrator    no        The username to authenticate as
   STOP_ON_SUCCESS   false            yes       Stop guessing when a credential works for a host
   THREADS           30               yes       The number of concurrent threads
   USERPASS_FILE                      no        File containing users and passwords separated by space, one pair per line
   USER_AS_PASS      false            no        Try the username as the password for all users
   USER_FILE                          no        File containing usernames, one per line
   VERBOSE           true             yes       Whether to print output for all attempts

VNC身份验证

msf > search vnc_none_auth

Matching Modules
================

   Name                                 Disclosure Date  Rank    Description
   ----                                 ---------------  ----    -----------
   auxiliary/scanner/vnc/vnc_none_auth                   normal  VNC Authentication None Detection

msf > use auxiliary/scanner/vnc/vnc_none_auth
msf auxiliary(vnc_none_auth) > show options

Module options (auxiliary/scanner/vnc/vnc_none_auth):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   RHOSTS                    yes       The target address range or CIDR identifier
   RPORT    5900             yes       The target port (TCP)
   THREADS  1                yes       The number of concurrent threads

  视频教程后面的几个就不介绍了,整体来说,第一季的视频比较鸡肋,仅仅是操作上的一个简单演示,第二季令人期待一些 ~

时间: 2024-10-29 00:36:37

Metasploit 一些重要模块使用介绍的相关文章

OR1200处理器的计时器模块TT介绍

以下内容摘自<步步惊芯--软核处理器内部设计分析>一书 16.2.1 TT介绍 计时器模块(Tick Timer:TT)一般用在操作系统的进程调度.用户程序的定时参考等.TT内部会对时钟周期计数,当计数值达到一个预设值时,会产生中断,通知处理器进行处理.其实现的主体是两个特殊寄存器:计时器单元计数寄存器TTCR.计时器单元模式寄存器TTMR,通过这两个SPR的不同配置,实现不同的工作模式,以及计时中断的产生.TTCR.TTMR是第10组特殊寄存器,如表16.4所示.TTCR.TTMR的格式分别

Python3 基础 —— 模块 Module 介绍

1.模块的作用 在交互模式下输出的变量和函数定义,一旦终端重启后,这些定义就都不存在了,为了持久保存这些变量.函数等的定义,Python中引入了模块(Module)的概念.一个Python模块其实就是一个脚本文件,具有后缀".py",例如 hello.py 就是一个模块文件名,和普通文件一样可以被永久保存在本地存储磁盘中. 2.模块的内容 Python模块中存放的是一些程序代码,例如,变量定义.函数定义或是代码语句.下面是hello.py模块的内容,其中有一个变量 a,一个函数 fun

ERC功能模块特点介绍

ERC功能模块特点介绍 客户管理 客户自定义多级分组和等级管理首创的业务大厅协同工作处理中心首创的员工工作日记和业务跟踪管理通过客户服务中心协同各部门作业 销售管理 首创的订单处理中心和看板管理功能产销需求中心自动跟踪订单的执行适应加工型企业的特殊产销模式支持POS机开单和多仓库开单功能彻底解决开单与发货不在同一地点 采购管理 首创的采购处理中心,提供看板管理供应商客户自定义多级分组分等级在线解决采购和收货不在同一地点支持多种灵活的委外加工模式通过物料台账有效管理外加工物料 库存管理 彻底解决各

Winform开发框架中的内容及文档管理模块功能介绍

在开发项目的时候,我们有一些场景需要编辑一些HTML文档,作为内容发布系统的一部分,有时候也需要对一些文档如WORD文档进行编辑管理,这样需要我们对这些内容及文档进行合适的管理.本文主要介绍在WInform项目中利用ZetaHtmlEditControl进行HTML内容管理,以及利用TX TextControl控件进行WORD文档管理,这两方面都是我们一般进行内容和文档管理所必须的. 1.内容及文档管理模块功能介绍 整个模块,支持WInform框架和混合式开发框架两种模式,都是基于WInform

Metasploit自动攻击模块

Metasploit自动攻击模块 环境:kali-linux-2017.3-vm-amd64 一.安装postgresql数据库 apt-get install postgresql apt-get install rubygems libpq-dev apt-get install libreadline-dev apt-get install libssl-dev apt-get install libpq5 apt-get install ruby-dev apt-get install

100G光模块的介绍

随着光通信行业的快速发展,用户需求的增大,早期低速率的光模块已经慢慢不能满用户的传输需求.在这样的情况之下,100G光模块市场成为了市场的焦点.100G光模块在这几年来凭借高速率和高性价而成为市场的霸主.这是一款怎样的光模块?100G QSFP28SR4光模块怎么样?好不好? 一.100G光模块的介绍 100G光模块是为了适应网络市场由10G逐渐向40G.100G发展的趋势而诞生的光模块产物,传输速率为100G,在构建100G网络系统中发挥了至关重要的作用. 二.100G光模块的技术发展 与2.

单纤双向BIDI光模块的介绍

单纤双向光模块的含义 BIDI光模块是一款使用WDM(波分复用)双向传输技术的光模块,实现了在一根光纤上同时进行光通道内的双向传输.和常规光模块(有两个光纤插孔)不同的是,BIDI光模块只有一个插孔,它通过整合的双向耦合器在一根光缆上进行信号的发射与接收. BIDI光模块的工作原理 BIDI光模块和传统双纤双向光模块的主要区别在于,BIDI光模块配备了波分复用(WDM)耦合器,也就是双工器,根据波长 的不同将在一根光纤上传输的数据进行汇合和分离.正因如此,BIDI光模块也被认为是WDM光模块.

jieba模块基本介绍

一.jieba模块基本介绍 1.1 jieba模块的作用 jieba是优秀的第三方中文词库 中文分词(Chinese Word Segmentation) 指的是将一个汉字序列切分成一个一个单独的词.分词就是将连续的字序列按照一定的规范重新组合成词序列的过程 1.2 jieba模块的安装 pip install jieba #cmd命令行 二.jieba库的使用说明 2.1 jieba分词的三种模式 精确模式:将句子最精确的分开,适合文本分析(无冗余) 全模式:句子中所有可以成词的词语都扫描出来

re模块详细介绍

\w 匹配字母.数字及下划线\W 匹配非字母.数字及下划线\s 匹配任意空白字符\S 匹配任意非空白字符\d 匹配任意数字,等价于[0-9]\D 匹配任意非数字\A 匹配字符串开始\Z 匹配字符串结束\n 匹配一个换行符\t 匹配一个制表符^ 匹配字符串的开头$ 匹配字符串的结尾. 匹配任意字符,除了换行符,当re.DOTALL标记被指定时,则可以匹配包括换行符的任意字符.[...] 用来表示一组字符,单独列出:[amk]匹配'a'或'm'或'k'[^...]不在[]中的字符:[^amk]匹配除