Tag:utilize

  • Dry goods | play with data-driven testing framework with pytest

    Time:2022-7-20

    What is the pytest architecture? First, let’s take a look at an example of pytest: def test_a(): print(123) collected 1 item test_a.py . [100%] ============ 1 passed in 0.02s ======================= The output result is simple: one test case is collected and the test case is executed successfully.At this point, consider two questions:1. How does pytest […]

  • Vulnhub-DarkHole_2-Writeup

    Time:2022-7-2

    Vulnhub-DarkHole_2-Writeup Target address:DARKHOLE: 2 Difficulty: Hard Target discovery and exploration usearp-scanDiscover target IP arp-scan -l usenmapScan open ports nmap -sV -p- 192.168.164.194 Open the target port 80 and find nothing. It’s nothing to check the source code. There is only one login connection We click on the login page I thought it might be SQL […]

  • CSS:: marker makes text numbers more interesting

    Time:2022-6-29

    This article will introduce an interesting pseudo element in CSS::marker, using it, we can make our text serial number more interesting! What is:: marker CSS pseudo element::markerIs fromCSS Pseudo-Elements Level 3Start adding,CSS Pseudo-Elements Level 4A relatively new pseudo element, which has been supported by browsers since chrome 86+. With it, we can add a pseudo […]

  • Vue / keep-alive

    Time:2022-6-22

    Keep alive is an abstract component provided by Vue. It is used to cache components to save performance. As it is an abstract component, it will not be rendered as a DOM element after the V page is rendered <keep-alive> <loading></loading> </keep-laive> When a component is switched in keep aliveactivated、deactivatedThese two lifecycle hook functions will […]

  • Red sun range VII – WP

    Time:2022-6-6

    Range topology 1、 Internet Management 1.1 information collection External network IP172.16.10.234Collect information and use toolsKmapDetect the opening of the port. The command is as follows: ./Kmap -i 172.16.10.234 -p 1-65535 -o kk.txt -n 20 81Port openLaravelServices,6379Port openRedisServices. edition8.29.0<8.4.3, there is a remote code execution vulnerability. useFscanConduct vulnerability scanning and find that there areRedisUnauthorized vulnerability: 2、 […]

  • JQuery pit of attr() of prop() in the project

    Time:2022-6-1

    It’s a shame to say that in the era of react, I am still using jQuery in University projects. When I was a freshman, I was deeply influenced by the sharp jQuery. I always thought that jQuery was a specialNiubilityFramework for. Of course! This is just a joke. Restricted by the project, I still have […]

  • Skillfully using blur to realize visual 3D effect

    Time:2022-4-28

    This paper will introduce the skills of skillfully using blur to realize visual 3D effect. We all know that in normal visual effects, the closer we are, the clearer we usually see, while the farther away we are, the less clear we are~ We can useclearAndvagueTwo states are used to construct parallax effect. Like this: […]

  • Several ways of array de duplication

    Time:2022-4-25

    1. Double layer for loop is used to realize array de duplication let arr = [1,2,3,4,3,2,3,5]; let unique = (arr)=>{ //The first layer is the previous item of the for loop array for(var i=0; i<arr.length; i++){ //The second layer is the last item of the for loop array for(var j=i+1; j<arr.length; j++){ if(arr[i] === arr[j]){ […]

  • Array de duplication

    Time:2022-4-24

    Common methods of array de duplication1. Use the new method of ES6 to remove the duplicateThe set () object allows you to store unique values of any type, whether original values or object references; The value stored in the set object is always unique, so you need to judge whether the two values are identical. […]

  • Several methods for Linux shell to judge whether a variable contains a string

    Time:2022-4-19

    Method 1: usegreplookup strA=”long string” strB=”string” result=$(echo $strA | grep “${strB}”) if [[ “$result” != “” ]] then Echo “contains” else Echo “not included” fi Print length firstcharacter stringThen grep looks up the string to be searched in the long string, and records the result with the variable result. If the result is not empty, […]

  • The strangest hooks: useimperativehandle

    Time:2022-3-22

    I guess they are familiar with these hooks:useState, useEffect, useContext, useMemo。 But when I first sawuseImperativeHandleWhen I was young, I looked confused (what the hell is this ~ ~ ~). 1、 What is it? React official websiteuseImperativeHandleThe introduction is also relatively brief. To sum up:Sub component utilizationuseImperativeHandleYou can let the parent component output arbitrary data。 […]

  • Implementation of spring boot parameter alias

    Time:2022-3-19

    Implementation of spring boot parameter alias Started on Dale’s blog Background and pain points There is often a situation in the project: after setting a parameter, the front end requires to change the parameter name, and you don’t want to change the elegance of the code because of this name, so you need to have […]