让c站的用户get请求b站【github】,然后b站将参数提交给a站,这里顺便加密一下a站网址。
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Domain Encryption Example</title></head><body> <h1>Domain Encryption Example</h1> <!-- Hidden input field to store encrypted domain --> <input type="hidden" id="encryptedDomain">
<script> // Function to encrypt domain name function encryptDomain(domain) { // Example: Simple substitution cipher var encryptedDomain = ""; for (var i = 0; i < domain.length; i++) { // Replace each character with its ASCII code plus 1 encryptedDomain += String.fromCharCode(domain.charCodeAt(i) + 1); } return encryptedDomain; }
// Function to decrypt domain name function decryptDomain(encryptedDomain) { // Example: Simple substitution cipher var decryptedDomain = ""; for (var i = 0; i < encryptedDomain.length; i++) { // Replace each character with its ASCII code minus 1 decryptedDomain += String.fromCharCode(encryptedDomain.charCodeAt(i) - 1); } return decryptedDomain; }
// Original domain name var originalDomain = "https://example.com/submit.php";
// Encrypt the domain var encryptedDomain = encryptDomain(originalDomain);
// Store the encrypted domain in hidden input field document.getElementById("encryptedDomain").value = encryptedDomain; // Decrypt the domain var decryptedDomain = decryptDomain(encryptedDomain);
// Construct the POST request data var postData = "param1=value1¶m2=value2"; // Modify this with your actual POST data
// Send the POST request to the server var xhr = new XMLHttpRequest(); xhr.open("POST", decryptedDomain, true); // Modify the URL here xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { console.log("Response from server:", xhr.responseText); } }; xhr.send(postData); </script></body></html>
理论可以防止部分人,加密解密算法都在里面,可以自己修改。
别忘记将a的响应结果 提交给c
网络管理论坛资源网申明
本站资源均是网友分享,若有侵权,请联系管理员删除!