473,792 Members | 3,400 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JavaScript in Password Protected Folder?

Hi All,
I am trying to hide my JavaScript source. The method I chose was to
keep all the important source in a password protected folder, and then
use a SRC="folder/script.js" to include it in my code. This way, the
script will run, but the user will be unable to view the included
code. Or so I think :).

I have tried this method, and it seems to work. However, I would like
to know if you can see any problems with this. For instance, can you
think of a way to bypass this and get at script.js? Can you foresee
any problems that would arise as a result of keeping scripts behind
password protected folders? Any other security concerns?
Thanks in advance.
Jul 20 '05
22 2246
Hi All,
Thanks for the rapid and definitive responses. It looks like I cannot
use JavaScript for any proprietary coding (only things that I don't
mind being open source).

This helps with making decisions about this project.
Thanks again!
Jul 20 '05 #11
xm****@yahoo.co m wrote:
Hi All,
Thanks for the rapid and definitive responses. It looks like I cannot
use JavaScript for any proprietary coding (only things that I don't
mind being open source).

This helps with making decisions about this project.
Thanks again!

Well, you are correct, and incorrect. You do not have to make your
JavaScript code open source... you simply have no method for hiding your
code... this is true. Open Source means something different than making
your code publically readable. You can put strinct copyrights in your
code, making it obvious that it is illegal to use your code in any
way... that is about all you can do.

There is one hotly contested method, called something like obfuscation,
where you run the code through a program that will mangle all of the
variables, and remove white-space, making it harder to read.

While this is a method for making it harder for someone to read your
code, it in no way hides it. If someone wants to put effort forward,
they can still read the code... it is just more difficult to do.

If you need to hide your code, you might consider Java, or server-side
scripting. In both cases, the user never has access to your source code.

Brian

Jul 20 '05 #12
Richard Cornford wrote:
"Randy Webb" <hi************ @aol.com> wrote in message
news:Zp******** ************@co mcast.com...
<snip>
On the plus side both of our newsreaders have followed RFC 1036 to the
letter. (I assume you noticed the organisation originating this latest
nonsense; another great contribution to the Usenet community.)


Actually, I hadn't paid attention to it until you mentioned it. But
knowing that, they also stopped adding the generated signature lines to
there posted posts.

It won't slip by me again though :)

I have to figure out how to make Mozilla quote the way I want it to and
show more than "so and so wrote" :-(

Ahh, the joys of learning :)
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 20 '05 #13
[My Misuse of the Term "Open Source"]
Well, you are correct, and incorrect. You do not have to make your
JavaScript code open source... you simply have no method for hiding your
code... this is true. Open Source means something different than making
your code publically readable. You can put strinct copyrights in your
code, making it obvious that it is illegal to use your code in any
way... that is about all you can do.
True, I should have been more careful with my language. Thanks for
the correction.
There is one hotly contested method, called something like obfuscation,
where you run the code through a program that will mangle all of the
variables, and remove white-space, making it harder to read.

While this is a method for making it harder for someone to read your
code, it in no way hides it. If someone wants to put effort forward,
they can still read the code... it is just more difficult to do.
I read about that, but it wasn't enough protection for my tastes, I
think I encountered a few pages like that as a matter of fact. I gave
up on them because I figured I could find other pages that were
properly formatted, but had I wanted to, I could have figured out the
contents. Normally, I wouldn't think of hiding source since I would
like people to be able to examine my work and (hopefully) learn from
it, as I have done with other pages. However, since this is
intellectual property for my employer the situation is much different.

If you need to hide your code, you might consider Java, or server-side
scripting. In both cases, the user never has access to your source code.
I have used server side scripting, and while it's the safest "platform
independent" technique, it is also lacking in interactivity and
responsiveness.

Java is the only other possibility that I can see, but I have no idea
of its future -- especially on the Windows platform. Furthermore,
since this application is targeted towards end users, I don't want
people to have to go through any hassle to run it -- and this includes
installing additional components.

Oh well, if it weren't a challenge, it wouldn't be fun :D
Brian

Thanks.
Jul 20 '05 #14
<xm****@yahoo.c om> wrote in message
news:4a******** *************** ***@posting.goo gle.com...
<snip>
I am trying to hide my JavaScript source.


Why?


Because the organization wishes to protect its source code,
since it is proprietary and may reveal internal details that
we prefer to keep secret.


Client-side code (including Java, which may be decompiled) should
not contain internal details that can be exploited. You don't keep
secrets by distributing them to people you can't trust to keep
them for you.

Richard.
Jul 20 '05 #15
> >Because the organization wishes to protect its source code,
since it is proprietary and may reveal internal details that
we prefer to keep secret.
Client-side code (including Java, which may be decompiled) should
not contain internal details that can be exploited. You don't keep
secrets by distributing them to people you can't trust to keep
them for you.


Well, the secrets aren't critical, so a "moderate" level of protection
is enough for us. Sure, they can decompile, but that would require a
lot of effort (and knowledge) on their part. It isn't a casual effort
like browsing JavaScript source. Also, if you are going to go through
that level of effort, there has to be a motivation. Casual browsing
can be done without serious motivation. All this leads to a "good
enough" level of protection.

Also, the issue isn't trust. As a matter of course, anything intended
for commercial use is to be regarded as intellectual property and kept
secret. This includes source code, and since there's no way (that I
know of) to conveniently distribute a program without opening up the
possibility of decompilation, then compilation is the best way of
doing it.

Lastly, the intended audience is the general public, or at least
certain members thereof. This is basically a "shrink-wrapped"
application, and as such, we don't have things like NDAs, etc...

Richard.

Thanks.
Jul 20 '05 #16
Richard Cornford wrote:
[top posting fixed]
xm****@yahoo. com wrote: <snip>
I am trying to hide my JavaScript source. ... <snip>
"StanD" <St**********@m ail.forum4desig ners.com> wrote in message
news:St******** **@mail.forum4d esigners.com...


By all means, please shorten your attribution(s).
JavaScript is a client side script, ...

<snip>

Pleas do not top-post to comp.lang.javas cript. The group FAQ outlines
acceptable posting style in section 2.3 paragraph 5 and references the
applicable standard.


Full ACK
Your posting software appears to exhibiting faulty behaviour in its
handling of the "References " header in your postings.
Nonsense.
It has sent (split across lines at the location of spaces to avoid
uncontrolled wrapping):-

References: <4a************ **************@ posting.google. com>
<c0************ *******@news.de mon.co.uk>
<40************ *********@news. xs4all.nl>
<Ao************ ********@comcas t.com>


This is perfectly OK according to the standards. RFC 1036 (which is
BTW not even on the Standards Track) is an extension to RFC 822, and
later RFC 2822 (which is on the Standards Track). It does not
redefine the format of header lines, neither does the part of the RFC
you have quoted. *Your* news client software is simply incapable and
it is *your* software which disobeys the standards also in this regard.

WFM. Mozilla Thunderbird 0.5+ (20040220).

You should get a working client or workaround this bug with
additional software. See <http://insideoe.tomste rdam.com/>
HTH

PointedEars
Jul 20 '05 #17
Thomas 'PointedEars' Lahn wrote:
Richard Cornford wrote: <snip>
Your posting software appears to exhibiting faulty behaviour in its
handling of the "References " header in your postings.


Nonsense.
It has sent (split across lines at the location of spaces to avoid
uncontrolle d wrapping):-

References: <4a************ **************@ posting.google. com>
<c0********** *********@news. demon.co.uk>
<40********** ***********@new s.xs4all.nl>
<Ao********** **********@comc ast.com>


This is perfectly OK according to the standards. RFC 1036 (which is
BTW not even on the Standards Track) is an extension to RFC 822, and
later RFC 2822 (which is on the Standards Track). It does not
redefine the format of header lines, neither does the part of the RFC
you have quoted. *Your* news client software is simply incapable and
it is *your* software which disobeys the standards also in this
regard.

<snip>

If you don't believe that RFC 1036 (Standard for Interchange of USENET
Messages) is applicable to Usenet posts how about:-

| RFC 977 Network News Transfer Protocol February 1986
|
| 1.4. A Central News Server
| ...
| NNTP is modelled upon the news article specifications in RFC 850,
| which describes the USENET news system. However, NNTP makes few
| demands upon the structure, content, or storage of news articles,
| and thus we believe it easily can be adapted to other non-USENET
| news systems.
| ...
| 3.10.1. POST
| ...
| If posting is permitted, the article should be presented in the
| format specified by RFC850, and should include all required
| header lines. ...
| ...

- which is a standards track document and directly employs:-

| RFC 850 Standard for Interchange of USENET Messages June 1983
|
| 2.2.6 References This field lists the message ID's of
| any articles prompting the submission of this article. It
| is required for all follow-up articles, and forbidden when
| a new subject is raised. Implementations should provide a
| follow-up command, which allows a user to post a follow-up
| article. This command should generate a Subject line
| which is the same as the original article, except that if
| the original subject does not begin with "Re: " or "re: ",
| the four characters "Re: " are inserted before the
| subject. If there is no References line on the original
| header, the References line should contain the message ID
| of the original article (including the angle brackets).
| If the original article does have a References line, the
| followup article should have a References line containing
| the text of the original References line, a blank, and the
| message ID of the original article.
| ...

- which RFC 1036 updates an replaces (without any change to the
definition of the References header).

But even then:-

| RFC 2822 Internet Message Format April 2001
|
| 3.6.4. Identification fields
| ...
| The "References :" field will contain the contents of the parent's
| "References :" field (if any) followed by the contents of the parent's
| "Message-ID:" field (if any). If the parent message does not contain
| a "References :" field but does have an "In-Reply-To:" field
| containing a single message identifier, then the "References :" field
| will contain the contents of the parent's "In-Reply-To:" field
| followed by the contents of the parent's "Message-ID:" field (if
| any). If the parent has none of the "References :", "In-Reply-To:",
| or "Message-ID:" fields, then the new message will have no
| "References :" field.
| ...

The only pertinent differences between RFC 2822 and 850/1036 (and
thus, by implication 977) is in providing more detail of what
should happen if the message responded to does not have References,
Message-ID and/or In-Reply-To fields. The References header in the
message I was responding to still couldn't be validly constructed
in response to any of the preceding messages in this thread. That
is, it is impossible to take the References header (or the lack of
it in the original post) and append the Message-ID field to come
up with the References field in that response.
You should get a working client or workaround this bug with
additional software. See <http://insideoe.tomste rdam.com/>


What bug? My software didn't build the References header in the
message I was responding to, and it did a fairly reasonable job of
interpreting information that was incorrect to start with.

Richard.
Jul 20 '05 #18
Richard Cornford wrote:
Thomas 'PointedEars' Lahn wrote:
Richard Cornford wrote:
Your posting software appears to exhibiting faulty behaviour in its
handling of the "References " header in your postings.
Nonsense.
It has sent (split across lines at the location of spaces to avoid
uncontroll ed wrapping):-

References : <4a************ **************@ posting.google. com>
<c0********* **********@news .demon.co.uk>
<40********* ************@ne ws.xs4all.nl>
<Ao********* ***********@com cast.com>


This is perfectly OK according to the standards. RFC 1036 (which is
BTW not even on the Standards Track) is an extension to RFC 822, and
later RFC 2822 (which is on the Standards Track). It does not
redefine the format of header lines, neither does the part of the RFC
you have quoted. *Your* news client software is simply incapable and
it is *your* software which disobeys the standards also in this
regard.

<snip>

If you don't believe that RFC 1036 (Standard for Interchange of USENET
Messages) is applicable to Usenet posts


I have never stated that. But you have, again, nothing quoted that
states that wrapped References are not OK according to any standard.
[...]
You should get a working client or workaround this bug with
additional software. See <http://insideoe.tomste rdam.com/>
What bug? My software didn't build the References header in the
message I was responding to, and it did a fairly reasonable job of
interpreting information


No, it did not, it failed.
that was incorrect to start with.


It was not incorrect.
PointedEars
Jul 20 '05 #19
Thomas 'PointedEars' Lahn <Po*********@we b.de> wrote in message news:<40******* *******@Pointed Ears.de>...
<snip>
If you don't believe that RFC 1036 (Standard for Interchange
of USENET Messages) is applicable to Usenet posts
I have never stated that.


You stated that the header I quoted was "perfectly OK according
to the standards" when it is structurally incorrect according
to RFC 1036, which implied that you didn't believe that
RFC 1036 was a standard that should be applied to a Usenet post.
But you have, again, nothing quoted that states that
wrapped References are not OK according to any standard.


Why would I want to quote anything that stated that wrapped
References headers are not OK? That would have no baring on
the number and sequence of message IDs in the References
header that I was criticising.

You didn't by any chance not bother to read what I had
written (twice) and instead jump to an irrelevant conclusion
based on some preconception that you have? If you are going
to do that and then post statements like "Nonsense" based on
your irrelevant preconception the least you could do is go
on to state why you think something is nonsense so that it
would be clear that that you are thinking about something
unrelated and irrelevant.

<snip>
What bug? My software didn't build the References header
in the message I was responding to, and it did a fairly
reasonable job of interpreting information


No, it did not, it failed.


No it didn't, it associated the message with the message
baring the Message-ID that appeared last in the sequence of
message IDs in the References header. One of three equally
reasonable responses based on the data provided, but probably
the most common response by newsreaders as that would
normally be the ID of the message being responded to.
that was incorrect to start with.


It was not incorrect.


It is not possible to employ the procedure for building a
References header described in RFCs 850, 1036 and/or 2822
and come up with the References header that I was
commenting on. In context no References header could be built
with more than two message IDs and in a reply to the OP that
header should only contain one message ID, while the header
in question has 4. That is objectively incorrect and if you
had bothered to read what I said you would not have wasted
your time making irrelevant comments, my time responding to
those and everyone else's time reading a reiteration of an
argument that was correct to start with.

Richard.
Jul 20 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1607
by: netsurfer | last post by:
hi..I'm working on a project that requires files to be password protected on a UNIX based site. The people that own the web site want to be able to change the password every so often. Unfortunately, I have restricted access only to FTP so I really can't log in to any kind of Administrative Console or Admin Panel and see if there are folders that can be password protected and then have passwords changed on them. The people I'm contracted...
3
1754
by: Ronan Dodworth | last post by:
Hi there I'm having a little bit of a problem with my customvalidator control. The problem is the javascript runs fine on my local webserver IIS but not when I post it to the web hosting server. As it is client side scripting I'm suprised that this is the case as I'm using the same browser IE6 and the same machine to access both. I've included the code below. Can anyone help . I've tried lowering all the security settings for intranet...
2
1813
by: DanB | last post by:
I am using VB DotNet Std Edition and am writing a web application that needs to read and write to an password protected database. The mdb files reside in a folder (fpdb) under the localhost (c:\inetpub\wwroot) Within the IDE I can view the data using the server explorer and I use that same oledb connection for the web form. I have tried accessing a non-password protected db in the same folder using
4
7571
by: kthiagar | last post by:
Hi I am trying to connect to a password protected access file from VB.NET. I have no problem in connecting to Access, if I remove the password. This is what I am doing: In the server explorer, I choose "Add a connection" Choose "Microsoft Jet 4.0 OLEDB Provider" in the provider tab Selected the access file in the next tab Left Username as Admin and typed the password. Now when I try to test connection, I am getting this error message:
1
1633
by: Tull Clancey | last post by:
Hi all. I have an app that needs to create a folder off the installation folder, this is not a problem. But, I need to password protect this folder so only the application can get access to the data stored there. Of course a user can add a password to a foler, but how can I do this from within my code, then how would I open a file within this password protected folder?
0
1365
by: sonicpulse | last post by:
Hello, I made a program that iterates through all the pdf's in a folder and opens them and prints them. However, all of these pdf's are password protected, so I have to manually type in the password many times. Is there any way to open a password-protected PDF with the password entered through python? Thanks
0
1098
by: vien | last post by:
hi there i'm vien i'm looking for a vb code that can make folders in windows explorer to be password protected sothat if some one want to open the folder, delete the folder,or move the folder; the folder should ask for a password. The folder should be accessed only for those who have that password. is any body has any idea? thanks for help
3
2490
by: Charlotte | last post by:
Hello, info: I'me a rookie with IIS I have on a WinXP Pro the IIS installed, so I can test some pages before uploading to the hostserver online on the hostserver is a possibility (with the program PLESK) to make a directory secure (to access a page in that directory, you have to give a username and a
3
9215
by: fndofu | last post by:
I recently protected(made protected and invisible) a folder with "FILE and FOLDER protector" software....But unfortunately i forgot the password that i used........... Cud u please tell me how to access the files in the folder... The name of the folder is "new" and it was in "D:\" drive..Now i need to access the hidden folder(Show hidden folder's option didn't work)...I h'v heard that using some simple commands v can easily unprotect...
0
9669
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10207
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10156
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5435
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.