Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Thu Mar 28, 2024 11:06 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
PostPosted: Tue Oct 21, 2008 10:48 am 
Offline
Contributor

Joined: Fri Jul 04, 2008 6:46 am
Posts: 153
Location: USA - WI
I notice that a lot of the time I find myself copy-pasting the name of the machine I want to get to into my nautilus address bar. I think it would probably be possible determine if the person is running linux or windows via HTTP_USER_AGENT then launch a vbs or bourne\bash script accordingly. The linux script could just search for a few of the common file managers in the users path and launch one with the path to the C share on the remote comptuer via smb.

The only draw back is the mime type would probably have to be configured the first time so it uses /bin/bash or /bin/sh to recognize it as an application/x-shellscript. Or would it be possible to modify this using header in php to get it launch right the first time?

Anywho, just a thought.

_________________
OA Server: Debian Squeeze w/ Apache2
Auditing: 700 Workstations, 250 or so Retail Terminals, about 75 Servers
OS's: Windows XP/2003/2008/2008 R2/Vista/7, Debian
LDAP: Active Directory 2008 R2


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 21, 2008 9:39 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
If the first line of the script starts with ...
[code]
#!/bin/bash
[/code]
... then in theory, that's what should launch the script. Give it a whirl and prove me wrong :twisted:

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 21, 2008 10:49 pm 
Offline
Contributor

Joined: Fri Jul 04, 2008 6:46 am
Posts: 153
Location: USA - WI
[quote="A_Hull"]If the first line of the script starts with ...
[code]
#!/bin/bash
[/code]
... then in theory, that's what should launch the script. Give it a whirl and prove me wrong :twisted:


That's what I thought too until I tested it :P

My script seems to only work now if it has a .sh on it. Perhaps I messed my associations up when I first tried it. I'll have to mess around with it later.

_________________
OA Server: Debian Squeeze w/ Apache2
Auditing: 700 Workstations, 250 or so Retail Terminals, about 75 Servers
OS's: Windows XP/2003/2008/2008 R2/Vista/7, Debian
LDAP: Active Directory 2008 R2


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 22, 2008 1:51 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
OK, I had a play with this myself, Firefox doesn't know what to do with the script (well why should it, this is Linux after all, not windows, so we dont just run anything the internet throws at us).

I wrote the following
[code]
#!/bin/sh
konsole
[/code]

Trouble is how to launch it.... then I started thinking we could send a wrapper script, which uses wget to download and execute the real script...

something like (pseudocode)
[code]
#!/bin/sh
wget <URLOF Script> | exec -
[/code]

trouble is Firefox doesn't allow you to do very much by default... so how do we ask it to launch the script.... catch 22 I think.
Any ideas?

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 22, 2008 1:56 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
This might help...

http://developer.mozilla.org/en/How_Moz ... MIME_Types

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 25, 2008 11:05 am 
Offline
Contributor

Joined: Fri Jul 04, 2008 6:46 am
Posts: 153
Location: USA - WI
[quote="A_Hull"]This might help...

http://developer.mozilla.org/en/How_Moz ... MIME_Types


Hmm...looks interesting. I may play around with it in the future to see if I cant get this working the way it probably should. In the mean time I took the lazy way and added a separate remote remote management option under "Explore \\Client\Share" called "Linux Explore \\Client\Share". It just launches a shell script that searches my path for nautilus or konqueror and then launches it with the modified smb path to the machine. Works nice...especially when you have your box joined to the domain with likewise :twisted: Saves me time at least.

_________________
OA Server: Debian Squeeze w/ Apache2
Auditing: 700 Workstations, 250 or so Retail Terminals, about 75 Servers
OS's: Windows XP/2003/2008/2008 R2/Vista/7, Debian
LDAP: Active Directory 2008 R2


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group