Solved

How to get the path of the file on the server.

Posted on 2012-04-05
4
322 Views
Last Modified: 2012-04-05
I have an application, when it gets opened, it open a url in the server. From the server, the application has a file which any user can download locally into machine.

How to read/get the physical path of the client machine where the file is stored.
0
Comment
Question by:searchsanjaysharma
  • 2
  • 2
4 Comments
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 37813079
If you understand why this is a security risk, then you will understand why it's not possible  = )
0
 

Author Comment

by:searchsanjaysharma
ID: 37813174
Or shall i redefine the question.I have a file a.htm the user has to download once, to access my application on the server.
So when the user click on a.htm, i need to know the physical path of the a.htm.

or

a.htm contains a function f(), called at onload which redirects to www.google.com, how do i get the path of a.htm on server.
0
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 37813203
I believe you'll need to look into local storage and HTML5. I don't know enough about either to confirm, but it may suit your need.

However, think about it like this:  Let's say I'm a malicious web page developer. I craft a page which targets a known vulnerable program on the file system. (This happens all the time with web pages attacking Flash and other plugins.) I can tell what OS you are running because your browser happens to be one of the many that submits OS details to the server. Because I know what OS you are running, I also know about some common exploits for your particular system. If I had access to your local filesystem, the I could work my page in such a way that I attacked that known vulnerability and compromised your system. This is why web pages don't interact with a client's filesystem.

With HTML5, my understanding is that local storage is like a sandbox area where you can store files. Javascript can access this area. You can probably save your file here and load it via Javascript. Of course, since this HTML5, you will be limited to the newer browser versions that are out (say goodbye to IE 6!!).
0
 

Author Closing Comment

by:searchsanjaysharma
ID: 37813705
ok
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now