Hi All,
I have a quick question,
I am making a little script that shows users how easy it is to have there
clipboards read.
I would like to capture my users clipboard (plain text only) and then
AUTOMATICALLY send them to a page displaying there contents, I want to get
the +content+ put into a $content vairiable for easier manipulation in PHP.
As javascript is client side and PHP serverside, i need to submit the form
somehow, and this is what I have come up with (below)...
Any other ideas would be cool, and I then pick up the values from Javascipt
and then GET the content and put it into a vairiable in PHP, but this means
clicking a link or button.
Do you now of an automatic way of doing this? maybe a auto refresh?? I dont
know??? will it work?
Thanks all,
J
------------------------------ File ---------------------------
<html><head></head><body>
<?
if (content){
$string = $_GET['content'];
echo $string;
}
?>
<SCRIPT LANGUAGE='JavaScript'>
<!-- //
var content = clipboardData.getData("Text");
document.write('<a href="jim.php?content='+content+'">Click here</a>');
var content=content;
// -->
</SCRIPT>
</body></html> 5 1519
J wrote: Hi All, I have a quick question, I am making a little script that shows users how easy it is to have there clipboards read.
Ha, ha ha, ha ha ha, ROFLMAO ... :-x
Can you *really* do this on Windows/IE? Reliably?
He he, haw haw, gosh, somebody stop me!
I'll absolutely guarantee that this will not work on my system!
It really is that easy.
Have a good one :-)
--
Zif
It does work, look into it before assuming because you don't know about it,
it doesn't exist.
Its not very reliable though, obviously they need some plain text in the
clipboard, and hopefully not any HTML or any other script, just something
like "hello, test" or something like that.
Anyway, back to my question, do you know of a way to automatically submit
the data on pageLoad?
Thanks
Jim
PS you might want to read http://www.arstdesign.com/articles/c...rdexploit.html before commenting.
"Zifud" <Zi***@hotmail.com> wrote in message
news:gI**************@news.optus.net.au... J wrote: Hi All, I have a quick question, I am making a little script that shows users how easy it is to have there clipboards read.
Ha, ha ha, ha ha ha, ROFLMAO ... :-x
Can you *really* do this on Windows/IE? Reliably?
He he, haw haw, gosh, somebody stop me!
I'll absolutely guarantee that this will not work on my system! It really is that easy.
Have a good one :-)
-- Zif
"J" wrote I would like to capture my users clipboard (plain text only) and then AUTOMATICALLY send them to a page displaying there contents, I want to get the +content+ put into a $content vairiable for easier manipulation in PHP.
If the purpose of this excercise is only the demonstration of clipboard
functionality, there is no need for PHP or a second page:
var a=clipboardData.getData("Text");
document.write( a.replace(/</g,'<') );
will be plenty.
You strengthen your user's trust in you by NOT sending their clipboard
back to your server.
hth
--
Ivo
J wrote: It does work, look into it before assuming because you don't know about it, it doesn't exist.
Please don't top-post, read the group FAQ:
<URL:http://jibbering.com/faq/#FAQ2_3> Its not very reliable though, obviously they need some plain text in the clipboard, and hopefully not any HTML or any other script, just something like "hello, test" or something like that.
I know it works on *one* particular platform with *one*
particular browser, please turn sarcasm detector to "on".
It does not work on any platform/browser combination that I use. Anyway, back to my question, do you know of a way to automatically submit the data on pageLoad?
The reference you quote points out the silliness of allowing a
script writer to arbitrarily access the clipboard. Point your
visitors there.
Further, you can't guarantee that there is *anything* in the
clipboard, much less something worth stealing - or even if there
is, that you can do anything useful with it.
In plain English: it is not a security hazard, it is a silliness
hazard.
Please reinstate sarcasm detector to your preferred setting...
--
Zif
Yeah I suppose your right.
Ta.
"Ivo" <no@thank.you> wrote in message
news:42***********************@news.wanadoo.nl... "J" wrote I would like to capture my users clipboard (plain text only) and then AUTOMATICALLY send them to a page displaying there contents, I want to get the +content+ put into a $content vairiable for easier manipulation in PHP.
If the purpose of this excercise is only the demonstration of clipboard functionality, there is no need for PHP or a second page:
var a=clipboardData.getData("Text"); document.write( a.replace(/</g,'<') );
will be plenty. You strengthen your user's trust in you by NOT sending their clipboard back to your server. hth -- Ivo This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: KenLee |
last post by:
I worked on Windows application.
I made a application to covert flat file to insert database.
currently, I made a button to display progress bar after clicking the button.
I just want to load...
|
by: chrisdude911 |
last post by:
how do i add video into a javascript web page with my own custom
buttons?
|
by: hemant.singh |
last post by:
Hi all,
I am trying to get a way by which I'll know exactly when user goes out
of my site by clicking on close button in browser, So that w/e user
click close button in browser, I can send a...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |