如何使用sr2t將你的安全掃描報告轉換為表格格式

關于sr2t

sr2t是一款針對安全掃描報告的格式轉換工具,全稱為“Scanning reports to tabular”,該工具可以獲取掃描工具的輸出文件,并將文件數據轉換為表格格式,例如CSV、XLSX或文本表格等,能夠為廣大研究人員提供一個可讀的表格格式數據。

功能介紹

當前版本的sr2t支持處理下列工具生成的安全掃描報告:

1、Nmap (XML);

2、Nessus (XML);

3、Nikto (XML);

4、Dirble (XML);

5、Testssl (JSON);

6、Fortify (FPR);

工具依賴

1、argparse (dev-python/argparse);

2、prettytable (dev-python/prettytable);

3、python (dev-lang/python);

4、xlsxwriter (dev-python/xlsxwriter);

工具安裝

由于該工具基于Python 3開發,因此我們首先需要在本地設備上安裝并配置好最新版本的Python 3環境。

接下來,廣大研究人員可以直接使用pip命令下載并安裝sr2t:

pip install --user sr2t

或者使用下列命令將該項目源碼直接克隆至本地:

git clone https://gitlab.com/0bs1d1an/sr2t.git

工具使用

我們可以通過一下兩種方式來使用sr2t,如果我們以代碼包的形式安裝sr2t,則可以直接調用安裝腳本:

sr2t --help

或者從項目目錄調用工具腳本:

python -m src.sr2t --help

工具幫助信息

$ sr2t --helpusage: sr2t [-h] [--nessus NESSUS [NESSUS ...]] [--nmap NMAP [NMAP ...]][--nikto NIKTO [NIKTO ...]] [--dirble DIRBLE [DIRBLE ...]][--testssl TESTSSL [TESTSSL ...]][--fortify FORTIFY [FORTIFY ...]] [--nmap-state NMAP_STATE][--nmap-services] [--no-nessus-autoclassify][--nessus-autoclassify-file NESSUS_AUTOCLASSIFY_FILE][--nessus-tls-file NESSUS_TLS_FILE][--nessus-x509-file NESSUS_X509_FILE][--nessus-http-file NESSUS_HTTP_FILE][--nessus-smb-file NESSUS_SMB_FILE][--nessus-rdp-file NESSUS_RDP_FILE][--nessus-ssh-file NESSUS_SSH_FILE][--nessus-min-severity NESSUS_MIN_SEVERITY][--nessus-plugin-name-width NESSUS_PLUGIN_NAME_WIDTH][--nessus-sort-by NESSUS_SORT_BY][--nikto-description-width NIKTO_DESCRIPTION_WIDTH][--fortify-details] [--annotation-width ANNOTATION_WIDTH][-oC OUTPUT_CSV] [-oT OUTPUT_TXT] [-oX OUTPUT_XLSX][-oA OUTPUT_ALL]Converting scanning reports to a tabular formatoptional arguments:-h, --help ????????????????????顯示工具幫助信息和退出--nmap-state NMAP_STATE????指定過濾器的狀態,例如open、filtered--nmap-services ?????????????指定服務補充列表--no-nessus-autoclassify??????不對Nessus結果執行自動分類--nessus-autoclassify-file NESSUS_AUTOCLASSIFY_FILE指定覆蓋一個自定義Nessus自動分類YAML文件--nessus-tls-file NESSUS_TLS_FILE指定覆蓋一個自定義Nessus TLS YAML文件--nessus-x509-file NESSUS_X509_FILE指定覆蓋一個自定義Nessus X.509?YAML文件--nessus-http-file NESSUS_HTTP_FILE指定覆蓋一個自定義Nessus HTTP?YAML文件--nessus-smb-file NESSUS_SMB_FILE指定覆蓋一個自定義Nessus SMB YAML文件--nessus-rdp-file NESSUS_RDP_FILE指定覆蓋一個自定義Nessus RDP YAML文件--nessus-ssh-file NESSUS_SSH_FILE指定覆蓋一個自定義Nessus SSH YAML文件--nessus-min-severity NESSUS_MIN_SEVERITY指定輸出的最低嚴重等級,例如1--nessus-plugin-name-width NESSUS_PLUGIN_NAME_WIDTH指定pluginid列的寬度,例如30--nessus-sort-by NESSUS_SORT_BY指定輸出按照ip-address, port, plugin-id,plugin-name或severity排序--nikto-description-width NIKTO_DESCRIPTION_WIDTH指定description列的寬度,例如30--fortify-details ????????指定包含Fortify摘要、解釋和針對每個漏洞的建議--annotation-width ANNOTATION_WIDTH指定annotation列的寬度,例如30-oC OUTPUT_CSV, --output-csv OUTPUT_CSV指定輸出CSV名稱,例如output-oT OUTPUT_TXT, --output-txt OUTPUT_TXT指定輸出TXT文件,例如output.txt-oX OUTPUT_XLSX, --output-xlsx OUTPUT_XLSX指定輸出XLSX文件,例如output.xlsx-oA OUTPUT_ALL, --output-all OUTPUT_ALL指定輸出全部格式的輸出基礎文件名,例如outputspecify at least one:--nessus NESSUS [NESSUS ...]指定(多個)Nessus XML文件--nmap NMAP [NMAP ...]指定(多個)Nmap XML文件--nikto NIKTO [NIKTO ...]指定(多個)Nikto XML文件--dirble DIRBLE [DIRBLE ...]指定(多個)Dirble XML文件--testssl TESTSSL [TESTSSL ...]指定(多個)Testssl JSON文件--fortify FORTIFY [FORTIFY ...]指定(多個)HP Fortify FPR文件

工具使用樣例

Nessus

$ sr2t --nessus example/nessus.nessus --no-nessus-autoclassify -oX example.xlsx

生成文本表格至stdout:

$ sr2t --nessus example/nessus.nessus+---------------+-------+-----------+-----------------------------------------------------------------------------+----------+-------------+| ??????host ???| ?port | plugin id | ????????????????????????????????plugin name ????????????????????????????????| severity | annotations |+---------------+-------+-----------+-----------------------------------------------------------------------------+----------+-------------+| 192.168.142.4 | 3389 ?| ??42873 ??| SSL Medium Strength Cipher Suites Supported (SWEET32) ??????????????????????| ???2 ????| ?????X ?????|| 192.168.142.4 | 443 ??| ??42873 ??| SSL Medium Strength Cipher Suites Supported (SWEET32) ??????????????????????| ???2 ????| ?????X ?????|| 192.168.142.4 | 3389 ?| ??18405 ??| Microsoft Windows Remote Desktop Protocol Server Man-in-the-Middle Weakness | ???2 ????| ?????X ?????|| 192.168.142.4 | 3389 ?| ??30218 ??| Terminal Services Encryption Level is not FIPS-140 Compliant ???????????????| ???1 ????| ?????X ?????|| 192.168.142.4 | 3389 ?| ??57690 ??| Terminal Services Encryption Level is Medium or Low ????????????????????????| ???2 ????| ?????X ?????|| 192.168.142.4 | 3389 ?| ??58453 ??| Terminal Services Doesn't Use Network Level Authentication (NLA) Only ??????| ???2 ????| ?????X ?????|| 192.168.142.4 | 3389 ?| ??45411 ??| SSL Certificate with Wrong Hostname ????????????????????????????????????????| ???2 ????| ?????X ?????|| 192.168.142.4 | 443 ??| ??45411 ??| SSL Certificate with Wrong Hostname ????????????????????????????????????????| ???2 ????| ?????X ?????|| 192.168.142.4 | 3389 ?| ??35291 ??| SSL Certificate Signed Using Weak Hashing Algorithm ????????????????????????| ???2 ????| ?????X ?????|| 192.168.142.4 | 3389 ?| ??57582 ??| SSL Self-Signed Certificate ????????????????????????????????????????????????| ???2 ????| ?????X ?????|| 192.168.142.4 | 3389 ?| ??51192 ??| SSL Certificate Cannot Be Trusted ??????????????????????????????????????????| ???2 ????| ?????X ?????|| 192.168.142.2 | 3389 ?| ??42873 ??| SSL Medium Strength Cipher Suites Supported (SWEET32) ??????????????????????| ???2 ????| ?????X ?????|| 192.168.142.2 | 443 ??| ??42873 ??| SSL Medium Strength Cipher Suites Supported (SWEET32) ??????????????????????| ???2 ????| ?????X ?????|| 192.168.142.2 | 3389 ?| ??18405 ??| Microsoft Windows Remote Desktop Protocol Server Man-in-the-Middle Weakness | ???2 ????| ?????X ?????|| 192.168.142.2 | 3389 ?| ??30218 ??| Terminal Services Encryption Level is not FIPS-140 Compliant ???????????????| ???1 ????| ?????X ?????|| 192.168.142.2 | 3389 ?| ??57690 ??| Terminal Services Encryption Level is Medium or Low ????????????????????????| ???2 ????| ?????X ?????|| 192.168.142.2 | 3389 ?| ??58453 ??| Terminal Services Doesn't Use Network Level Authentication (NLA) Only ??????| ???2 ????| ?????X ?????|| 192.168.142.2 | 3389 ?| ??45411 ??| SSL Certificate with Wrong Hostname ????????????????????????????????????????| ???2 ????| ?????X ?????|| 192.168.142.2 | 443 ??| ??45411 ??| SSL Certificate with Wrong Hostname ????????????????????????????????????????| ???2 ????| ?????X ?????|| 192.168.142.2 | 3389 ?| ??35291 ??| SSL Certificate Signed Using Weak Hashing Algorithm ????????????????????????| ???2 ????| ?????X ?????|| 192.168.142.2 | 3389 ?| ??57582 ??| SSL Self-Signed Certificate ????????????????????????????????????????????????| ???2 ????| ?????X ?????|| 192.168.142.2 | 3389 ?| ??51192 ??| SSL Certificate Cannot Be Trusted ??????????????????????????????????????????| ???2 ????| ?????X ?????|| 192.168.142.2 | 445 ??| ??57608 ??| SMB Signing not required ???????????????????????????????????????????????????| ???2 ????| ?????X ?????|+---------------+-------+-----------+-----------------------------------------------------------------------------+----------+-------------+

輸出至CSV文件:

$ sr2t --nessus example/nessus.nessus -oC example$ cat example_nessus.csvhost,port,plugin id,plugin name,severity,annotations192.168.142.4,3389,42873,SSL Medium Strength Cipher Suites Supported (SWEET32),2,X192.168.142.4,443,42873,SSL Medium Strength Cipher Suites Supported (SWEET32),2,X192.168.142.4,3389,18405,Microsoft Windows Remote Desktop Protocol Server Man-in-the-Middle Weakness,2,X192.168.142.4,3389,30218,Terminal Services Encryption Level is not FIPS-140 Compliant,1,X192.168.142.4,3389,57690,Terminal Services Encryption Level is Medium or Low,2,X192.168.142.4,3389,58453,Terminal Services Doesn't Use Network Level Authentication (NLA) Only,2,X192.168.142.4,3389,45411,SSL Certificate with Wrong Hostname,2,X192.168.142.4,443,45411,SSL Certificate with Wrong Hostname,2,X192.168.142.4,3389,35291,SSL Certificate Signed Using Weak Hashing Algorithm,2,X192.168.142.4,3389,57582,SSL Self-Signed Certificate,2,X192.168.142.4,3389,51192,SSL Certificate Cannot Be Trusted,2,X192.168.142.2,3389,42873,SSL Medium Strength Cipher Suites Supported (SWEET32),2,X192.168.142.2,443,42873,SSL Medium Strength Cipher Suites Supported (SWEET32),2,X192.168.142.2,3389,18405,Microsoft Windows Remote Desktop Protocol Server Man-in-the-Middle Weakness,2,X192.168.142.2,3389,30218,Terminal Services Encryption Level is not FIPS-140 Compliant,1,X192.168.142.2,3389,57690,Terminal Services Encryption Level is Medium or Low,2,X192.168.142.2,3389,58453,Terminal Services Doesn't Use Network Level Authentication (NLA) Only,2,X192.168.142.2,3389,45411,SSL Certificate with Wrong Hostname,2,X192.168.142.2,443,45411,SSL Certificate with Wrong Hostname,2,X192.168.142.2,3389,35291,SSL Certificate Signed Using Weak Hashing Algorithm,2,X192.168.142.2,3389,57582,SSL Self-Signed Certificate,2,X192.168.142.2,3389,51192,SSL Certificate Cannot Be Trusted,2,X192.168.142.2,445,57608,SMB Signing not required,2,X

Nmap

$ sr2t --nmap example/nmap.xml -oX example.xlsx

生成文本表格至stdout:

$ sr2t --nmap example/nmap.xml --nmap-servicesNmap TCP:+-----------------+----+----+----+-----+-----+-----+-----+------+------+------+| ????????????????| 53 | 80 | 88 | 135 | 139 | 389 | 445 | 3389 | 5800 | 5900 |+-----------------+----+----+----+-----+-----+-----+-----+------+------+------+| 192.168.23.78 ??| X ?| ???| X ?| ?X ?| ?X ?| ?X ?| ?X ?| ?X ??| ?????| ?????|| 192.168.27.243 ?| ???| ???| ???| ?X ?| ?X ?| ????| ?X ?| ?X ??| ?X ??| ?X ??|| 192.168.99.164 ?| ???| ???| ???| ?X ?| ?X ?| ????| ?X ?| ?X ??| ?X ??| ?X ??|| 192.168.228.211 | ???| X ?| ???| ????| ????| ????| ????| ?????| ?????| ?????|| 192.168.171.74 ?| ???| ???| ???| ?X ?| ?X ?| ????| ?X ?| ?X ??| ?X ??| ?X ??|+-----------------+----+----+----+-----+-----+-----+-----+------+------+------+Nmap Services:+-----------------+------+-------+---------------+-------+| ip address ?????| port | proto | service ??????| state |+-----------------+------+-------+---------------+-------+| 192.168.23.78 ??| 53 ??| tcp ??| domain ???????| open ?|| 192.168.23.78 ??| 88 ??| tcp ??| kerberos-sec ?| open ?|| 192.168.23.78 ??| 135 ?| tcp ??| msrpc ????????| open ?|| 192.168.23.78 ??| 139 ?| tcp ??| netbios-ssn ??| open ?|| 192.168.23.78 ??| 389 ?| tcp ??| ldap ?????????| open ?|| 192.168.23.78 ??| 445 ?| tcp ??| microsoft-ds ?| open ?|| 192.168.23.78 ??| 3389 | tcp ??| ms-wbt-server | open ?|| 192.168.27.243 ?| 135 ?| tcp ??| msrpc ????????| open ?|| 192.168.27.243 ?| 139 ?| tcp ??| netbios-ssn ??| open ?|| 192.168.27.243 ?| 445 ?| tcp ??| microsoft-ds ?| open ?|| 192.168.27.243 ?| 3389 | tcp ??| ms-wbt-server | open ?|| 192.168.27.243 ?| 5800 | tcp ??| vnc-http ?????| open ?|| 192.168.27.243 ?| 5900 | tcp ??| vnc ??????????| open ?|| 192.168.99.164 ?| 135 ?| tcp ??| msrpc ????????| open ?|| 192.168.99.164 ?| 139 ?| tcp ??| netbios-ssn ??| open ?|| 192.168.99.164 ?| 445 ?| tcp ??| microsoft-ds ?| open ?|| 192.168.99.164 ?| 3389 | tcp ??| ms-wbt-server | open ?|| 192.168.99.164 ?| 5800 | tcp ??| vnc-http ?????| open ?|| 192.168.99.164 ?| 5900 | tcp ??| vnc ??????????| open ?|| 192.168.228.211 | 80 ??| tcp ??| http ?????????| open ?|| 192.168.171.74 ?| 135 ?| tcp ??| msrpc ????????| open ?|| 192.168.171.74 ?| 139 ?| tcp ??| netbios-ssn ??| open ?|| 192.168.171.74 ?| 445 ?| tcp ??| microsoft-ds ?| open ?|| 192.168.171.74 ?| 3389 | tcp ??| ms-wbt-server | open ?|| 192.168.171.74 ?| 5800 | tcp ??| vnc-http ?????| open ?|| 192.168.171.74 ?| 5900 | tcp ??| vnc ??????????| open ?|+-----------------+------+-------+---------------+-------+

輸出至CSV文件:

$ sr2t --nmap example/nmap.xml -oC example$ cat example_nmap_tcp.csvip address,53,80,88,135,139,389,445,3389,5800,5900192.168.23.78,X,,X,X,X,X,X,X,,192.168.27.243,,,,X,X,,X,X,X,X192.168.99.164,,,,X,X,,X,X,X,X192.168.228.211,,X,,,,,,,,192.168.171.74,,,,X,X,,X,X,X,X

Nikto

$ sr2t --nikto example/nikto.xml -oX example/nikto.xlsx

生成文本表格至stdout:

$ sr2t --nikto example/nikto.xml+----------------+-----------------+-------------+----------------------------------------------------------------------------------+-------------+| target ip ?????| target hostname | target port | description ?????????????????????????????????????????????????????????????????????| annotations |+----------------+-----------------+-------------+----------------------------------------------------------------------------------+-------------+| 192.168.178.10 | 192.168.178.10 ?| 80 ?????????| The anti-clickjacking X-Frame-Options header is not present. ????????????????????| ?????X ?????|| 192.168.178.10 | 192.168.178.10 ?| 80 ?????????| The X-XSS-Protection header is not defined. This header can hint to the user ????| ?????X ?????|| ???????????????| ????????????????| ????????????| agent to protect against some forms of XSS ??????????????????????????????????????| ????????????|| 192.168.178.10 | 192.168.178.10 ?| 80 ?????????| The X-Content-Type-Options header is not set. This could allow the user agent to | ?????X ?????|| ???????????????| ????????????????| ????????????| render the content of the site in a different fashion to the MIME type ??????????| ????????????|+----------------+-----------------+-------------+----------------------------------------------------------------------------------+-------------+

輸出至CSV文件:

$ sr2t --nikto example/nikto.xml -oC example$ cat example_nikto.csvtarget ip,target hostname,target port,description,annotations192.168.178.10,192.168.178.10,80,The anti-clickjacking X-Frame-Options header is not present.,X192.168.178.10,192.168.178.10,80,"The X-XSS-Protection header is not defined. This header can hint to the useragent to protect against some forms of XSS",X192.168.178.10,192.168.178.10,80,"The X-Content-Type-Options header is not set. This could allow the user agent torender the content of the site in a different fashion to the MIME type",X

Drible

$ sr2t --dirble example/dirble.xml -oX example.xlsx

生成文本表格至stdout:

$ sr2t --dirble example/dirble.xml+-----------------------------------+------+-------------+--------------+-------------+---------------------+--------------+-------------+| url ??????????????????????????????| code | content len | is directory | is listable | found from listable | redirect url | annotations |+-----------------------------------+------+-------------+--------------+-------------+---------------------+--------------+-------------+| http://example.org/flv ???????????| 0 ???| 0 ??????????| false ???????| false ??????| false ??????????????| ?????????????| ?????X ?????|| http://example.org/hire ??????????| 0 ???| 0 ??????????| false ???????| false ??????| false ??????????????| ?????????????| ?????X ?????|| http://example.org/phpSQLiteAdmin | 0 ???| 0 ??????????| false ???????| false ??????| false ??????????????| ?????????????| ?????X ?????|| http://example.org/print_order ???| 0 ???| 0 ??????????| false ???????| false ??????| false ??????????????| ?????????????| ?????X ?????|| http://example.org/putty ?????????| 0 ???| 0 ??????????| false ???????| false ??????| false ??????????????| ?????????????| ?????X ?????|| http://example.org/receipts ??????| 0 ???| 0 ??????????| false ???????| false ??????| false ??????????????| ?????????????| ?????X ?????|+-----------------------------------+------+-------------+--------------+-------------+---------------------+--------------+-------------+

輸出至CSV文件:

$ sr2t --dirble example/dirble.xml -oC example$ cat example_dirble.csvurl,code,content len,is directory,is listable,found from listable,redirect url,annotationshttp://example.org/flv,0,0,false,false,false,,Xhttp://example.org/hire,0,0,false,false,false,,Xhttp://example.org/phpSQLiteAdmin,0,0,false,false,false,,Xhttp://example.org/print_order,0,0,false,false,false,,Xhttp://example.org/putty,0,0,false,false,false,,Xhttp://example.org/receipts,0,0,false,false,false,,X

Testssl

$ sr2t --testssl example/testssl.json -oX example.xlsx

生成文本表格至stdout:

$ sr2t --testssl example/testssl.json+-----------------------------------+------+--------+---------+--------+------------+-----+---------+---------+----------+| ip address ???????????????????????| port | BREACH | No HSTS | No PFS | No TLSv1.3 | RC4 | TLSv1.0 | TLSv1.1 | Wildcard |+-----------------------------------+------+--------+---------+--------+------------+-----+---------+---------+----------+| rc4-md5.badssl.com/104.154.89.105 | 443 ?| ??X ???| ???X ???| ??X ???| ????X ?????| ?X ?| ???X ???| ???X ???| ???X ????|+-----------------------------------+------+--------+---------+--------+------------+-----+---------+---------+----------+

輸出至CSV文件:

$ sr2t --testssl example/testssl.json -oC example$ cat example_testssl.csvip address,port,BREACH,No HSTS,No PFS,No TLSv1.3,RC4,TLSv1.0,TLSv1.1,Wildcardrc4-md5.badssl.com/104.154.89.105,443,X,X,X,X,X,X,X,X

Fortify

$ sr2t --fortify example/fortify.fpr -oX example.xlsx

生成文本表格至stdout:

$ sr2t --fortify example/fortify.fpr+--------------------------+-----------------------+-------------------------------+----------+------------+-------------+| ?????????????????????????| ?????????type ????????| ???????????subtype ???????????| severity | confidence | annotations |+--------------------------+-----------------------+-------------------------------+----------+------------+-------------+| example1/web.xml:135:135 | J2EE Misconfiguration | Insecure Transport ???????????| ??3.0 ???| ???5.0 ????| ?????X ?????|| example2/web.xml:150:150 | J2EE Misconfiguration | Insecure Transport ???????????| ??3.0 ???| ???5.0 ????| ?????X ?????|| example3/web.xml:109:109 | J2EE Misconfiguration | Incomplete Error Handling ????| ??3.0 ???| ???5.0 ????| ?????X ?????|| example4/web.xml:108:108 | J2EE Misconfiguration | Incomplete Error Handling ????| ??3.0 ???| ???5.0 ????| ?????X ?????|| example5/web.xml:166:166 | J2EE Misconfiguration | Insecure Transport ???????????| ??3.0 ???| ???5.0 ????| ?????X ?????|| example6/web.xml:2:2 ????| J2EE Misconfiguration | Excessive Session Timeout ????| ??3.0 ???| ???5.0 ????| ?????X ?????|| example7/web.xml:162:162 | J2EE Misconfiguration | Missing Authentication Method | ??3.0 ???| ???5.0 ????| ?????X ?????|+--------------------------+-----------------------+-------------------------------+----------+------------+-------------+

輸出至CSV文件:

$ sr2t --fortify example/fortify.fpr -oC example$ cat example_fortify.csv,type,subtype,severity,confidence,annotationsexample1/web.xml:135:135,J2EE Misconfiguration,Insecure Transport,3.0,5.0,Xexample2/web.xml:150:150,J2EE Misconfiguration,Insecure Transport,3.0,5.0,Xexample3/web.xml:109:109,J2EE Misconfiguration,Incomplete Error Handling,3.0,5.0,Xexample4/web.xml:108:108,J2EE Misconfiguration,Incomplete Error Handling,3.0,5.0,Xexample5/web.xml:166:166,J2EE Misconfiguration,Insecure Transport,3.0,5.0,Xexample6/web.xml:2:2,J2EE Misconfiguration,Excessive Session Timeout,3.0,5.0,Xexample7/web.xml:162:162,J2EE Misconfiguration,Missing Authentication Method,3.0,5.0,X

項目地址

sr2t:【GitLab傳送門】

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/37467.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/37467.shtml
英文地址,請注明出處:http://en.pswp.cn/web/37467.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

軟件接口自動化測試

使用軟件工具工裝治具測試 在當今快速迭代的軟件開發環境中,確保軟件質量與高效交付成為了每個開發團隊的首要任務。軟件接口作為系統之間交互的關鍵橋梁,其穩定性和可靠性直接影響到整個應用生態的性能。因此,軟件接口自動化測試成為了提升…

在 Python 中將字典內容保存到 Excel 文件

目錄: 使用 Pandas 轉 Excel使用 Openpyxl 轉 Excel使用 xlsxwriter 轉 Excel使用 csv 轉 Excel Python 中的字典是一個數據集合,其中每個值對應一個鍵。它們是無序的、可變的,并且對字典中存儲的值和鍵的數據類型沒有限制。Python 程序員經常…

【SpringCloud】Ribbon源碼解析

ribbon是一個負載均衡組件,它可以將請求分散到多個服務提供者實例中,提高系統的性能和可用性。本章分析ribbon是如何實現負載均衡的 1、LoadBalanced 消費者在引入ribbon組件后,給http客戶端添加LoadBalanced注解就能啟用負載均衡功能。Load…

壓縮包怎么解壓,解壓壓縮包不損壞文件

常見格式: ZIP:最常見的壓縮文件格式之一,支持跨平臺。RAR:另一種常見的壓縮文件格式,通常壓縮率比ZIP高,但不如ZIP普及。7Z:來自7-Zip的壓縮格式,支持更高的壓縮率和一些高級特性。…

手機照片數據恢復,2個技巧解決你的疑惑與困擾

手機照片是我們日常生活中記錄美好瞬間的重要工具,然而,當照片存儲量越來越大,以至于手機內存不足時,我們就不得不放棄一部分。照片數據恢復是否還有希望呢?當然啦!本文將為你提供2個實用的技巧&#xff0c…

虛擬機配置與windows之間文件夾共享samba服務:

虛擬機配置與windows之間文件夾共享samba服務: #輸入安裝命令: 第一步: 下載samba cd /etc/ sudo apt-get install samba第二步: 配置用戶 sudo smbpasswd -a 虛擬機用戶名第三步: 進入配置文件配置共享文件 sudo vim /etc/samba/smb.conf末尾輸入以下內容: [s…

經典遞歸題 擴充序列 兩種做法

一道經典遞歸題,兩種做法,常規遞歸做法和模擬數學規律解法 3695. 擴充序列 - AcWing題庫 擴充序列 樣例解釋 對于樣例 1,經過 2 次擴充,得到序列 [1,2,1,3,1,2,1]其第 2 個元素為 2。 對于樣例 2,經過 3次擴充&…

針對airtest的poco標簽正則匹配

1.text屬性方式定位 poco(text“中古屋”) 換成正則表達式定位 poco(textMatches“正則表達式”) poco(textMatches".*中古屋") 2.name屬性方式定位 poco(name‘com.addcn.android.house591:id/grid_item_text’) 換成正則表達式定位 poco(nameMatches“正則表…

Linux下如何設置可執行文件和庫文件的環境變量?

在Linux系統中,可執行文件和庫文件的查找路徑是由環境變量控制的,其中最重要的是PATH環境變量用于可執行文件,而動態庫的查找路徑則由LD_LIBRARY_PATH環境變量決定。下面分別介紹這兩個方面: 可執行文件的搜索路徑(PA…

對不起,AI大模型不是風口

“我們正處在全新起點,這是一個以大模型為核心的人工智能新時代,大模型改變了人工智能,大模型即將改變世界。”——5月26日,百度創始人、董事長兼CEO李彥宏先生在2023中關村論壇發表了《大模型改變世界》演講。 李彥宏指出&#…

【SpringCloud】Hystrix源碼解析

hystrix是一個微服務容錯組件,提供了資源隔離、服務降級、服務熔斷的功能。這一章重點分析hystrix的實現原理 1、服務降級 CAP原則是分布式系統的一個理論基礎,它的三個關鍵屬性分別是一致性、可用性和容錯性。當服務實例所在服務器承受過大的壓力或者受…

c++【入門】挖胡蘿卜

限制 時間限制 : 1 秒 內存限制 : 128 MB 題目 小兔朱迪挖了x個胡蘿卜,狐貍尼克挖到胡蘿卜數量是小兔挖到的3倍,小羊肖恩挖到胡蘿卜的數量比狐貍尼克少8個; 請你編程計算一下狐貍尼克和小羊肖恩分別挖了幾個胡蘿卜,以及平均每…

前端工程化09-webpack靜態的模塊化打包工具(未完結)

9.1、開發模式的進化歷史 webpacks是一個非常非常的強大的一個工具,相應的這個東西的學習也是有一定的難度的,里邊的東西非常的多,里面涉及到的 概念的話也是非常非常的多的。 這個東西既然非常重要,那么在我們前端到底處于怎樣…

HCIA4.26-5.10

OSPF ——開放式最短路徑優先協議 無類別鏈路狀態IGP動態路由協議 距離矢量協議 運行距離矢量協議的路由器會周期性的泛洪自己的路由表,通過路由之間的交互,每臺路由器都從相鄰的路由器學習到路由條目,隨后加載進自己的路由表中。對于網絡…

GD32 開發筆記

0x01 GPIO時鐘使能的坑 使用GD32的GPIO引腳來控制 74HC595 ,發現引腳一直無法控制,始終輸出3.3v,初始化環節應該是出了問題。用通俗的話來說,就是點燈點不亮 排查了MCU、光耦隔離芯片、被強行上拉等問題,最后發現是G…

Python代碼分析和修復工具庫之coala使用詳解

概要 代碼質量在軟件開發中至關重要,保持代碼的可讀性、一致性和易維護性是每個開發者的目標。coala 是一個開源的代碼分析和修復工具,旨在幫助開發者自動化代碼質量檢查,支持多種編程語言,包括 Python、C++、JavaScript 等。通過使用 coala,開發者可以方便地集成代碼檢查…

AI時代的軟件工程:挑戰與改變

人工智能(AI)正以驚人的速度改變著我們的生活和工作方式。作為與AI關系最為密切的領域之一,軟件工程正經歷著深刻的轉變。 1 軟件工程的演變 軟件工程的起源 軟件工程(Software Engineering)是關于如何系統化、規范化地…

input調用手機攝像頭實現拍照功能vue

項目需要一個拍照功能&#xff0c;實現功能如下圖所示:若使用瀏覽器則可以直接上傳圖片&#xff0c;若使用手機則調用手機攝像頭拍照。 1.代碼結構 <!--input標簽--> <input ref"photoRef"type"file"accept"image/*"capture"envir…

Leetcode 3202. Find the Maximum Length of Valid Subsequence II

Leetcode 3202. Find the Maximum Length of Valid Subsequence II 1. 解題思路2. 代碼實現 題目鏈接&#xff1a;3202. Find the Maximum Length of Valid Subsequence II 1. 解題思路 這一題的話是上一題3201. Find the Maximum Length of Valid Subsequence I的升級版&am…

基于多源數據的密碼攻防領域知識圖譜構建

源自&#xff1a; 信息安全與通信保密雜志社 作者&#xff1a;曹增輝 , 郭淵博 , 黃慧敏 摘 要 提高網絡空間安全的密碼攻防能力&#xff0c;需要形成可表示、可共享、可分析的領域知識模式和知識庫。利用自頂向下的構建方法&#xff0c;并通過本體構建方法梳理密碼攻防領域…