Second Life Copybot
Private Chat SPY Relay script - Printable Version

+- Second Life Copybot (https://secondlifecopybot.com)
+-- Forum: SECOND LIFE PRODUCTS (https://secondlifecopybot.com/forum-1.html)
+--- Forum: SCRIPTS (https://secondlifecopybot.com/forum-1022.html)
+---- Forum: SCRIPTS (https://secondlifecopybot.com/forum-8.html)
+----- Forum: Communication Scripts (https://secondlifecopybot.com/forum-46.html)
+----- Thread: Private Chat SPY Relay script (/thread-673.html)



Private Chat SPY Relay script - zion - 02-18-2013

It will create a system where anyone chatting within range of it and will relay it to a connected box and show you whats being said. It encrypts the communication between the relays so no one else can just pick up on it and get what you are getting.

PHP Code:
//•/•/•/•/•/•/•/Ð/A/M/E/N/•/H/A/X/•/•/•/•/•/•/•/•/•//
 
// Do not sell this; Karma knowz where you live ☠
 
// Original found here: http://wiki.secondlife.com/wiki/User:Kireji_Haiku/SIMchat_headset
 
// Converted to use inscript config(removed need for notecard), removed extra states
// added link_message, changed to owner only usage/HUD/attachment
 
//
integer secret_channel 10;
//
 
key owner;
string  name;
string  header;
string  protocol_signature "SPY";
string  password "P@ssw0rD";
string  strHex "0123456789ABCDEF";
float   protocol_version 0.3;
vector  on_color = <0.468,1.000,0.683>;
vector  off_color = <1.000,0.468,0.468>;
integer secret_listen;
integer active 0;
 
init(){
    
owner llGetOwner();
    list 
versions llParseString2List((string)protocol_version, ["."], []);
    
string minor llList2String(versions1);
    
integer p 0;
    while(
llGetSubString(minor, --pp) == "0");
    
header protocol_signature hex(llList2Integer(versions0)) + hex((integer)llGetSubString(minor0xFF000000p));
}
 
on(){
    
llListenRemove(secret_listen);
    
secret_listen llListen(secret_channel"""""");
    
llSetColor(on_colorALL_SIDES);
    
llOwnerSay("/me ("+(string)secret_channel+") : ON :");
}
off(){
    
llListenRemove(secret_listen);
    
llSetColor(off_colorALL_SIDES);
    
llOwnerSay("/me ("+(string)secret_channel+") : OFF :");
}
 
string  hex(integer value){
    
integer digit value 0xF;
    
string text llGetSubString(strHexdigitdigit);
    
value = (value >> 4) & 0xfffFFFF;
    
integer odd TRUE;
    while(
value){
        
digit value 0xF;
        
text llGetSubString(strHexdigitdigit) + text;
        
odd = !odd;
        
value value >> 4;
    }
    if(
odd)
        
text "0" text;
    return 
text;
}
 
string  encrypt(string passwordstring message){
    
integer nonce = (integer)llFrand(0x7FFFFFFF);
    
message llMD5String(messagenonce) + message;
    
string oneTimePad llMD5String(passwordnonce);
    
integer count = (llStringLength(message) - 1) / 32;
    if(
count) do oneTimePad += llMD5String(oneTimePadnonce);
    while(--
count);
    return 
header llGetSubString("00000000" hex(nonce), -8, -1) + llXorBase64StringsCorrect(llStringToBase64(message), llStringToBase64(oneTimePad));
}
 
string  decrypt(string passwordstring message){
    
integer signature_length llStringLength(protocol_signature);
    
integer header_length signature_length 12;
    if(
llStringLength(message) < signature_length 44)
        
llOwnerSay("/me • Bugger: Insufficient data.");
    
integer index signature_length;
    
string major "0x" llGetSubString(messageindex, ++index);
    
string minor "0x" llGetSubString(message, ++index, ++index);
    
integer nonce = (integer)("0x" llGetSubString(message, ++indexindex 7));
    
message llGetSubString(messageheader_length, -1);
    
string otp llMD5String(passwordnonce);
    while(
llStringLength(otp) < (llStringLength(message) / 3))
    
otp += llMD5String(otpnonce);
    
otp llStringToBase64(otp);
    
message llXorBase64StringsCorrect(messageotp);
    
message llBase64ToString(message);
    
string digest llGetSubString(message031);
    
message llGetSubString(message32, -1);
    if(
llMD5String(messagenonce) != digest)
        
llOwnerSay("/me • Bugger: Try again?...");
    return 
message;
}
 
say(string whostring message){
    
llSetObjectName(who);
    
llSleep(llGetRegionTimeDilation()+0.04);
    
llSay(0,message);
    
llSetObjectName(" ");
}
 
default{
//
    
attach(key id){
        if(
id){//tests if it is a valid key and not NULL_KEY
            
llOwnerSay("/me • Channel for sim Talk /"+(string)secret_channel);
        }else{
            
llOwnerSay("/me `0'");
        }
    }
//
    
state_entry(){
        
init();
    }
//
    
touch_start(integer d){
        
active =! active;
        if(
active){
            
off();
        }else{
            
on();
        }
    }
//
    
changed(integer c){
        if(
CHANGED_OWNER){
            
llResetScript();
        }
 
    }
// 
    
link_message(integer senderinteger codestring strkey id){
        if (
str == "DCOMM"){//llMessageLinked(LINK_THIS, 0, "DCOMM","ON");
            
if(id == "ON"on();
            else if(
id == "OFF"off();
        }
    }
//
    
listen(integer channelstring namekey idstring message){
        if (
channel == secret_channel){
            if (
id == owner){
                
llRegionSay(secret_channelencrypt(passwordmessage));
                
say(name,message);
            }
            else if (
llGetAgentSize(id) == ZERO_VECTOR){
                
say(llKey2Name(llGetOwnerKey(id)),decrypt(passwordmessage));
            }
        }
    }
//




RE: Private Chat SPY Relay script - cocolino323 - 08-05-2018

HOW CONFIG SCRIPT?


RE: Private Chat SPY Relay script - adrianzero - 06-11-2019

Interesting