Hello friends
is there any keylogger scripts thats I putt into my home page when user visit it it make a log file of users key storks and send it in the mail or upload in the script form
Hello friends
is there any keylogger scripts thats I putt into my home page when user visit it it make a log file of users key storks and send it in the mail or upload in the script form
A short, practical note for this thread.
The request in the original post from (and the technical ideas raised by and ) are technically feasible in a browser, but covertly recording and exfiltrating other people’s keystrokes is ethically wrong and legally risky. Secret keystroke capture is commonly treated as electronic interception or spyware in many jurisdictions; employers/parents may have narrow lawful uses, but deploying a logger on visitors’ machines without clear, informed consent can violate privacy and wiretap laws. (bja.ojp.gov)
Safer, legitimate alternatives that accomplish common project goals (preventing data loss, usability measurement, debugging) are available. One lightweight approach is client-side autosave that stores only the user’s own draft data locally (browser storage) and clears it on submit — no keystrokes leave the user’s device unless they explicitly submit. The example below shows a simple debounced localStorage autosave that skips password inputs and removes the draft on submit:
// safe autosave (client-side only) — stores drafts in localStorage, exclude passwords
const form = document.querySelector('form');
const KEY = 'autosave-draft-' + (form.id || form.name || 'default');
const debounce = (fn, ms=250) => { let t; return (...a)=>{ clearTimeout(t); t=setTimeout(()=>fn(...a), ms); }; };
function saveDraft(){
const data = {};
form.querySelectorAll('input,textarea,select').forEach(el=>{
if (el.type === 'password' || el.dataset.nosave !== undefined) return;
const key = el.name || el.id;
if (key) data[key] = el.value;
});
localStorage.setItem(KEY, JSON.stringify(data));
}
window.addEventListener('DOMContentLoaded', ()=>{
const raw = localStorage.getItem(KEY);
if (!raw) return;
Object.entries(JSON.parse(raw)).forEach(([k,v])=>{
const el = form.querySelector(`[name="${k}"],#${k}`);
if (el) el.value = v;
});
});
form.addEventListener('input', debounce(saveDraft, 300));
form.addEventListener('submit', ()=> localStorage.removeItem(KEY)); For research or UX analytics, capture only with informed consent and use tools that mask or block sensitive inputs by default (session-replay tools provide input-masking features and retention controls). Server-side logging should record only submitted data over HTTPS and must never store raw credentials or unnecessary PII — follow secure logging best practices and data-minimization rules. (developer.mozilla.org)
Community caution (as implied) is appropriate: if the project purpose is unclear, avoid any approach that records unconsenting users. Legal advice and explicit user consent are recommended before collecting behavioral data. (eff.org)
Jump to Post— desup 0There is the way, but it can log just text, that has been written to the input
text in form.
This way is onKeyUp event and send (via ajax) the text to the action page (php), that can handle the strings that was sent.
I can make one for you …
Jump to Post— blocblue 238I cannot offer any alternative solutions, because you still haven't told us why you want to capture key strokes, or what you're going to do with the data.
For all we know, you could be looking to capture a user's data input in a really round-about way. You haven't …
There is the way, but it can log just text, that has been written to the input
text in form.
This way is onKeyUp event and send (via ajax) the text to the action page (php), that can handle the strings that was sent.
I can make one for you if you want it.
But Im not sure if there is something, that can log every key press on the page.
Binding the onkeypress event to the body tag might do it. And it would only work when the browser window is active
But why would you want to? What are you trying to accomplish?
i want to do it just for some kind of my project...
Yes, but I'm asking what are you trying to accomplish, because there might be a better method to achieve the outcome you require.
what are the better method will you explain
I cannot offer any alternative solutions, because you still haven't told us why you want to capture key strokes, or what you're going to do with the data.
For all we know, you could be looking to capture a user's data input in a really round-about way. You haven't clarified your requirements either way.
Dude I am sorry, but it seems like all you want to do is hack, so what blocblue is saying is 'what are you trying to do?' I mean are you trying tohackor not???
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.