Cross-domain: Use JSONP and WebSocket to achieve cross-domain access

Cross-domain basic knowledge points: Cross-domain knowledge points Four ways for iframe to achieve cross-domain: Four ways for iframe to achieve cross-domain Note: The virtual host used in this article is also configured in the iframe above. Table of Contents JSONP cross domain Introduction to JSONP Cross-domain experiments: WebSocket cross domain Introduction to websockets Cross-domain experiments […]

Solution to the mismatch between the field name in the JSON string and the field name in the Java class (use of @JsonProperty(“”) and @JSONField(name = “”))

1.1 Background 1.1.1 The so-called background, that is, what is the purpose and reason for writing this blog? Recently, I encountered a very strange requirement at work. I used WebService to adjust a third-party interface, but the return value of the third-party interface was an Xml structure. It was not surprising at first. But then […]

Passive scanning jsonp recognition based on Yak

Author: @shangzeng master What is JSONP hijacking vulnerability Websites with different domain names cannot transmit data due to the same origin policy (same protocol, same domain name, same port), but at some point we need to transmit data across domains. At this time, jsonp was born as one of the cross-domain methods. Because the three […]

Use of jsonp and jsonpcallback

1. jsonp, jsonpCallback Two parameters that can be customized when jsonp cross-domain 2. jsonp: The parameter name of the callback function name, the default callback, the server uses it to obtain the callback function name 3. jsonpCallback: Return the function name, automatically generated by jquery by default 4. When specifying jsonpCallback, you can write the […]

04_01_Ajax+HTTP04_Cross-domain and JSONP

Original policy and cross-domain Same origin: If the protocol, domain name and port of two pages are the same, then the two pages have the same origin. Same origin policy Same origin policy (English full name Same origin policy) is a security feature provided by browsers. The concept given by MDN official: The same-origin policy […]

jmeterbeanshell calls jsonpath to get the corresponding value

1.jmeter creates new thread group, Java Request, BeanShell Assertion, View Results Tree 2. Paste the code in BeanShell Assertion: import org.apache.jmeter.extractor.json.jsonpath.JSONManager; import java.util.List; JSONManager js= new JSONManager(); String jsonString=”{“timeStamp”:1695348189596,”code”:200,”dataVersion”:”20230922100309″, “x-amz-meta-dv”:1695348189000,”dataFreshVersion”:”20230922100309″,”message”:\ “success”,”body”:{“ABTEST_MODULE”:{“engines”:”http://10.0. 0.01/hwtestdatavo/jsYpdz/1/1.txt”,”ruleList”:null,”engineJs”:[{“bakUrl”: “http://10.0.0.01/hwtestdatavo/4c60/f0/audio-video-server_runtime.ff752e23.bundle.js”,”checkType”:null,” iosEndPrdVersion”:-1,”module”:”ABTEST_MODULE”,”fileMd5″:”a688e9a35a295c3cf57c7bf772f05eb2″,\ “version”:”20230906203310″,”url”:”http://10.0.0.01/hwtestdatavo/4c60/f0/audio-video -server_runtime.ff752e23.bundle.js”,”iosStartPrdVersion”:222,”name”:”Test refresh cache 999″,\ “adStartPrdVersion”:111,”id”:”JS38DDD67ADB704B569C56B5D8EE14D2″,”judge”:”client”, “adEndPrdVersion”:-1},{“bakUrl”:”http://10.0.0.01/hwtestdatavo/65b0/53/audio-video-server_encodeabmodulejs.js “,”checkType”:null,”iosEndPrdVersion”:-1,”module”:”ABTEST_MODULE”, “fileMd5″:”c503027770575b3ffd991f4544bf341f”,”version”:”20230904172153″,”url”: “http://10.0.0.01/hwtestdatavo/65b0/53/audio-video-server_encodeabmodulejs.js”,”iosStartPrdVersion”:111,”name\\ “:”Test refresh cache 01″,”adStartPrdVersion”:111,”id”:”JS50CB87BEA16B4E7EB038FA36A5291C”,\\ “judge”:”client”,”adEndPrdVersion”:-1},{“bakUrl”:”http:// 10.0.0.01/hwtestdatavo/65b0/53/audio-video-server_encodeabmodulejs.js”,”checkType”:null,”iosEndPrdVersion”:-1,\\ “module”:”ABTEST_MODULE”,”fileMd5″:”c503027770575b3ffd991f4544bf341f”,”version”:\\ “20230904153857”,”url”:”http://10.0.0.01/hwtestdatavo/65b0/53/audio-video-server_encodeabmodulejs.js”,\\ “iosStartPrdVersion”:111111111,”name”:”Test refresh cache”,”adStartPrdVersion”:111111111,”id\ […]

python interface automation 38-jsonpath extracts interface return value

Foreword The json data returned by the interface needs to be asserted after taking the value. This article uses jsonpath to extract the data returned by the interface. Interface returns data The interface returns a json type data. The following data is a very common data structure. { “code”: 0, “msg”: “success!”, “data”: [{ “id”: […]

Vue GET POST JSONP request data

There are many ways for Vue to request data: officially provided modules, Such as: vue-resource, axios, fetch-jsonp. GitHub official website (https://github.com) search: vue-resource If you do not write package.json, the project will be packaged and sent to others, and others will not be able to use it; Place the obtained data into a list: Traverse […]

Ajax usage principle Cross-domain JSONP

1. What is Ajax? Ajax, also called asynchronous js or xml, is a communication technology between the browser and the server. It can send HTTP requests to the server to obtain data without refreshing the web page. 2. Advantages and disadvantages of using Ajax Advantages: Requesting data without refreshing the page, allowing users to partially […]

Same-origin policy and cross-domain solutions – JSONP, CORS, proxy cross-domain – vue-cli scaffolding to build a proxy server

Cross-domain means that the browser cannot execute scripts from other websites. It is caused by the browser’s same-origin policy, which is a security restriction implemented by the browser on JavaScript. To understand why cross-domain, we need to know what the same-origin policy is 1. Same origin strategy Same source: If the protocol, domain name and […]