Can i not show the message that apears when HTA is activated - hta

I tried using an HTA to deploy some files to the users computer. I would like to do so silently cause our users get upset by the fact that they need to approve the activation of the HTA every time the enter the page.
Can i somehow disable the apearance of the message?
TIA,
Arik

Hmmm...the message is, IIRC, a security warning, is that correct?
Adding your site to the Trusted Zone might help you (this is a client-side browser (MSIE) setting).

Unless the HTA file is residing on the user's computer, you'll just have to live with the security warning.
I, for one, certainly wouldn't want a web page running with such elevated security settings without my approval! This is just the sort of thing virus writers would want.

A novel solution, is you can deploy once a HTA application which can be an empty page with an IFRAME, i.e.
<html>
<head>
<title>Test</title>
</head>
<body>
<br/>
<iframe src="http://somewhere.org" />
</body>
</html>
That way, the HTA application can be rerun repeatedly without the need of repeated authorization since it's already on the computer. However, the content of the HTA can be updated by update the remote document specified in the IFRAME.

Related

Running a Unix shell script from simple HTML button input

I've been Googling all afternoon with no luck, so I've come to you for help!
I have an embedded system that is hosting the simplest of web pages:
<html>
<head></head>
<body>
<input type="button" value="Run" action="">
</body>
</html>
There is a little more to the page (just some system variables on display), but this is basically all it is. I generate this page from a simple C application that simply creates and updates a small run.html file in the web directory of my embedded system.
What I am TRYING to do, is when a user browses to the page and presses the button, a simple shell script or c app will create a tiny go.txt file with perhaps two characters 'GO' in the file. Just some kind of file to allow another application to eventually know that the button has been pressed.
I theorize that there is some syntax like action="/root/fs/go.sh" that might allow me this kind of access, but my experimentation has yielded no success. I should note that PHP is not enabled on the machine we are using.
My question for the group: is it this simple? Or am I missing some obvious web technology issue and going down a completely wrong path? Any feedback will be greatly appreciated.
Thanks,
To get the desired behaviour, you will have to do some works on the Web server. You will need to have some code on the server that will run the script you want upon receiving the form. The code on the server could be pretty much anything: a PHP script, a CGI application you coded in C, a custom Apache module, etc.
The bottom of this is, you will have to code something on the server side to do support that behavior. There is nothing in the HTML standard that let client request any script to be run on the server.

Stylesheet not updating when I refresh my site

I am creating a website, but when I made changes to the stylesheet on my site, and I refreshed the site, none of the changes were there.
I tried to use the view source tool to check the stylesheet.css and it isn’t updated either. But when I go to the root of my system it is.
I have to wait at least 20 minutes before I see the update on my site, can anyone tell me why I don’t see changes right away? Is something wrong with my browser, computer, or server?
I also tried deleting my cookies, cache, and history but it still didn’t work.
If your site is not live yet, and you just want to update the stylesheet at your pleased intervals, then use this: Ctrl + F5.
On Mac OS (in Chrome) use: Cmd + Shift + R.
This will force your browser to reload and refresh all the resources related to the website's page.
So every time you change something in your stylesheet and you wanna view the new results, use this.
Most probably the file is just being cached by the server. You could either disable cache (but remember to enable it when the site goes live), or modify href of your link tag, so the server will not load it from cache.
If your page is created dynamically by some language like php, you could add some variable at the end of the href value, like:
<link rel="stylesheet" type="text/css" href="css/yourStyles.css?<?php echo time(); ?>" />
That will add the current timestamp on the end of a file path, so it will always be unique and never loaded from cache.
If your page is static, you have to manage those variables yourself, so use something like:
<link rel="stylesheet" type="text/css" href="css/yourStyles.css?version=1" />
after doing some changes in the file content, change version=1 to version=2 and so on.
If you wish to disable the cache from caching css files, refer to your server type documentation (it's done differently on apache, IIS, nginx etc.) or ask/search for a question on https://serverfault.com/
Assuming IIS - adding the key under <system.webServer> with the right settings in the root or the relevant folder does the trick.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<caching enabled="false" enableKernelCache="false" /> <!-- This one -->
</system.webServer>
</configuration>
That said sometimes one still has to recycle the Application Pool to "bump" the CSS. Therefore: Disabling IIS caching alone is not a 100% guaranteed solution.
For the browser: There are some notes on fine-grain controlling the local cache on FF over on SuperUser for the interested.
Easiest way to see if the file is being cached is to append a query string to the <link /> element so that the browser will re-load it.
To do this you can change your stylesheet reference to something like
<link rel="stylesheet" type="text/css" href="/css/stylesheet.css?v=1" />
Note the v=1 part. You can update this each time you make a new version to see if it is indeed being cached.
This may not have been the OP's problem, but I had the same problem and solved it by flushing then disabling Supercache on my cpanel. Perhaps some other newbies like myself won't know that many hosting providers cache CSS and some other static files, and these cached old versions of CSS files will persist in the cloud for hours after you edit the file on your server. If your site serves up old versions of CSS files after you edit them, and you're certain you've cleared your browser cache, and you don't know whether your host is caching stuff, check that first before you try any other more complicated suggestions.
I had a similar problem, made all the more infuriating by simply being very SLOW to update. I couldn't get my changes to take effect while working on the site to save my life (trying all manner of clearing my browser cache and cookies), but if I came back to the site later in the day or opened another browser, there they were.
I also solved the problem by disabling the Supercacher software at my host's cpanel (Siteground). You can also use the "flush" button for individual directories to test if that's it before disabling.
In my case, since I could not append a cache busting timestamp to the css url it turned out that I had to manually refresh the application pool in IIS 7.5.7600.
Every other avenue was pursued, right down to disabling the caching entirely for the site and also for the local browser (like ENTIRELY disabled for both), still didn't do the trick. Also "restarting" the website did nothing.
Same position as me?
[Site Name] > "Application Pool" > "Recycle" is your last resort...
If it is cached on the server, there is nothing you can do in the browser to fix this. You have to wait for the server to reload the file. You can't even delete the file and re-upload it. This could take even longer if you are using a caching server like Cloudflare (it will even survive a server reboot). You could rename it and load a copy.
i had the same problem, I use 000webhost to host my site and i also use cloudflare. I'd already disabled all my cache setting from my browser then tried to change some css and reload the page with hard refresh (shift + click refresh button, ctrl + f5, etc) nothing had changed.
It turns out the issue was coming from cloudflare cache. If you are using cloudflare, you can enable development mode in cloudflare it will temporarily bypass your cache allowing you to see changes to your origin server in realtime.
For someone who still encounter this problem, i hope this can help you
This may be a result of your server config, some hosting providers enable "Varnish" on your domain. This caching HTTP reverse proxy, is used to speed up delivery. One could try to disable varnish on the cpanel (assuming that you have one) and check if it was that.
For reference, I'm developing on a Windows 11 machine ,first run below 2 command
$env:NODE_ENV="development"
$env:TAILWIND_MODE="watch"
now run your application
for reference follow : https://github.com/tailwindlabs/tailwindcss/issues/4081
Same problem happened with me I am cleared my browser cash and cookies then automatically running properly
![Clear Cache] Ctrl+Shift+Delete
http://i.stack.imgur.com/QpqhJ.jpg
Sometimes it’s necessary to do a hard refresh to see the updates take effect. But it’s unlikely that average web users know what a hard refresh is, nor can you expect them to keep refreshing the page until things straighten out.
Here’s one way to do it:<link rel="stylesheet" href="style.css?v=1.1">
I ran into this problem too, a lot of people seem to recommend force reloading your page, which won't fix the issue in cases such as if you're running it on a server. I believe the optimal solution in this scenario is to timestamp your css.
This is how I do it in my Django template:
<link rel="stylesheet" href="{% static 'home/radioStyles.css' %}?{% now 'U' %}" type="text/css"/>
Where adding ?{% now 'U' %} to the end of your css file would fix this issue.
Where ?Wednesday 2nd February 2020 12PM (current date) seems to fix the issue, I also noticed just putting the time fixes it too.
I had same issue. One of the reasons was, my application was cached and I was performing local build.
I would prefer deleting the css file and re-adding it again with changes if none of the above comments work.
First, try to Force reload or Clear cache and Empty chase and hard reload. You can do it by pressing F12 and then by right-clicking on it.
2nd Solution: Check your HTML base tag. You can learn more about it from here.
Don't update the styles in style.css, instead create a new stylesheet of your own and import in style.css
your-own-style.css
.body{
/*any updates*/
}
import your-own-style.css in style.css
#import url("your-own-style.css");

Removing "This page is accessing information that is not under its control" popup

I am building a website using asp .net. The site uses a Google font this is imported in the masterpage like so...
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Yanone+Kaffeesatz:400,300,200" media="screen"/>
Note that I have removed the http(s) from the url.
However I still always get the following error in a popup...
"This page is accessing information that is not under its control. This poses a security risk. Do you want to continue?"
I thought that removing the http(s) would ensure that this error would not appear? How do I go about removing it?
I have also tried putting this reference in my css files using an import but I still get the popup.
I don't want to change browser settings as clients can't be expected to do this.
Thank you
I don't know if the solution below is compliant with Google API's Terms of Service.
The error you have is due to a Cross-Domain request (the popup is known as the Cross-Domain Data Access dialog).
To avoid this dialog, you can host the .css file & the related font files on the same domain has your website.

My asp.net 1.1 site will not refresh

I have an ASP.NET 1.1 site and I'm uploading a small change, but the page will not refresh. The page was changed 2.5 hours ago. I have tried loading the page in 3 different browsers, so I know the issue is not browser caching. I searched for similar situations on the web and StackOverflow. I have tried changing the query string, deleting the file and uploading again, and changing web.config to try to force a site restart.
I even uploaded the file under a different name to make sure there was not another problem. That did work, but I don't want to change all of the links to point to a new page. I even tried using Remote Desktop to log into another computer at another client to check if the cached version of the page is there too... it is.
The site is co-located using shared hosting, and my (new) client doesn't even know how to find the URL for the administrator's panel or who to call for support.
Using Whats that site running?, I found out what the server is running:
Windows 2000
Microsoft-IIS/5.0
ASP.NET v1.1
F5 Big-IP
I know! Crummy host!
I'm sure in a day or so I'll contact support and clear this up, but I'll still want to know how this page is cached. I have been programming ASP.NET for 5 years and don't remember anything like this before. I don't think there is a proxy caching the page, but so far that is the only thing I can think of.
Thanks for any ideas in advance...
EDIT: Code sample... This appears to be a single page ASPX page, no code behind.
<%# Page Language="C#"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head runat="server">
<title>Login</title>
</head>
<body>
...
</body>
</html>
If it's not patched, then it could suffer from an old bug where the Temporary ASP.NET Files aren't updated correctly.
If that's the case, be glad it went wrong this way - it can also go wrong in such a way as to throw compilation bugs on random pages throughout your application. If that's the case then restarting may be required. Or worse, stopping, clearing that directory, and then starting.
For both this, and some other compilation mis-fires, you could try introducing a null change (add a space, delete the space) to the global.asax. This can trigger an entire recompilation.

Security problem

I have a security problem in my website. A script code was added into my all pages like "<script src="Ip address/viewpic.asp"></script>" . It is between </head> and <body> tag. Now Google says "this site may be hartful for your pc!" about my site. How can i secure my website? I use C# and Visual Studio 2008.
You have been hacked. This code that has been added to your site is trying to hack web browsers that visit your site.
This could have happened a number of ways. The easist thing for you to do is to download an anti-virus like AVG and scan any machines with access to the site. There is malware that looks for FTP connections, it grabs the username/password then logs in and modifies files it finds. You should be using SFTP which can be installed under windows, FTP is only used by people who don't know any better or love to get hacked, or both.
The more complex possibility is that there is a vulnerability in your site. This requires a professional (Like me) to track down and fix. Acunetix can help find flaws in your site, but this might not find the vulnerability that was used to break in.
Edit: Assuming that the script is your own and not malicious:
You should not have any code between </head> and <body> - Otherwise you have got a <script> tag as a direct child of <html> which is not allowed.
Put the <script> tag inside <body> at the correct place where you want the script to execute, to correct the structural issue but you need to provide some more information about the exact error messages you are seeing about security as I'm not aware that Google shows error messages within its search listings and I dont have Google Toolbar installed to know what that does; but I don't believe it has typos in it ;)
So please provide more information about the exact security warnings once you've fixed - and validated (with the W3C Validator) - the structure of your HTML.
Edit: If the script is not intended to be there and has appeared outside of your desire:
Have a look in the HTML source where the script is present; and compare to your own ASPX pages to find out where the script is appearing. If it is being rendered by one of your controls you need to examine where the value is coming from. If it is a database, you need to focus your attention on what gets the information into the DB in the first place. If the script is injected and not into one of your controls then you should talk to your ISP I would think.

Resources