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 10-02-2005   #1 (permalink)
Xarth
Registered Member
 
Join Date: Mar 2004
Posts: 31
Completed GPS Alternative Script

Well, I spent more and more time on google... didn't help. Finally got it, if you want it, here it is! The alternative solution to GPS...

A video stream!


Code:
const nameScript = "NS/VDub Overlay Script"

Dim fso, StumbleSubFile
Dim StartTime, DifferenceTime
Dim LastRecord

Set fso = CreateObject("Scripting.FileSystemObject")

Sub OnEnableScan()
	Set StumbleSubFile = fso.CreateTextFile("C:\Stumbles\StumbleSub.ssa", True)
	
	StumbleSubFile.WriteLine("[Script Info]")
	StumbleSubFile.WriteLine("Title: NetStumbler 'WebCam GPS Replacement'")
	StumbleSubFile.WriteLine("Original Script: Assassin Bunnie <assassin@bunnie.net>")
	StumbleSubFile.WriteLine("ScriptType: v4.00")
	StumbleSubFile.WriteLine("Collisions: Normal")
	StumbleSubFile.WriteLine("PlayResY: 240")
	StumbleSubFile.WriteLine("PlayDepth: 0")
	StumbleSubFile.WriteLine("Timer: 100.0000")
	StumbleSubFile.WriteLine("")
	StumbleSubFile.WriteLine("[V4 Styles]")
	StumbleSubFile.WriteLine("Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding")
	StumbleSubFile.WriteLine("Style: MainB,Arial,14,65535,65280,65535,0,0,-1,1,2,4,1,16,16,16,0,0")
	StumbleSubFile.WriteLine("Style: MainT,Arial,14,65535,65280,65535,0,0,0,1,2,4,5,16,16,16,0,0")
	StumbleSubFile.WriteLine("Style: Timer,Arial,14,65535,65280,65535,0,0,-1,1,2,4,5,16,16,40,0,0")
	StumbleSubFile.WriteLine("Style: B0S0K,Arial,14,&HE0E0E0,65280,65535,&H000000,0,-1,1,0,0,5,16,16,40,0,0")
	StumbleSubFile.WriteLine("Style: B2S2R,Arial,14,&HE0E0E0,65280,65535,&H004080,0,-1,1,2,2,5,16,16,40,0,0")
	StumbleSubFile.WriteLine("Style: B2S6G,Arial,14,&HE0E0E0,65280,65535,&H408000,0,-1,1,2,6,5,16,16,40,0,0")
	StumbleSubFile.WriteLine("Style: B4S4B,Arial,14,&HE0E0E0,65280,65535,&H804000,0,-1,1,4,4,5,16,16,40,0,0")
	StumbleSubFile.WriteLine("Style: Karaoke,Arial,14,&H40FFFF,&HFF4040,65535,0,0,0,1,2,4,5,16,16,16,0,0")
	StumbleSubFile.WriteLine("Style: ShiftJIS,MS Gothic,20,&HE0E0E0,65280,65535,0,0,0,1,2,4,5,16,16,16,0,128")
	StumbleSubFile.WriteLine("")
	StumbleSubFile.WriteLine("[Events]")
	StumbleSubFile.WriteLine("Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text")
	StumbleSubFile.WriteLine("")
	
	StartTime = Timer
	LastRecord = StartTime
End Sub

'######################################################################
Sub OnScanResult(SSID, BSSID, CapFlags, Signal, Noise, LastSeen)
'######################################################################
	' SSID : String : SSID (Network name)
	' BSSID : String : BSSID (MAC address)
	' CapFlags : Integer : 802.11 capability flags
	' Signal : Integer : signal level (dBm)
	' Noise : Integer : noise level(dBm)
	' LastSeen : Time

	DifferenceTime = Timer - StartTime

	TimeString = Int(DifferenceTime / 3600) & ":"
	DifferenceTime = DifferenceTime - Int(DifferenceTime / 3600)
	TimeString = Timestring & Int(DifferenceTime / 60) & ":"
	DifferenceTime = DifferenceTime - Int(DifferenceTime / 60)
	TimeString = Timestring & Int(DifferenceTime) & "."
	DifferenceTime = DifferenceTime - Int(DifferenceTime)

	If LastRecord <> DifferenceTime Then
		StumbleSubFile.WriteLine("Dialogue: Marked=0," & TimeString & "00," & TimeString & "99,MainB,,0000,0000,0000,!Effect,{\a5\c&HE0E0E0&}" & SSID & " " & BSSID & " " & Signal)
		LastRecord = DifferenceTime
	End If
End Sub

Sub OnDisableScan()
	StumbleSubFile.Close
End Sub
Now, before I'd been trying to overlay the caption onto the vid in real time, but all OCXes I could find wanted money to not be faulty in some way - perfectly reasonable ^_^ It occured to me tonight that the way to do it is _after_ the drive.

Therefore... using VirtualDub (use our friend Google to find it ^_^), a perfectly free video editing program, as well as the VirtualDub Subtitler 2.4 filter, you can record the video stream from whatever device you have (in my case, a webcam strapped to the dash), then add on the data created by the script later.

It might be a second off, because you have to start recording the vid and start the scan at essentially the same time... but yea, it's pretty cool ^_^ To see an example, if you have the divx codec, check out h**p://assassin.bunnie.net/nsvid/VDubStumbleSubbed.avi . If you'd like to know more, let me know.

Please accept that I'm very tired and this might not be wholly perfect yet, consider it a "Version 1". If it's shit, let me know! If it's not a pile of bloody fecies... let me know! :-P
__________________
An assassin needs no blade, only their stealth.

Last edited by Thorn : 10-03-2005 at 05:16 AM. Reason: Encase script in Code tags
Xarth is offline   Reply With Quote
Old 10-02-2005   #2 (permalink)
streaker69
Psychic Amish Stumbler
 
streaker69's Avatar
 
Join Date: Jul 2004
Location: Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA
Posts: 11,713
Maybe I'm missing the coolness of this, but what's the point? You're overlaying stumbled data onto a video stream you're recording from your dash, why? I just don't seem to get it, maybe it's because zippers are wicked.
__________________
"One of these days, I'm going to cut you to pieces."

If you're offended by this post, please feel free to report it to one of the many helpful moderators of this forum.

Thank you.
streaker69 is offline   Reply With Quote
Old 10-02-2005   #3 (permalink)
Xarth
Registered Member
 
Join Date: Mar 2004
Posts: 31
Quote:
Originally Posted by streaker69
Maybe I'm missing the coolness of this, but what's the point? You're overlaying stumbled data onto a video stream you're recording from your dash, why? I just don't seem to get it, maybe it's because zippers are wicked.
Zippers? Please explain... and it's cool to me because I don't have a GPS and am pretty darn cheap, so I picked up a Creative Instant Webcam (USB) that someone was gonna get rid of (they cost about $20 anyways, $10 on sale...) and decided I'd use it to record my drive. Sorry if it's not as cool to others, but I think it's a pretty decent GPS alternative ^_^ I'll go on a drive when it's light out (I finally got this working tonight ~11:30 PM), and do it again, then throw up a more complete stumble. Thanks for checking out the vid though, ignore the stupid dancing - I needed 20 seconds of vid XD

Oh, almost forgot... I also like the ability to show people just what stumbling is like. If I'm with some friends, we can have fun with the webcam (goofy faces and whatnot) in the car while stumbling, and you can actually _show_ people what it's like. Plus you can have fun with nifty effects XD Numbers and data are great, but I think this is a fun way to stumble.

Oh, and one more thing - there's a flaw in the way I did the timing, since I kinda cluged it together, and that is that if you start running it _before_ midnight, and you're still running it _after_ midnight, the system will get all messed up. This is because for the timing I used the vbscript "Timer" function, which basically returns how many seconds (to the tenth's place) it's been since midnight. Yes... so if anyone else is so inclined to run this (who am I kiddin', right? XD), don't start before midnight and end after midnight... unless you stop it before midnight and then start it up again right after midnight. Yes... :-P
__________________
An assassin needs no blade, only their stealth.

Last edited by Xarth : 10-02-2005 at 09:02 PM.
Xarth is offline   Reply With Quote
Old 10-03-2005   #4 (permalink)
Thorn
Did you do the math?
 
Thorn's Avatar
 
Join Date: Apr 2002
Location: Villa Straylight
Posts: 10,042
Recording video is a neat idea, and may have some interesting uses.

However, even the cheapest video recording cameras are 10 times the cost of the cheapest GPS receivers; ($500 v. $50). So unless you've got a video recorder already, it makes more sense to just buy a VCR.

Even using a webcam, you're still spending about the same amount of cash.
__________________
Thorn
"Lawyers should never marry lawyers. This is called inbreeding. It produces idiot children and more lawyers."

Last edited by Thorn : 10-03-2005 at 05:17 AM.
Thorn is offline   Reply With Quote
Old 10-03-2005   #5 (permalink)
Xarth
Registered Member
 
Join Date: Mar 2004
Posts: 31
Quote:
Originally Posted by Thorn
Recording video is a neat idea, and may have some interesting uses.

However, even the cheapest video recording cameras are 10 times the cost of the cheapest GPS receivers; ($500 v. $50). So unless you've got a video recorder already, it makes more sense to just buy a VCR.

Even using a webcam, you're still spending about the same amount of cash.
Not video recording cams - waaay too expensive, you're totally right ^_^ And thanks for the admittance that it might be even slightly useful XD The webcam is pretty cheap, and I had one laying around :-D Gonna go a'stumblin', use this prog, and hopefully make a nice lil' vid of it I'll let you all know how it goes!
__________________
An assassin needs no blade, only their stealth.
Xarth is offline   Reply With Quote
Old 10-03-2005   #6 (permalink)
The Others
PeaceDriver
 
The Others's Avatar
 
Join Date: Apr 2002
Location: Dos Palabras, Mandoras
Posts: 2,920
That's pretty cool; I like it. I've seen a webcam kicking round the house somewhere, think I might try it out. My only question is this, can it work as well as GPS?

I'm trying to get to grips with video as an alternative medium to text and your script is a nice perspective on the already blurring pc/video/art divide.

All I hope is that you push it further. It was a nice concept you demonstrated, now I hope you'll work on it further.
__________________
all good ends all

?u=273
The Others is offline   Reply With Quote
Old 10-03-2005   #7 (permalink)
Xarth
Registered Member
 
Join Date: Mar 2004
Posts: 31
Quote:
Originally Posted by The Others
That's pretty cool; I like it. I've seen a webcam kicking round the house somewhere, think I might try it out. My only question is this, can it work as well as GPS?

I'm trying to get to grips with video as an alternative medium to text and your script is a nice perspective on the already blurring pc/video/art divide.

All I hope is that you push it further. It was a nice concept you demonstrated, now I hope you'll work on it further.
Well I'm glad you think that ^_^

Just so you know, the above script is bad... I forgot some math computations, so here's an updated one (consider it v1.1)

Code:
const nameScript = "NS/VDub Overlay Script"

Dim fso, StumbleSubFile
Dim StartTime, DifferenceTime
Dim LastRecord

Set fso = CreateObject("Scripting.FileSystemObject")

Sub OnEnableScan()
	Set StumbleSubFile = fso.CreateTextFile("C:\Stumbles\StumbleSub.ssa", True)
	
	StumbleSubFile.WriteLine("[Script Info]")
	StumbleSubFile.WriteLine("Title: NetStumbler 'WebCam GPS Replacement'")
	StumbleSubFile.WriteLine("Original Script: Assassin Bunnie <assassin@bunnie.net>")
	StumbleSubFile.WriteLine("ScriptType: v4.00")
	StumbleSubFile.WriteLine("Collisions: Normal")
	StumbleSubFile.WriteLine("PlayResY: 240")
	StumbleSubFile.WriteLine("PlayDepth: 0")
	StumbleSubFile.WriteLine("Timer: 100.0000")
	StumbleSubFile.WriteLine("")
	StumbleSubFile.WriteLine("[V4 Styles]")
	StumbleSubFile.WriteLine("Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding")
	StumbleSubFile.WriteLine("Style: MainB,Arial,14,65535,65280,65535,0,0,-1,1,2,4,1,16,16,16,0,0")
	StumbleSubFile.WriteLine("Style: MainT,Arial,14,65535,65280,65535,0,0,0,1,2,4,5,16,16,16,0,0")
	StumbleSubFile.WriteLine("Style: Timer,Arial,14,65535,65280,65535,0,0,-1,1,2,4,5,16,16,40,0,0")
	StumbleSubFile.WriteLine("Style: B0S0K,Arial,14,&HE0E0E0,65280,65535,&H000000,0,-1,1,0,0,5,16,16,40,0,0")
	StumbleSubFile.WriteLine("Style: B2S2R,Arial,14,&HE0E0E0,65280,65535,&H004080,0,-1,1,2,2,5,16,16,40,0,0")
	StumbleSubFile.WriteLine("Style: B2S6G,Arial,14,&HE0E0E0,65280,65535,&H408000,0,-1,1,2,6,5,16,16,40,0,0")
	StumbleSubFile.WriteLine("Style: B4S4B,Arial,14,&HE0E0E0,65280,65535,&H804000,0,-1,1,4,4,5,16,16,40,0,0")
	StumbleSubFile.WriteLine("Style: Karaoke,Arial,14,&H40FFFF,&HFF4040,65535,0,0,0,1,2,4,5,16,16,16,0,0")
	StumbleSubFile.WriteLine("Style: ShiftJIS,MS Gothic,20,&HE0E0E0,65280,65535,0,0,0,1,2,4,5,16,16,16,0,128")
	StumbleSubFile.WriteLine("")
	StumbleSubFile.WriteLine("[Events]")
	StumbleSubFile.WriteLine("Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text")
	StumbleSubFile.WriteLine("")
	
	StartTime = Timer
	LastRecord = StartTime
End Sub

'######################################################################
Sub OnScanResult(SSID, BSSID, CapFlags, Signal, Noise, LastSeen)
'######################################################################
	' SSID : String : SSID (Network name)
	' BSSID : String : BSSID (MAC address)
	' CapFlags : Integer : 802.11 capability flags
	' Signal : Integer : signal level (dBm)
	' Noise : Integer : noise level(dBm)
	' LastSeen : Time

	DifferenceTime = Timer - StartTime

	TimeString = Int(DifferenceTime / 3600) & ":"
	DifferenceTime = DifferenceTime - (Int(DifferenceTime / 3600) * 3600)
	TimeString = Timestring & Int(DifferenceTime / 60) & ":"
	DifferenceTime = DifferenceTime - (Int(DifferenceTime / 60) * 60)
	TimeString = Timestring & Int(DifferenceTime) & "."
	DifferenceTime = DifferenceTime - Int(DifferenceTime)

	If LastRecord <> DifferenceTime Then
		StumbleSubFile.WriteLine("Dialogue: Marked=0," & TimeString & "00," & TimeString & "99,MainB,,0000,0000,0000,!Effect,{\a5\c&HE0E0E0&}" & SSID & " " & BSSID & " " & Signal)
		LastRecord = DifferenceTime
	End If
End Sub

Sub OnDisableScan()
	StumbleSubFile.Close
End Sub
The old one would mess up past 1 minute, which I admittedly hadn't tried, because of the DifferenceTime = DifferenceTime - (Int(DifferenceTime / 60) * 60) (and similar) lines. They're fixed now, or rather... should be... I messed up my 12 minute demo drive, but I'ma do a quick walk around the block to try it out again
__________________
An assassin needs no blade, only their stealth.

Last edited by Thorn : 10-03-2005 at 01:11 PM. Reason: Encased script in Code tags
Xarth is offline   Reply With Quote
Old 10-03-2005   #8 (permalink)
Thorn
Did you do the math?
 
Thorn's Avatar
 
Join Date: Apr 2002
Location: Villa Straylight
Posts: 10,042
Please use the CODE tags around scripts. That's the # button on the editing page.
__________________
Thorn
"Lawyers should never marry lawyers. This is called inbreeding. It produces idiot children and more lawyers."
Thorn is offline   Reply With Quote
Old 10-03-2005   #9 (permalink)
renderman
Drunken Stumbler
 
renderman's Avatar
 
Join Date: Jun 2002
Location: Anywhere but Utah
Posts: 1,794
I could see this being an interesting tool to use when doing a rogue hunt in an office. You'd get the SSID of the culprit as well as the look on thier face when you crush it on thier desk in front of them
renderman is offline   Reply With Quote
Old 10-03-2005   #10 (permalink)
Thorn
Did you do the math?
 
Thorn's Avatar
 
Join Date: Apr 2002
Location: Villa Straylight
Posts: 10,042
So will v3.0 of the Official Render WarPack* (TM and Pat. Pending) have full video playback?


*Kids! Hound your parents! You want to be totally cool, don't you? Be the first on your block to own a WarPack! Only $1999.99 US! Make checks out to the Canadian Anti-Sobriety Home, or CASH.
__________________
Thorn
"Lawyers should never marry lawyers. This is called inbreeding. It produces idiot children and more lawyers."
Thorn is offline   Reply With Quote
Old 10-03-2005   #11 (permalink)
Xarth
Registered Member
 
Join Date: Mar 2004
Posts: 31
I'm very sorry about that - I'll be glad to in the future.

But hey, it worked! I went for a walk around the block... don't feel like processing the vid, so I saved a frame - Frame Sample. Check it out I'll fix it up and release a v1.2 asap, but yea... hehehehe...
__________________
An assassin needs no blade, only their stealth.
Xarth is offline   Reply With Quote
Old 10-03-2005   #12 (permalink)
renderman
Drunken Stumbler
 
renderman's Avatar
 
Join Date: Jun 2002
Location: Anywhere but Utah
Posts: 1,794
Quote:
Originally Posted by Thorn
So will v3.0 of the Official Render WarPack* (TM and Pat. Pending) have full video playback?
Includes really-big-hammer (TM)!

Quote:
*Kids! Hound your parents! You want to be totally cool, don't you? Be the first on your block to own a WarPack! Only $1999.99 US! Make checks out to the Canadian Anti-Sobriety Home, or CASH.
I am so going to steal that sometime. Very BOFH of you.

Need budget first before I go with the Mark 3. Besides I don't want to haul anything that big out to shmoocon ever again, so development is waiting till after then.

I do like the idea of video recording, especially during the contests. Could make for some entertaining viewing afterwards of the drunken stumbling/hacking.

Hmm.....
renderman is offline   Reply With Quote
Old 10-03-2005   #13 (permalink)
Thorn
Did you do the math?
 
Thorn's Avatar
 
Join Date: Apr 2002
Location: Villa Straylight
Posts: 10,042
Quote:
Originally Posted by Xarth
I'm very sorry about that - I'll be glad to in the future.
No problem, it just makes looking at code a lot easier that way. Plus it saves the indents and other edits.
Quote:
Originally Posted by Xarth
But hey, it worked! I went for a walk around the block... don't feel like processing the vid, so I saved a frame - Frame Sample. Check it out I'll fix it up and release a v1.2 asap, but yea... hehehehe...
Very cool.
Quote:
Originally Posted by renderman
I am so going to steal that sometime. Very BOFH of you.
Anytime.
__________________
Thorn
"Lawyers should never marry lawyers. This is called inbreeding. It produces idiot children and more lawyers."
Thorn is offline   Reply With Quote
Old 10-03-2005   #14 (permalink)
Xarth
Registered Member
 
Join Date: Mar 2004
Posts: 31
Quote:
Originally Posted by Thorn
So will v3.0 of the Official Render WarPack* (TM and Pat. Pending) have full video playback?


*Kids! Hound your parents! You want to be totally cool, don't you? Be the first on your block to own a WarPack! Only $1999.99 US! Make checks out to the Canadian Anti-Sobriety Home, or CASH.
It already does, haha. The thing is complete, there are a few "flaws" to work out (such as when multiple networks are displayed within a second, but on different scans in that second)... i need to make an array or somesuch and combine them. Also, I was running it on the slowest scanning speed - I have yet to speed it up and try it ^_^

Glad you're all having fun though, and if you have any suggestions, let me know!
__________________
An assassin needs no blade, only their stealth.
Xarth is offline   Reply With Quote
Old 10-03-2005   #15 (permalink)
streaker69
Psychic Amish Stumbler
 
streaker69's Avatar
 
Join Date: Jul 2004
Location: Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA
Posts: 11,713
Quote:
Originally Posted by renderman
Includes really-big-hammer (TM)!



I am so going to steal that sometime. Very BOFH of you.

Need budget first before I go with the Mark 3. Besides I don't want to haul anything that big out to shmoocon ever again, so development is waiting till after then.

I do like the idea of video recording, especially during the contests. Could make for some entertaining viewing afterwards of the drunken stumbling/hacking.

Hmm.....
Obviously you need to come down and spend some time in the Galapagosian Workshop. If we can't build it in there, it can't be built.
__________________
"One of these days, I'm going to cut you to pieces."

If you're offended by this post, please feel free to report it to one of the many helpful moderators of this forum.

Thank you.
streaker69 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 08:05 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.