how to redirect user to web admin interface of my device? - c

how to redirect user to web admin interface of my device?
I am using following in my project.
httpd of busybox as http server.
html files/js/css to create web pages.
I don't have any kind of apache like servers.
cgi.
C language and linux.
16 MB FLASH.
User will connect to device via wifi. When the user want to access the internet via wifi then he should be first redirected to my web page.
The research which I have made is: I need captive portal for this. Truly speaking I have no idea how to implement captive portal and what it is. I have found that wifidog,chilispot and Nocatsplash are such kind of captive portals which are free.
After compiling the wifidog I have found that to run that I need iptables. By doing necessary changes in kernel I am at that stage that I can run wifidog. But when I run the wifidog I have to configure in the wifidog.conf. I have try to do that. I have added some parameters like :
ExternalInterface br0,
GatewayInterface br0,
AuthServer {
Hostname auth.ilesansfil.org
}
I have tried to access my board in which wifidog is running using my browser but I am not getting anything related to wifidog. It just gives my admin page.
One thing is there is no master device in my project. All device should work the same way.
Would anyone please help me on this issue?

As far I as understand - yes, you are on right track.
What you need now is AuthPuppy: https://launchpad.net/authpuppy

Related

How can I access the Planon app from my (personal) laptop?

I cannot access anymore the planon application using the link provided in Tellit (http://prod478.prod.telenet.be:18070/startpage/PROD/START).
I get this error message in my browser:
enter image description here
Tried restarting VPN (Palo Alto), different browsers, incognito mode, restarting laptop, ...
Found out the problem is the app has been migrated to a server which is not accessible through VPN.
You need to access it through Remote Desktop.
One possible way to achieve this is go to this link : https://rdweb.wvd.microsoft.com/arm/webclient
then yo can use the provided Edge browser to browse to the Planon app.
However in order to do so, you need to request one additional TIM right:
(A) AVD - AG - PRD - Digital Solutions (Groups Azure Virtual Desktop)
I had also asked this one PA_Planon (Groups SSL VPN), but suppose it was not useful anymore as VPN access is not allowed.

Open nuke software through chrome?

How to open a desktop application(like Nuke) through browser.
for example: RV software have a url protocol. we can use that (rvlink://).
I think this is what you're looking for:
https://support.shotgunsoftware.com/hc/en-us/articles/219031308-Launching-applications-using-custom-browser-protocols
Note that this is asking your operating system to "launch the thing registered with the requested custom browser protocol". Similarly you can have a hyperlink mailto:/// which opens the email application registered on the users computer. rvlink:/// is registered by RV as one of these custom browser protocols during it's installation.
If you want more control you would need a process running on the user's machine that you interact with. For example that's the approach shotgun's competitor ftrack took leveraging a local process they call ftrack connect (http://ftrack-connect.rtd.ftrack.com/en/0.1.17/developing/tutorial/custom_applications.html)
If you want to run something completely custom you could take a look at running your own RPC. You would initiate the registered RPC command from the web application. Check out http://www.zerorpc.io/ or https://crossbar.io/ for some more information.
Good luck!
I spotted in an earlier response of yours that you're using Shotgun and it's launch in RV features. In which case - are you aware of Shotgun Toolkit?
https://support.shotgunsoftware.com/hc/en-us/articles/219039788-Toolkit-Home-Page
It provides app launching via the website, which it accomplishes via Shotgun desktop (a desktop app). It used to work via a browser method that chrome etc moved away from so now requires the desktop app hook.
There's actually a huge amount that SGTK does, though I think you might be able to disable everything except the app launching if you wanted. We've got it implemented across 4 locations here and it's pretty decent.

SOAP UI not able to talk to Salesforce whereas browser can

I am not able to connect to https://test.salesforce.com/services/oauth2/token form SoapUI (ver 5.2.1). I have tried the PRO version and other older versions (4.6.xx) as well.
I can access the website from the web-browser. The GET to this URL gives me the response where as SOAPUI says HttpHostConnectException connection to https://test.salesforce.com/ refused.
I have checked that there is direct connection available from my PC to this address. I have tried adding https.proxyHost and https.proxyPort settings in soapui.vmoptions and sopaui.bat but of no use.
I have also tried playing around with Preemptive Authentication settings in SOAPUI without success
My organization has firewall which has white listed this address. I have also confirmed that firewall settings does allow to connect thru non standard clients (such as ApacheHttpClient).
If I use a Java Program using URLConnection using the proxy, it works.
At this point it seems to me that SOAPUI is not honoring the proxy settings.
Please share if anyone has similar experience and how did they resolve it.
Regards
Ash

Making a WP7 HttWebRequest POST with an untrusted cert?

I'm working on a Windows Phone 7 application that makes a REST service call. The third party that hosts the web services has an invalid certificate in the current environment. When I hit the URL in Firefox, I get a warning about the cert and I am asked if I want to continue. I'm also using the Poster FF extension to test the call. It works with Poster if I first accept the invalid cert in Firefox. If I don't, then POSTER wont make the request.
In my WP7 Emulator, I can't make the request at all. I get a 404 at the EndGetResponse method. I making the same request as in Poster, so I know there is nothing wrong with the request. I have successfully hit another web service using the same code (no certs involved), so I don't think it's the code. The only thing I can think of is that WP7 doesn't allow requests to an invalid cert. Has anyone had experience with this situation? Is there any way around it?
Is there a way I can tell my app to accept all communication, even if there is an invalid cert?
There is sadly no way to do this on the phone. Ordinarily, i.e. on the desktop this simple line of code will disable certificate checking.
System.Net.ServicePointManager.ServerCertificateValidationCallback = (se, cert, chain, sslError) => { return true; };
If you look at the ServicePointManager on the phone, there's no callback to hook into. It's a massive pain in the arrrrse.
Have you considered writing to the service owner and asking why they're being bad internet citizens? (essentially, what you're seeing here is web security in action, for better or worse)
As Matt says, you might be able to code a simple relay on a web server. It doesn't have to be a special service, but maybe just a web page that does the call for you and spits out RAW text or XML. Your phone client just GETs this page and picks through the response manually.
Where there's a will there's a way.
Luke
You need to install the root CA cert of the issuing party on the phone.
You can do this by emailing the RootCA to the user of the phone. They click on the attachement and it will prompt them to ask if they want to install the certificate on the phone.
Once you have done that your requests should go through.
I dont believe there is a way to do this programatically in your app however.
I'm not aware of a way to install additional certificates on the phone.
In this situation I'd create a proxy service between your app and the 3rd party site and have your app call that. If you need to, you could put the proxy behind a valid cert.

Using a subdomain to identify a client

I'm working on building a Silverlight application whereas we want to be able to have a client hit a url like:
http://{client}.domain.com/
and login, where the {client} part is their business name. so for example, google's would be:
http://google.domain.com/
What I was wondering was if anyone has been able, in silverlight, to be able to use this subdomain model to make decisions on the call to the web server so that you can switch to a specific database to run a query? Unfortunately, it's something that is quite necessary for the project, as we are trying to make it easy for their employees to get their company specific information for our software.
Wouldn't it work to put the service on a specific subdomain itself, such as wcf.example.com, and then setup a cross domain policy file on the service to allow it to access it?
As long as this would work you could just load the silverlight in the proper subdomain and then pass that subdomain to your service and let it do its thing.
Some examples of this below:
Silverlight Cross Domain Services
Silverlight Cross Domain Policy Helpers
On the server side you can check the HTTP 1.1 Host header to see how the user came to your server and do the necessary customization based on that.
I think you cannot do this with Silverlight alone, I know you cannot do this without problems with Javascript, Ajax etc. . That is because a sub domain is - for security reasons - treated otherwise than a sub-page by the browsers.
What about the following idea: Insert a rewrite rule to your web server software. So if http://google.domain.com is called, the web server itself rewrites the URL to something like http://www.domain.com/google/ (or better: http://www.domain.com/customers/google/). Would that help?
Georgi:
That would help if it would be static, but alas, it's going to all be dynamic. My hope was to have 1x deployment for the application, and to use the http://google.domain.com/ idea to switch to the correct database for the user. I recall doing this once when we built an asp.net website, using the domain context to figure out what skin to use, etc.
Ates: Can you explain more about what you are saying... sounds like you are close to what I am trying to come up with. Have you seen such a tutorial for this?
The only other way I have come up with to make this work is to have a metabase that when the user logs in, it will switch them to the appropriate database as required... was just thinking as well that telling Client x to hit:
http://ClientX.domain.com/ would have been sweeter than saying to hit http://www.domain.com/ and login. It seemed as if they were to hit their name, and to show it personalized for them right from the login screen would have been much more appealing for the client base.
#Richard B: No, I can't think of any such tutorial that I've seen before. I'll try to be more verbose.
The server-side approach in more detail:
Direct *.example.com to the same IP in your DNS settings.
The backend app that handles login checks the Host HTTP header (e.g. the "HTTP_HOST" server variable in some platforms). That would contain the exact subdomain.example.com that the client used for reaching your server. Extract the subdomain part and continue...
There can also be a client-side-only approach. I don't know much about Silverlight but I'm assuming that you should be able to interface Silverlight with JavaScript. You could read document.location with JavaScript and pass it to your Silverlight applet, whereon further data fetching etc. logic would rely on the subdomain that was passed in by JavaScript.
#Ates:
That is what we did when we wrote the ASP.Net system... we pushed a slew of *.example.com hosts against the web server, and handled using the HTTP headers. The hold-up comes when dealing with WCF pushing the info between the client and the server... it can only exist in one domain...
So, for example, when you have {client}.example.com and {sandbox}.example.com, the WCF service can't be registered to both. It also cannot be registered to just *.example.com or example.com, so that's where the catch 22 is coming in at. everything else I have the prior knowledge of handling.
I recall a method by which an application can "spoof" another domain name in certain instances. I take it in this case, I would need to do such a configuration? Much to research yet I believe.

Resources