NetStumbler.org Forums

Go Back   NetStumbler.org Forums > NetStumbler Community > Scripts
Register Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old 03-04-2004   #1 (permalink)
sh00wan
Registered Member
 
Join Date: May 2002
Posts: 2
Question wscript and netstumbler

OK don't flame me...

I'm trying to write a script that uses the following code

Dim winsock, WScript

set winsock = Wscript.createobject("MSWINSOCK.Winsock", "winsock_")
winsock.Remotehost = "127.0.0.1"
winsock.RemotePort = 695

more script..........bla....bla...bla

Heres the problem, If I execute the the vbscript by dubble clicking on it it runs fine, but if I try to have netstumbler call it I get an error "Microsoft VBScript runtime error: Object required: 'Wscript'"

help a newbie out

PS I have .NET 2003 with WSH installed
sh00wan is offline   Reply With Quote
Old 03-04-2004   #2 (permalink)
nikolatesla20
Registered Member
 
Join Date: Feb 2004
Posts: 27
You don't need to say

WScript.CreateObject

You can just say

CreateObject

When you double click a vbs file a program called wscript.exe runs it, that's why it works when you double click it, because you are simply asking WScript namespace to call CreateObject.

In NS WScript namespace doesn't exist. But you don't need it.

Just curious, why the second argument "winsock_". Second argument is usually the name of the remote computer you wish to create the instance on. Is this your intention? Otherwise you don't need the second arg either..

-niko

Last edited by nikolatesla20 : 03-04-2004 at 10:48 PM.
nikolatesla20 is offline   Reply With Quote
Old 04-25-2004   #3 (permalink)
tlouden
Registered Member
 
tlouden's Avatar
 
Join Date: Apr 2004
Posts: 5
just a guess

just a guess...
NS probably calls the script using cscript and so the wscript object wouldn't exist. In most situations cscript and wscript are pretty much the same.
tlouden is offline   Reply With Quote
Old 06-22-2004   #4 (permalink)
nFinite
Registered Member
 
Join Date: Jun 2004
Posts: 13
ws script

Quote:
Originally Posted by sh00wan
OK don't flame me...

I'm trying to write a script that uses the following code

Dim winsock, WScript

set winsock = Wscript.createobject("MSWINSOCK.Winsock", "winsock_")
winsock.Remotehost = "127.0.0.1"
winsock.RemotePort = 695

more script..........bla....bla...bla

Heres the problem, If I execute the the vbscript by dubble clicking on it it runs fine, but if I try to have netstumbler call it I get an error "Microsoft VBScript runtime error: Object required: 'Wscript'"

help a newbie out

PS I have .NET 2003 with WSH installed

Does vbs work for you?What interesting you have written?
nFinite is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Google
 
Web NetStumbler.org

All times are GMT -7. The time now is 12:11 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 ©2007, Crawlability, Inc.


All messages express the views of the author and are for entertainment purposes only. Netstumbler.org cannot be held responsible for the authenticity of the content or the actions of its members. By using this site and its services, you warrant that you will not post any messages that are discriminating, obscene, hateful, threatening, or otherwise violates any laws and you release Netstumbler.org from any future claims of any kind whatsoever including, but not limited to, addiction and loss of productivity. All forum messages, private messages and any other content are properties of Netstumbler.org. Even if publicly available, personal or copyrighted information are not to be posted without the consent of the owner. Distribution of licensed and copyrighted materials in any way not endorsed by the copyright owner is strictly prohibited. You may not use this site and its resources to spam other sites or individuals or perform any action that violates any law. Items sold or bought in the For Sale forum are sold as is and no warranty or insurance of any kind is provided. Netstumbler.org cannot be held responsible for the outcome of any transactions and no warranty of any kind is provided, either express or implied. Vulgar words are not allowed in the subject lines ; they may be used in the message body in any forum. The Administrator, Super Moderators and Moderators of Netstumbler.org have the right to remove, edit, move or close any thread for any reason and to reveal your identity and other known information in the event of a complaint or legal action arising from any message posted by you.