Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Replacement for FileSystemObject

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,33940
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Replacement for FileSystemObject
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Replacement for FileSystemObject - 4/26/2006 12:36:20 AM   
  inno

 

Posts: 4
Score: 0
Joined: 4/25/2006
Status: offline
Hello VBScript-Community,

is there another way in vbscript to save files than using the FileSystemObject?

As you might know, every virusprogram in the world will think about a bad script when using methods like FileSystemObject.CreateTextFile etc.

I know that I could configure the virusprogram, but IMHO this makes no sense.

Best regards,

inno
 
 
Post #: 1
 
 RE: Replacement for FileSystemObject - 4/26/2006 1:19:30 AM   
  ebgreen


Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
We use symantec antivirus with no special configuration and it has no problem at all with scripts. Or are you talking about doing this in a web page? that would be the browser security not the AV software. There is no direct replacement for FileSystemObject. You could shell out and use copy commands but I suspect that would pop security warnings as well. Perhaps some more information on what you are trying to do and your environment would help.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to inno)
 
 
Post #: 2
 
 RE: Replacement for FileSystemObject - 4/26/2006 1:42:35 AM   
  DiGiTAL.SkReAM


Posts: 1171
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
I don't know of any AV proggy that will prevent a .vbs from running simply because it tried to create a text file using the FileSystemObject.
Besides, it isn't the script itself that is accessing some FileSystemObject DLL or something... it is merely a way for the script to tell cscript.exe or wscript.exe to access the computer's file system.
So unless you are having a problem with outlook or another mail program/scanner stripping out your vbs code - which doesn't belong in an email inthe first place - I can't imagine what the problem could be...
I think I'm gonna have to call Shenanigans on this one.


_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: Replacement for FileSystemObject - 4/26/2006 1:44:05 AM   
  inno

 

Posts: 4
Score: 0
Joined: 4/25/2006
Status: offline
Hello ebgreen,

quote:

We use symantec antivirus with no special configuration and it has no problem at all with scripts. Or are you talking about doing this in a web page? that would be the browser security not the AV software. There is no direct replacement for FileSystemObject. You could shell out and use copy commands but I suspect that would pop security warnings as well. Perhaps some more information on what you are trying to do and your environment would help.


The scenario in short form:

You can enhance a given application (IBM Personal Communications) with macros written in VBScript. The macro I am talking about reads the content of the main application window into a string and should write this string into a file. For this cause I use the FileSystemObject (with CreateTextFile()) and get the virus warning. The FileSystemObject is not called from a web page.

Environment:    Windows XP with all Service Packs
                        Norton Internet Security 2004/AntiVirus
                       
If you say there is no replacement for FileSystemObject (what I already suggested, too), there will be no other way than configuring the customers virusscanner. I don't know if there will be a virusscanner or which virusscanner will be in use but since this is a general I problem I hoped for a general solution.

Nevertheless, thank you very much for your help !

(in reply to ebgreen)
 
 
Post #: 4
 
 RE: Replacement for FileSystemObject - 4/26/2006 1:54:39 AM   
  ebgreen


Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
What is the exact warning that you get?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to inno)
 
 
Post #: 5
 
 RE: Replacement for FileSystemObject - 4/26/2006 3:02:47 AM   
  ehvbs

 

Posts: 2114
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
Hi inno,

you could try this to test whether ADODB.Stream can fool Norton:


      

(based on code by M. Harris; all errors are mine)

(in reply to ebgreen)
 
 
Post #: 6
 
 RE: Replacement for FileSystemObject - 4/26/2006 7:56:50 PM   
  inno

 

Posts: 4
Score: 0
Joined: 4/25/2006
Status: offline
Hello ehvbs,

yes, your sample code can fool Norton (I don't know if I should really write this )...

Next problem is running an extern program with WScript.Shell.Run() -> virus warning, but I will look for this myself.

If someone needs documentation for ADO, this will help you: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/dasdkadooverview.asp

Thank you very much for your help!


P.S.: If I continue this thread, I should rename it in 'writing macro viruses the smart way'

(in reply to ehvbs)
 
 
Post #: 7
 
 RE: Replacement for FileSystemObject - 4/26/2006 8:06:42 PM   
  ehvbs

 

Posts: 2114
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
Hi inno,

some (rather old) info at

   http://www.heise.de/security/news/meldung/48817

(in german, but I think you can use this as a starting point)

(in reply to inno)
 
 
Post #: 8
 
 RE: Replacement for FileSystemObject - 4/26/2006 8:25:35 PM   
  inno

 

Posts: 4
Score: 0
Joined: 4/25/2006
Status: offline
Thank you ehvbs. I read about disabling adodb.stream in IE but I think/hope in my case (enhancing an application by a macro) this won't affect me.

To your code example:

quote:

oADOStream.CHarset = "ASCII"


If you leave this line out, the file will be saved as Unicode so you don't get problems with german 'umlauts' ä,ö,ü,ß (<-if someone can't see this characters, this are the german 'umlauts').

(in reply to ehvbs)
 
 
Post #: 9
 
 RE: Replacement for FileSystemObject - 5/6/2008 8:37:48 AM   
  Rischip


Posts: 480
Score: 2
Joined: 3/26/2007
Status: offline
The problem here is not the "AntiVirus" portion of Norton. Norton Internet Security has a feature called "Script Blocking" and it is doing exactly what it is configured to do, Block Scripts. Check out the features and maybe reconfigure. Please don't post work arounds for getting around this type of security software as it leads to more virus' that can do exactly that.

_____________________________

Rischip
Author of - The Grim Linker

(in reply to inno)
 
 
Post #: 10
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Replacement for FileSystemObject Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts