DNS rebinding detection

DNS rebinding detection for 479

目前为 2020-04-23 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name DNS rebinding detection
  3. // @namespace http://anend.net
  4. // @version 0.1
  5. // @description DNS rebinding detection for 479
  6. // @author Anend Yan
  7. // @match *
  8. // @grant none
  9. // @require http://code.jquery.com/jquery-3.4.1.min.js
  10. /* globals $ */
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. var url = window.top.document.URL;
  16. var DNS="http://172.20.0.2:18180/host/"
  17. alert(url);
  18. alert(url.slice(url.indexOf("://")+3, url.indexOf(".")));
  19. $.get(DNS+url.slice(url.indexOf("://")+3, url.indexOf(".")), function(data){
  20. alert("ttl: " + data.ttl);
  21. });
  22.  
  23. //alert(userIP);
  24. // Your code here...
  25. })();