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 08-22-2006   #1 (permalink)
jlskill@aol.com
John S
 
Join Date: Aug 2006
Location: Dekalb, IL
Posts: 4
Arrow NetStumbler From VB Script

Ok...If you saw my previous posting you know I could not get NetStumbler to talk to VB6.0, so thought Id better FIRST be sure I could get it to talk to VB Script. So I tried:


---------------------------------------------------
'---- My Test Script with NetStumbler ---
Dim cnt:cnt=0
Dim ExitNow:ExitNow=False
WScript.Echo "Start"
'----
'Dim STUM: set STUM= Wscript.GetObject_("NetStumbler.exe","EV")
DIM TTS: Set TTS=createobject("sapi.Spvoice")
'----
TTS.Priority=2
TTS.Speak "START!!"
TTS.Speak "GO GO"
Do

cnt=cnt+1
if cnt>5000000 then
TTS.Speak "Still Running"
cnt=0
' WScript.Echo "TimeOut. Quit"
' ExitNow=True
end if

Loop Until ExitNow
on error resume next

WScript.Echo "Error Exit"

'--------- Events ---------------

Sub OnScanResult (SSID,BSSID,capFlags,Signal,LastSceen)
WScript.Echo "A Scan Completed"
TTS.Speak "Got Event!"
end sub
------------------------------------

This never gets an 'OnScanResult' Event So Ive obviously left something out.
I could not figure how to bind the NetStumbler.exe runninmg on my computer to this script. I dont know the progID I guess.
----
From above you can see I tried;

Dim STUM: set STUM= Wscript.GetObject_("NetStumbler.exe","EV")

But that did not compile, I would guess cause "NetStumbler.exe" was the wrong progID?
----
I looked thru the ns04Master.vbs script provided, but could not see in there where this binding was carrierd out.

Can someone streighten me out on this?

Thanks,

John
jlskill@aol.com is offline   Reply With Quote
Old 08-22-2006   #2 (permalink)
wrzwaldo
I amuse you?
 
Join Date: Dec 2003
Posts: 9,127
Looks like a good post for the "Scripts" forum.
wrzwaldo is offline   Reply With Quote
Old 08-22-2006   #3 (permalink)
G8tK33per
Asshole Emeritus
 
G8tK33per's Avatar
 
Join Date: May 2003
Location: S.E. VA.
Posts: 5,939
Moved.
__________________
"Benjamin is nobody's friend. If Benjamin were an ice cream flavor, he'd be pralines and dick."

Sons of Confederate Veterans
G8tK33per is offline   Reply With Quote
Old 08-26-2006   #4 (permalink)
tpeer
Registered Member
 
Join Date: Apr 2004
Posts: 21
Instead of running netstumbler from vb, it might be easier to make netstumbler write a log file using a script, and have your vb program monitor the log file...

Ted
tpeer is offline   Reply With Quote
Old 08-26-2006   #5 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
Quote:
Originally Posted by jlskill@aol.com
Ok...If you saw my previous posting you know I could not get NetStumbler to talk to VB6.0, so thought Id better FIRST be sure I could get it to talk to VB Script. So I tried:


---------------------------------------------------
'---- My Test Script with NetStumbler ---
Dim cnt:cnt=0
Dim ExitNow:ExitNow=False
WScript.Echo "Start"
'----
'Dim STUM: set STUM= Wscript.GetObject_("NetStumbler.exe","EV")
DIM TTS: Set TTS=createobject("sapi.Spvoice")
'----
TTS.Priority=2
TTS.Speak "START!!"
TTS.Speak "GO GO"
Do

cnt=cnt+1
if cnt>5000000 then
TTS.Speak "Still Running"
cnt=0
' WScript.Echo "TimeOut. Quit"
' ExitNow=True
end if

Loop Until ExitNow
on error resume next

WScript.Echo "Error Exit"

'--------- Events ---------------

Sub OnScanResult (SSID,BSSID,capFlags,Signal,LastSceen)
WScript.Echo "A Scan Completed"
TTS.Speak "Got Event!"
end sub
------------------------------------

This never gets an 'OnScanResult' Event So Ive obviously left something out.
I could not figure how to bind the NetStumbler.exe runninmg on my computer to this script. I dont know the progID I guess.
----
From above you can see I tried;

Dim STUM: set STUM= Wscript.GetObject_("NetStumbler.exe","EV")

But that did not compile, I would guess cause "NetStumbler.exe" was the wrong progID?
----
I looked thru the ns04Master.vbs script provided, but could not see in there where this binding was carrierd out.

Can someone streighten me out on this?

Thanks,

John
You are doing it the wrong way around. It is not VBscript talking to NS, it is NS talking to VBScript. You get NS to run the script, just like the way the masterscript is run, not the script to run NS.
Start NS, then select the script you want to run from within NS. It can be VBScript, it can be Perl, or whatever other scriptinglanguage engine you have installed on your system.
Read the scripting API on the authors website, for available calls, and how to use it.

Dutch
__________________
All your answers are belong to Google. SEARCH DAMMIT!
Warning. Warning.
Low C8H10N4O2 level detected. Operator halted....
Dutch 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 04:35 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, 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.