Home |
Add a script
|
||
|---|---|---|---|
| Category: | Contributor: | Description | |
| Spy | Sparti Carroll | Mission Spy | |
it spies on other AVs
Caution. Use of this script may violate the TOS. Think of it as a weapon Don't use this to spy on people without their permission NO REALLY - DON'T SECURITY I take the Open Source security software attitude to this. You can't increase security through obscurity. All users of SL should be aware that tiny, invisible objects might be relaying their conversations to other AVs, or even sending IMs or HTTP messages out of SL. A bit like real life really, it's just that bugging is easier in SL. If you want a semblance of privacy then use a one time pad code end to end in a sim which is completely off limits to all except your invited guests; deny others the ability to execute scripts or place objects; return all objects and check for running scripts (using estate tools) before you start your conversation.
Download this script - Please use this link to get this script. If you see all the code on one long line, please use Wordpad or another editor, such as LSLEdit.exe. The .LSL file you will download is an ordinary text file.
1 2 3 // Mission Spy 4 5 //Simple OpenSource Licence (I am trusting you to be nice) 6 //1. PLEASE SEND ME UPDATES TO THE CODE 7 //2. You can do what you want with this code and object including selling it in other objects and so on. 8 //You can sell it in closed source objects if you must, but please try to send any updates or 9 //improvements back to me for possible inclusion in the main trunk of development. 10 //3. You must always leave these instructions in any object created; notecard written; posting to 11 //any electronic medium such as Forum, Email &c. of the source code & generally be nice (as 12 //already requested!) 13 //4. You must not claim that anyone apart from sparti Carroll wrote the original version of this software. 14 //5. You can add and edit things below =THE LINE= but please try to keep it all making sense. 15 //Thank you for your co-operation 16 //sparti Carroll 17 18 19 20 integer FLAGdebug = 0; 21 22 string version = "1.1"; 23 24 list visitor_list; 25 key k_owner; 26 27 string my_notecard = "SETTINGS"; 28 29 // idea is this object orbits around and every 10 seconds announces who is there by saying or IM to owner 30 31 // Notecard handler based on http://secondlife.com/badgeo/wakka.php?wakka=LibrarySettingsNotecard 32 key kCurrentDataRequest; 33 string sSettingsNotecard; 34 35 //notecard configurable parameters 36 float range; // sensor range, in m 37 integer channel; 38 integer h_listen; 39 integer h_zero; // listening on 0 40 integer FLAGincludeowner; 41 integer FLAGtrack; // move to specified person's location + offset then stay there 42 integer FLAGuseIM; 43 string trackname; // who to track 44 string my_label; 45 float t_scan; // how often to scan 46 vector track_offset = <0,0,3>; 47 48 // time slices 49 float t_slice; // number of seconds /slice 50 integer ts_count; 51 integer ts_clearlist; 52 53 // spy control 54 integer FLAGspy; // listen to ch 0 55 56 57 // reset function for params, use notecard values if present 58 reset() { 59 visitor_list = []; 60 range = 100.0; // sensor range, in m 61 channel = 55; 62 FLAGincludeowner = 0; 63 FLAGspy = 1; 64 FLAGtrack = 0; 65 trackname = ""; 66 k_owner = llGetOwner(); 67 FLAGuseIM = 0; 68 llSetAlpha(0.0,ALL_SIDES); 69 } 70 71 sayowner(string s) { 72 if (FLAGuseIM) llInstantMessage(k_owner,s); 73 else llOwnerSay(s); 74 } 75 76 // time itself and dependencies 77 reset_time() { 78 t_scan = 5.0; // how often to scan in seconds (independent of time slices) 79 t_slice = 5.0; // time slice - speed of object (smallest division of time) 80 ts_count = 0; // time slice counter 82 } 83 84 // Functions 86 { 88 integer test_len = llStringLength(name); 89 integer i; 90 for( i = 0; i < len; i++ ) { 91 string list_name = llList2String(visitor_list,i); 92 if (llGetSubString(list_name,0,test_len) != name) return TRUE; 93 } 94 return FALSE; 95 } 96 97 integer iNoteCardLine; 98 99 set_position(vector targetpos) {101 }102 103 104 default105 {107 llResetScript();108 reset();109 }110 111 state_entry() {112 reset();114 integer iNotecardIndex = 0;116 while( FLAGfoundmycard == FALSE && iNotecardCount > iNotecardIndex ) { // if any notecards exist, get name of them until find my_notecard117 sSettingsNotecard = llGetInventoryName( INVENTORY_NOTECARD, iNotecardIndex );118 if (sSettingsNotecard == my_notecard) {119 iNoteCardLine = 0;120 FLAGfoundmycard = TRUE;121 // YYY get notecard lines one at a time (drops key as only one request ?)122 // ZZZ should do timer here, in case dataserver fails to return123 kCurrentDataRequest = llGetNotecardLine( sSettingsNotecard, iNoteCardLine );124 } else {125 iNotecardIndex += 1; // go try next notecard126 }127 }128 if (FLAGfoundmycard == FALSE) { // there are no useable notecards... 0 or none called my_notecard129 sayowner( "No notecard found. Please read configuration instructions. Using defaults." );130 state running;131 }132 }133 135 // YYY see above, notecard lines arrive one at a time136 if( sData != EOF ) {137 list cmdline = llParseString2List(sData,[" ","="],[]);138 string cmd = llList2String(cmdline,0);139 string par = llList2String(cmdline,1);140 if (cmd == "range") range = (float)par;141 if (cmd == "time") t_scan = (float)par;142 if (cmd == "channel") channel = (integer)par;143 if (cmd == "owner") FLAGincludeowner = (integer)par;144 if (cmd == "useim") FLAGuseIM = (integer)par;145 if (cmd == "spy") FLAGspy = (integer)par;146 kCurrentDataRequest = llGetNotecardLine( sSettingsNotecard, ++iNoteCardLine ); // YYY get rest of card, if any147 } else {148 // We have failed, so run it anyway149 state running;150 }151 }152 } // end state default153 154 155 state running {157 llResetScript();158 state default;159 160 }161 state_entry()162 {163 reset_time();164 llSetText(my_label,<1.0,1.0,1.0>,1.0);165 llSetTimerEvent(t_slice);167 h_listen = llListen(channel, "", k_owner, "");168 }169 171 {172 integer i;173 integer trackname_len = llStringLength(trackname);174 for( i = 0; i < number_detected; i++ ) {176 string detected_name = llDetectedName(i);177 vector detected_pos = llDetectedPos(i);178 if (FLAGtrack) {180 if (detected_subname == trackname) {181 set_position(detected_pos + track_offset);182 }183 }184 string region_name = llGetRegionName();185 if ( FLAGincludeowner || detected_key != k_owner ) {186 if ( isNameOnList( detected_name ) == FALSE ) {188 llInstantMessage(k_owner,detected_name + " spotted at " + (string)detected_pos + " in " + region_name);189 }190 }191 } 192 }193 195 {196 if (chan == 0) {197 llInstantMessage(k_owner,">>" + name + "<< '" + message + "'");198 }199 else if (chan == channel) {200 list cmdline = llParseString2List(message,[" ","="],[]);201 string cmd = llList2String(cmdline,0);202 string par = llList2String(cmdline,1);203 string par2 = llList2String(cmdline,2);204 if (cmd == "range") {205 range = (float)par;207 sayowner("Scan range set to " + par);208 }209 else if (cmd == "channel") {210 llListenRemove(h_listen);211 channel = (integer)par;212 h_listen = llListen(channel, "", k_owner, "");213 sayowner("Command channel changed to " + (string)channel);214 }215 else if (cmd == "owner") {216 par = llToLower(par);217 if (par == "0" || par == "n" || par == "no") {218 FLAGincludeowner = 0;219 sayowner("Owner will no longer be detected");220 }221 else {222 FLAGincludeowner = 1;223 sayowner("Owner will be detected");224 }225 }226 else if (cmd == "spy") {227 par = llToLower(par);228 if (h_zero != 0) {229 llListenRemove(h_zero);230 h_zero = 0;231 }232 if (par == "0" || par == "n" || par == "no") {233 FLAGspy = 0;234 sayowner("Spy mode deactivated");235 }236 else {237 FLAGspy = 1;238 h_zero = llListen(0,"","","");239 sayowner("Spy mode activated");240 }241 }242 else if (cmd == "useim") {243 par = llToLower(par);244 if (par == "1" || par == "y" || par == "yes") {245 FLAGuseIM = 1;246 sayowner("Using IM reporting channel");247 }248 else {249 FLAGuseIM = 0;250 sayowner("Using OwnerSay reporting channel");251 }252 }253 else if (cmd == "track") {254 if (par == "") {255 if (trackname == "") sayowner("Not tracking");256 else sayowner("Currently tracking " + trackname);257 } else if (par == "off") {258 FLAGtrack = 0;259 } else {260 if (par2 != "") trackname= par + " " + par2;261 else trackname = par;262 trackname = llToLower(trackname);263 FLAGtrack = 1;264 sayowner("Now tracking " + trackname);265 }266 }267 else if( message == "report" ) {268 sayowner("ScanReport:");270 integer i;271 for( i = 0; i < len; i++ ) {272 sayowner(llList2String(visitor_list, i));273 }274 sayowner("Total = " + (string)len ); 275 }276 else if( message == "reset" ) {277 state default;278 }279 else if (message == "die") {280 sayowner( "Terminated");281 llDie();282 }283 }284 } // end listen()285 286 timer() { // now under t_slice control287 ts_count++;289 visitor_list = [];290 }291 } 292 } // end state run_object
The SETTINGS notecard
Download this script - Please use this link to get this script. If you see all the code on one long line, please use Wordpad or another editor, such as LSLEdit.exe. The .LSL file you will download is an ordinary text file.
1 2 //ZZ turn on stealth mode 3 stealth=1 4 //ZZ detect the owner 5 owner=1
Some instructions for use
Download this script - Please use this link to get this script. If you see all the code on one long line, please use Wordpad or another editor, such as LSLEdit.exe. The .LSL file you will download is an ordinary text file.
1 2 3 Mission Spy 1.1 4 5 >> Supported Product << 6 >> If you require any help or have feature requests or bug reports for Mission Spy please IM me << 7 8 Please read through these instructions first in case your question is answered here, thank you ! 9 10 11 Mission Spy has two roles: 12 1. It can report on visitors to an area, with a configurable range. 13 2. It can report conversations in an area. 14 15 16 PLEASE NOTE that misuse of either of these services could constitue contravention 17 of the terms of the Second Life SLA. It is suggested that the Mission Spy is only 18 used in Combat Zones, or otherwise with the consent of those in the area - e.g. for 19 relaying conversations. 20 21 22 Mission Spy is discreet, you will hardly notice it's 0.01 x 0.01 x 0.01 full alpha sphere. 23 24 Mission Spy can be configured by chatting or shouting on a command channel, 55 by default, but this is configurable. It only pays attention to the owner on the command channel. 25 26 All reporting to the owner is via llOwnerSay or llInstantMessage. Instant message may not be suitable for heavy conversation areas and llOwnerSay is the default. 27 28 29 GETTING STARTED 30 1. Rez the Mission Spy Box on the ground 31 2. Touch the box... you will be given a Mission Spy Tools folder 32 3. Drag a Mission Spy object onto the ground and then use the commands to control it. 33 4. The object is copy so don't worry about losing it. 34 5. To clear up say "/55 die" - see below. 35 36 37 COMMANDS 38 Commands available in version 1.1 are: 39 /55 channel n 40 Switch commands to channel n 41 /55 range n 42 Set the avatar detection range to n, up to 100 (metres) is valid. 43 /55 owner n 44 /55 owner y 45 Sets whether the owner will not "n", or will "y" be included in scans 46 /55 spy n 47 /55 spy y 48 Sets whether Mission Spy is reporting conversations back to the owner 49 /55 useim n 50 /55 useim y 51 Sets whether Mission Spy reports via llOwnerSay or llInstantMessage 52 neither will cause particles to be displayed 53 /55 track PARTIALNAME 54 Follow avatars matching PARTIALNAME (case insensitive) around the sim 55 Essential for following conversations in a fast moving battle 56 Will pickup and track again if the av. leaves and returns 57 Eg. "/55 track sparti" would follow me around (!) 58 /55 report 59 Report list of avs detected since last auto-reset 60 Owner will receive IM individual as well 61 /55 reset 62 Reset Mission Spy 63 /55 die 64 Delete the Mission Spy object 65 66 67 68 Some parameters can be configured via notecard - to reduce the setup time or allow you to create a number of separate trackers. 69 70 71 Of course Mission Spy is supplied COPY (+MOD for the notecard). 72 73 74 NOTECARD CONFIGURATION 75 The commands which can be put into the notecard are: 76 time T 77 Set time between scans to T seconds 78 range R 79 Set avatar detection range 80 channel C 81 Set command channel 82 owner O 83 Set whether owner is detected 84 useim U 85 Set whether instant messaging (or OwnerSay) is used 86 spy S 87 Set whether conversations are reported 88 89 90 91 >> Supported Product << 92 >> If you require any help or have feature requests or bug reports for Mission Spy please IM me <<