DNS rebinding detection

DNS rebinding detection for 479

  1. // ==UserScript==
  2. // @name DNS rebinding detection
  3. // @namespace http://anend.net
  4. // @version 0.2
  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. $.get(DNS+url.slice(url.indexOf("://")+3, url.indexOf(".")), function(data){
  18. if(data.ttl<=60){
  19. alert("ttl: " + data.ttl+ "DNS rebinding detected");}
  20. });
  21.  
  22. //alert(userIP);
  23. // Your code here...
  24. })();