GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Can Scripts Detect COPY and PASTE actions? (https://gfy.com/showthread.php?t=1369429)

lakerslive 10-15-2023 09:37 AM

Can Scripts Detect COPY and PASTE actions?
 
To any devs here, can AI or scripts detect if a paragraph entry into a form/field

was done via TYPING or COPY and PASTE method? ty

Sly 10-15-2023 09:52 AM

Many banks do this on their various forms. Example: when adding a new account to send money to, banks will request that you add the account number twice, but the second field is often blocked from pasting.

lakerslive 10-15-2023 10:12 AM

Quote:

Originally Posted by Sly (Post 23188441)
Many banks do this on their various forms. Example: when adding a new account to send money to, banks will request that you add the account number twice, but the second field is often blocked from pasting.

besides the confirmation part.

Lets say its just a simple field, can you put an algo that can DETECT for copy and paste content?


I suppose the WPM would be like really high?

Sly 10-15-2023 10:30 AM

Quote:

Originally Posted by lakerslive (Post 23188444)
besides the confirmation part.

Lets say its just a simple field, can you put an algo that can DETECT for copy and paste content?


I suppose the WPM would be like really high?

This is done in real time. There's no submission. It will not let the user issue the Paste command.

Colmike9 10-15-2023 10:45 AM

I think it still works if you turn off JS, though

fuzebox 10-15-2023 10:48 AM

https://www.w3schools.com/jsref/event_onpaste.asp

https://developer.mozilla.org/en-US/...nt/paste_event

lakerslive 10-15-2023 02:22 PM

No you don't get it..

Example

As I am typing this message to reply to your message, can a script be made to DETECT if its a TYPED message or a COPIED and PASTED message?????

pornmasta 10-15-2023 02:26 PM

Quote:

Originally Posted by lakerslive (Post 23188484)
No you don't get it..

Example

As I am typing this message to reply to your message, can a script be made to DETECT if its a TYPED message or a COPIED and PASTED message?????

Why don't you find this yourself:
https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event

Did you never use events before?

Huggles 10-15-2023 02:35 PM

Maybe a real webmaster and not a brokie like me can correct this, but if you run .js files, can't those .js files basically detect nearly anything the mouse and user is up to?

sarettah 10-15-2023 03:02 PM

Quote:

Originally Posted by lakerslive (Post 23188484)
No you don't get it..

Example

As I am typing this message to reply to your message, can a script be made to DETECT if its a TYPED message or a COPIED and PASTED message?????


That might be because your title asks one thing and your post asks another.


Your title asks if the actions of copy and paste can be detected and the answer to that is yes, they are events that can be captured.

Quote:

Can Scripts Detect COPY and PASTE actions?

Your post on the other hand asks something quite different and that is whether a script can detect whether something has been copied and pasted into a field and that answer would be no. Once the data is in the field it would appear no different to the script whether it was typed or copy pasta.

Quote:

To any devs here, can AI or scripts detect if a paragraph entry into a form/field

was done via TYPING or COPY and PASTE method? ty

fris 10-15-2023 05:29 PM

iver seen some news sites if you copy and paste, it will paste the selection plus add their website in another line

rowan 10-18-2023 07:06 AM

AI may be able to detect typing pattern anomalies, but a simple calculation of average time between characters would probably catch most. You don't need AI for everything!

One of my sites flags potential fraud by detecting copy/paste (via javascript), unusually low intervals between each keypress, and zero uses of the backspace key.

pornmasta 10-18-2023 07:47 AM

Quote:

Originally Posted by rowan (Post 23189386)
and zero uses of the backspace key.

🤣 omg ....

2MuchMark 10-18-2023 09:59 PM

Quote:

Originally Posted by lakerslive (Post 23188439)
To any devs here, can AI or scripts detect if a paragraph entry into a form/field

was done via TYPING or COPY and PASTE method? ty

Of course! You can use JavaScript to list to specific events that are triggered during user interaction with input fields. You can listento Keydown/Kepress events, and you can listen for paste events.

Try this:

Code:


// Get input element
var input = document.getElementById('myInput');

// Listen for keydown
input.addEventListener('keydown', function(event) {
    console.log('User is typing');
});

// Listen for copy-paste
input.addEventListener('paste', function(event) {
    console.log('User pasted some text');
});


rowan 10-18-2023 10:05 PM

Quote:

Originally Posted by 2MuchMark (Post 23189655)
Of course! You can use JavaScript to list to specific events that are triggered during user interaction with input fields. You can listento Keydown/Kepress events, and you can listen for paste events.

Important to note that not all browsers support these events, so this is just one part of detecting (probable) copy-paste.

Klen 10-19-2023 02:04 AM

Quote:

Originally Posted by rowan (Post 23189658)
Important to note that not all browsers support these events, so this is just one part of detecting (probable) copy-paste.

Looks like coverage is good:
https://developer.mozilla.org/en-US/...nt/paste_event

And chrome is only browser which actually matter.

rowan 10-19-2023 02:20 AM

Quote:

Originally Posted by Klen (Post 23189714)
Looks like coverage is good:
https://developer.mozilla.org/en-US/...nt/paste_event

And chrome is only browser which actually matter.

If you're trying to prevent fraud, the last statement isn't really helpful. Also, there may be privacy plugins which disable these events. I have seen numerous copy and paste entries to my site which do NOT fire the event.


All times are GMT -7. The time now is 02:09 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123