Personal challenge. Sensible or stupidity?
- lonewolff
- Ogre Magi
- Posts: 1207
- Joined: Wed Dec 28, 2005 12:58 am
- x 6
Personal challenge. Sensible or stupidity?
Has this been done before, do you guys know?
What do you think of this idea?
- syedhs
- Silver Sponsor

- Posts: 2703
- Joined: Mon Aug 29, 2005 3:24 pm
- Location: Kuala Lumpur, Malaysia
- x 51
I think the reason of doing it this way is because you wanna protect the source code especially if your customer can host your web app int their server. And there is this benefit from better performance.
Regarding protecting the source code, web script language can be obfuscated, so there is no real benefit in this area.
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
- lonewolff
- Ogre Magi
- Posts: 1207
- Joined: Wed Dec 28, 2005 12:58 am
- x 6
So, with these sites, the entry point is something like http://www.whatever.com/index.exe ?
- triton
- Greenskin
- Posts: 138
- Joined: Thu Mar 13, 2008 10:25 pm
- Location: Portugal
-
KevinMulder
- Kobold
- Posts: 28
- Joined: Sat Sep 06, 2008 1:25 am
... and millions of firewalls and internet protections system will deny to connect to your site, because the above url is like what mostly used in spam/trojans emails ...lonewolff wrote:Bummer, I thought I was onto something relatively new![]()
So, with these sites, the entry point is something like http://www.whatever.com/index.exe ?
Where I look onto the night sky watching the stars, I know those are just dead-pixels left around ...
- lonewolff
- Ogre Magi
- Posts: 1207
- Joined: Wed Dec 28, 2005 12:58 am
- x 6
How can that be? The executable is run server side (not client side) and generates the HTML itself. So, this will work on a non Win32 platform that doesn't even know what an exe file is. Like Linux, Mac, Solaris, etc...KevinMulder wrote:... and millions of firewalls and internet protections system will deny to connect to your site, because the above url is like what mostly used in spam/trojans emails ...lonewolff wrote:Bummer, I thought I was onto something relatively new![]()
So, with these sites, the entry point is something like http://www.whatever.com/index.exe ?
-
CABAListic
- OGRE Retired Team Member

- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
No, it's about the form of the URL ending in .exe. Usually URLs like that are download links, and some more paranoid firewalls would probably take exception to that (though I wouldn't find that particularly useful, seeing as how it would kill a lot of legal downloads, too).lonewolff wrote: How can that be? The executable is run server side (not client side) and generates the HTML itself. So, this will work on a non Win32 platform that doesn't even know what an exe file is. Like Linux, Mac, Solaris, etc...
Of course, the easy solution would be not to use that particular file extension. In fact, CGI applications are often called via mod_rewrite or similar mechanisms, anyway.
- lonewolff
- Ogre Magi
- Posts: 1207
- Joined: Wed Dec 28, 2005 12:58 am
- x 6
In IIS, I initially had my exe folder set to 'script only' permissions and my brower was having a heart attack about it and was trying to download the exe. After setting IIS on my server to 'script & executables' my browser (on another machine) was now behaving as per what I wanted.
Anyone got a secure system (that they feel in pretty locked down) that wants to be a test bunny?
- lonewolff
- Ogre Magi
- Posts: 1207
- Joined: Wed Dec 28, 2005 12:58 am
- x 6
Test website
All it does is call up a plain webpage (embedded in the exe) and uses parameter Ogre to display...
Hello Ogre
If you guys could give this a try for me to see if this works as intended or if it fails due to firewall / antivirus etc... That would be awesome.
I am guessing this should work fine for everyone as I cant see how a client system will see this as a security risk as nothing is actually being downloaded to the client machine (exe wise)
-
Zool
- Halfling
- Posts: 49
- Joined: Sat Mar 29, 2008 6:56 pm
- lonewolff
- Ogre Magi
- Posts: 1207
- Joined: Wed Dec 28, 2005 12:58 am
- x 6
Code: Select all
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
void main(int argc, char *args[], char *envp[])
{
char name[128]="",input[4096];
int length;
std::cout<<"Content-type: text/html\n\n";
sscanf(getenv("CONTENT_LENGTH"),"%d",&length);
for(int i=0;i<length;i++)std::cin >>input[i];
input[length]='\0';
sscanf(input,"myname=%s",name);
std::cout<<"<H1>Hello "<<name<<"</H1>\n";
}Let us know how it goes. I would love to test this firewall theory. I believe it will work fine.
- betajaen
- OGRE Moderator

- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
- Contact:
- lonewolff
- Ogre Magi
- Posts: 1207
- Joined: Wed Dec 28, 2005 12:58 am
- x 6
I started thinking about this topic yesterday, as I just started writing an app to email me input from a form from a website. So, far it seems to be working well.
Also using Winsock for that too (with C++).
So, anyone out there having any failures with my link?(<<Here) I am tending to think it will work fine, as nothing is run client side. It is my server generating the webpage dynamically.
So far my logs tell me nine people have tried and no-one has posted to say it didn't work for them. Am I to assume that I am right?
- Nauk
- Gnoll
- Posts: 653
- Joined: Thu May 11, 2006 9:12 pm
- Location: Bavaria
- x 36
- Contact:
The downside probably will show when your application takes on size and becomes more complex, having to hit compile every change is a total nuisance (like .NET based Web-Applications), but then again depends what you want to do with it, but it is certainly fun to toy around with it
Curious to see where you will go with that.
ARTIFEX TERRA 3D - Artist-friendly, free and easy WYSIWYG realtime outdoor scene Editor & Painter
New loader now with Ogre::Terrain support: Addons for Artifex on SourceForge
MOC - Minimal Ogre Collision & Mousepicking
Simple TerrainMaterialGenerator for the use of standard Ogre material with Ogre::Terrain
Support me on Patreon
-
warmi
- Gnoll
- Posts: 674
- Joined: Sun May 27, 2007 3:56 am
- Location: USA
Generally, these apps tend to be I/O bound anyway which means the choice of language is not that important (within reasonable bounds of course)Nauk wrote:I tried and it works fine, I think it is a good way for absolute freedom and creativity because you have nearly no limits there and a nice performance.
The downside probably will show when your application takes on size and becomes more complex, having to hit compile every change is a total nuisance (like .NET based Web-Applications), but then again depends what you want to do with it, but it is certainly fun to toy around with itand you can always add a a scripting language.
Curious to see where you will go with that.
- lonewolff
- Ogre Magi
- Posts: 1207
- Joined: Wed Dec 28, 2005 12:58 am
- x 6
Thanks Nauk. I'll keep you informed.Nauk wrote:I tried and it works fine, I think it is a good way for absolute freedom and creativity because you have nearly no limits there and a nice performance.
The downside probably will show when your application takes on size and becomes more complex, having to hit compile every change is a total nuisance (like .NET based Web-Applications), but then again depends what you want to do with it, but it is certainly fun to toy around with itand you can always add a a scripting language.
Curious to see where you will go with that.
- Thrakbad
- Halfling
- Posts: 73
- Joined: Fri Mar 23, 2007 4:32 pm
- Location: Essen, Germany
- Contact:
- Minthos
- Kobold
- Posts: 37
- Joined: Fri Apr 28, 2006 11:59 pm
- Location: Norway
- Nauk
- Gnoll
- Posts: 653
- Joined: Thu May 11, 2006 9:12 pm
- Location: Bavaria
- x 36
- Contact:
ARTIFEX TERRA 3D - Artist-friendly, free and easy WYSIWYG realtime outdoor scene Editor & Painter
New loader now with Ogre::Terrain support: Addons for Artifex on SourceForge
MOC - Minimal Ogre Collision & Mousepicking
Simple TerrainMaterialGenerator for the use of standard Ogre material with Ogre::Terrain
Support me on Patreon
- paddy
- Greenskin
- Posts: 136
- Joined: Sun Aug 01, 2004 7:07 pm
The C++ code will run very efficiently should it have to do heavy lifting, so the trade off can quickly end up in your favor for any level of work, but for light weight requests it probably drags more.
Of course, if I recall correctly, most CGI based systems (at least on windows servers) work this way, launching the PERL interpreter for each request - but my information could be out of date.
I played with it about 8 years ago or so, but then switched to interpreted languages. Also, I still find URLs with .dll extensions - not sure what the differences are but that could be an avenue as well.