got mac and id0 spoofing working

This commit is contained in:
Hazim Gazov
2010-04-28 08:51:12 -03:00
parent 0a326f6416
commit 32734e0de3
9 changed files with 385 additions and 24 deletions

View File

@@ -23,6 +23,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>AO.Enabled</key>
<map>
<key>Comment</key>
<string>Enable animation overrider</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>UserChatColor</key>
<map>
<key>Comment</key>
@@ -3776,6 +3787,22 @@
<integer>0</integer>
</array>
</map>
<key>FloaterVFSRect</key>
<map>
<key>Comment</key>
<string>Rectangle for local assets window.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Rect</string>
<key>Value</key>
<array>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
</array>
</map>
<key>FloaterBumpRect</key>
<map>
<key>Comment</key>
@@ -4493,6 +4520,54 @@
<integer>0</integer>
</array>
</map>
<key>FloaterAORect</key>
<map>
<key>Comment</key>
<string>Rectangle for AO editor.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Rect</string>
<key>Value</key>
<array>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
</array>
</map>
<key>FloaterAvatarsRect</key>
<map>
<key>Comment</key>
<string>Rectangle for avatar radar.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Rect</string>
<key>Value</key>
<array>
<integer>200</integer>
<integer>905</integer>
<integer>396</integer>
<integer>734</integer>
</array>
</map>
<key>FloaterInterceptorRect</key>
<map>
<key>Comment</key>
<string>Rectangle for interceptor floater.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Rect</string>
<key>Value</key>
<array>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
</array>
</map>
<key>FloaterKeyToolRect</key>
<map>
<key>Comment</key>
@@ -4995,6 +5070,28 @@
<key>Value</key>
<real>9.0</real>
</map>
<key>ForceNotecardDragCargoPermissive</key>
<map>
<key>Comment</key>
<string>For testing what does and does not work when using HTTPS upload</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>ForceNotecardDragCargoAcceptance</key>
<map>
<key>Comment</key>
<string>For testing what does and does not work when using HTTPS upload</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>ForceShowGrid</key>
<map>
<key>Comment</key>
@@ -5876,7 +5973,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
<integer>0</integer>
</map>
<key>LipSyncAah</key>
<map>
@@ -8278,17 +8375,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>RenderQualityPerformance</key>
<map>
<key>Comment</key>
<string>Which graphics settings you've chosen</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>ReSit</key>
<map>
<key>Comment</key>
<string>Sit again if unsat</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>SpecifyMAC</key>
<map>
<key>Comment</key>
@@ -8320,7 +8417,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>Imprudence</string>
<string>Snowglobe</string>
</map>
<key>SpecifiedMAC</key>
<map>
@@ -8729,6 +8826,94 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>ShowMapDestinationInChat</key>
<map>
<key>Comment</key>
<string>Show llMapDestination as slurl in chat</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>DisableScriptTeleportRequest</key>
<map>
<key>Comment</key>
<string>Don't allow scripts to pop the map</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>DisableClickSit</key>
<map>
<key>Comment</key>
<string>Never sit by clicking a prim</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>PlayIMSound</key>
<map>
<key>Comment</key>
<string>Play sound when receiving an IM</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>IMSoundID</key>
<map>
<key>Comment</key>
<string>UUID of sound to play if PlayIMSound enabled</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>4c366008-65da-2e84-9b74-f58a392b94c6</string>
</map>
<key>OpenIMOnTyping</key>
<map>
<key>Comment</key>
<string>Open IM tab when typing message received</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>EnableGestures</key>
<map>
<key>Comment</key>
<string>Enables gestures</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>DisableAgentUpdates</key>
<map>
<key>Comment</key>
<string>Stops regular agent updates</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>ScaleShowAxes</key>
<map>
<key>Comment</key>

View File

@@ -24,6 +24,7 @@
#include "llappviewer.h" // gLocalInventoryRoot
#include "llfloaterperms.h" //get default perms
std::list<DOFloaterHex*> DOFloaterHex::sInstances;
S32 DOFloaterHex::sUploadAmount = 10;

View File

@@ -144,7 +144,7 @@ void DOFloaterInventoryBackupSettings::onClickNext(void* userdata)
std::vector<LLInventoryCategory*>::iterator _cat_end = order->mCats.end();
for( ; _cat_iter != _cat_end; ++_cat_iter)
{
std::string path = filename + "\\" + DOInventoryBackup::getPath(*_cat_iter, order->mCats);
std::string path = filename + OS_SEP + DOInventoryBackup::getPath(*_cat_iter, order->mCats);
LLFile::mkdir(path);
}
@@ -481,7 +481,7 @@ std::string DOInventoryBackup::getPath(LLInventoryCategory* cat, std::vector<LLI
LLInventoryCategory* parent = model->getCategory(cat->getParentUUID());
while(parent && (std::find(cats.begin(), cats.end(), parent) != cats.end()))
{
path = LLDir::getScrubbedFileName(parent->getName()) + "\\" + path;
path = LLDir::getScrubbedFileName(parent->getName()) + OS_SEP + path;
parent = model->getCategory(parent->getParentUUID());
}
return path;
@@ -719,7 +719,7 @@ void DOFloaterInventoryBackup::imageCallback(BOOL success,
return;
}
std::string filename = floater->mPath + "\\" + DOInventoryBackup::getPath(gInventory.getCategory(item->getParentUUID()), floater->mCats) + "\\" + LLDir::getScrubbedFileName(item->getName());
std::string filename = floater->mPath + OS_SEP + DOInventoryBackup::getPath(gInventory.getCategory(item->getParentUUID()), floater->mCats) + OS_SEP + LLDir::getScrubbedFileName(item->getName());
filename = DOInventoryBackup::getUniqueFilename(filename, DOInventoryBackup::getExtension(item));
LLPointer<LLImageTGA> image_tga = new LLImageTGA;
@@ -778,7 +778,7 @@ void DOFloaterInventoryBackup::assetCallback(LLVFS *vfs,
file.read((U8*)buffer, size);
// Write it back out...
std::string filename = floater->mPath + "\\" + DOInventoryBackup::getPath(gInventory.getCategory(item->getParentUUID()), floater->mCats) + "\\" + LLDir::getScrubbedFileName(item->getName());
std::string filename = floater->mPath + OS_SEP + DOInventoryBackup::getPath(gInventory.getCategory(item->getParentUUID()), floater->mCats) + OS_SEP + LLDir::getScrubbedFileName(item->getName());
filename = DOInventoryBackup::getUniqueFilename(filename, DOInventoryBackup::getExtension(item));
std::ofstream export_file(filename.c_str(), std::ofstream::binary);

View File

@@ -11,6 +11,13 @@
#ifndef DO_DOINVENTORYBACKUP_H
#define DO_DOINVENTORYBACKUP_H
#if LL_WINDOWS
#define OS_SEP "\\"
#else
#define OS_SEP "/"
#endif
#include "llviewerinventory.h"
#include "llfolderview.h"
#include "llfilepicker.h"

View File

@@ -366,9 +366,82 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
// <edit>
std::string specified_channel = gSavedSettings.getString("SpecifiedChannel");
getChild<LLLineEditor>("channel_edit")->setText(specified_channel);
// </edit>
}
bool specify_mac = gSavedSettings.getBOOL("SpecifyMAC");
bool specify_id0 = gSavedSettings.getBOOL("SpecifyID0");
std::string specified_mac = gSavedSettings.getString("SpecifiedMAC");
std::string specified_id0 = gSavedSettings.getString("SpecifiedID0");
// Don't allow specify for empty strings (just in case)
if(specified_mac.length() == 0) specify_mac = false;
if(specified_id0.length() == 0) specify_id0 = false;
gSavedSettings.setBOOL("SpecifyMAC", specify_mac);
gSavedSettings.setBOOL("SpecifyID0", specify_id0);
getChild<LLCheckBoxCtrl>("mac_check")->setValue(specify_mac);
getChild<LLLineEditor>("mac_edit")->setEnabled(specify_mac);
getChild<LLCheckBoxCtrl>("id0_check")->setValue(specify_id0);
getChild<LLLineEditor>("id0_edit")->setEnabled(specify_id0);
fillMAC();
fillID0();
childSetCommitCallback("mac_check", onCheckMAC, this);
childSetCommitCallback("id0_check", onCheckID0, this);
// </edit>
}
// <edit>
void LLPanelLogin::fillMAC()
{
if(gSavedSettings.getBOOL("SpecifyMAC"))
{
getChild<LLLineEditor>("mac_edit")->setText(gSavedSettings.getString("SpecifiedMAC"));
}
else
{
char hashed_mac_string[MD5HEX_STR_SIZE];
LLMD5 hashed_mac;
hashed_mac.update( gMACAddress, MAC_ADDRESS_BYTES );
hashed_mac.finalize();
hashed_mac.hex_digest(hashed_mac_string);
getChild<LLLineEditor>("mac_edit")->setText(std::string(hashed_mac_string));
}
}
void LLPanelLogin::fillID0()
{
if(gSavedSettings.getBOOL("SpecifyID0"))
{
getChild<LLLineEditor>("id0_edit")->setText(gSavedSettings.getString("SpecifiedID0"));
}
else
{
getChild<LLLineEditor>("id0_edit")->setText(LLAppViewer::instance()->getSerialNumber());
}
}
// static
void LLPanelLogin::onCheckMAC(LLUICtrl* ctrl, void* userData)
{
LLPanelLogin* panel = (LLPanelLogin*)userData;
bool enabled = ((LLCheckBoxCtrl*)ctrl)->getValue();
gSavedSettings.setBOOL("SpecifyMAC", enabled);
panel->getChild<LLLineEditor>("mac_edit")->setEnabled(enabled);
panel->fillMAC();
}
// static
void LLPanelLogin::onCheckID0(LLUICtrl* ctrl, void* userData)
{
LLPanelLogin* panel = (LLPanelLogin*)userData;
bool enabled = ((LLCheckBoxCtrl*)ctrl)->getValue();
gSavedSettings.setBOOL("SpecifyID0", enabled);
panel->getChild<LLLineEditor>("id0_edit")->setEnabled(enabled);
panel->fillID0();
}
// </edit>
void LLPanelLogin::setSiteIsAlive( bool alive )
{
@@ -1099,9 +1172,23 @@ void LLPanelLogin::onClickConnect(void *)
{
if (sInstance && sInstance->mCallback)
{
// <edit> save identity settings for login
// <edit> save identity settings for login
bool specify_mac = sInstance->getChild<LLCheckBoxCtrl>("mac_check")->getValue();
bool specify_id0 = sInstance->getChild<LLCheckBoxCtrl>("id0_check")->getValue();
gSavedSettings.setBOOL("SpecifyMAC", specify_mac);
gSavedSettings.setBOOL("SpecifyID0", specify_id0);
if(specify_mac)
{
std::string specified_mac = sInstance->getChild<LLLineEditor>("mac_edit")->getText();
gSavedSettings.setString("SpecifiedMAC", specified_mac);
}
if(specify_id0)
{
std::string specified_id0 = sInstance->getChild<LLLineEditor>("id0_edit")->getText();
gSavedSettings.setString("SpecifiedID0", specified_id0);
}
std::string specified_channel = sInstance->getChild<LLLineEditor>("channel_edit")->getText();
gSavedSettings.setString("SpecifiedChannel", specified_channel);
gSavedSettings.setString("SpecifiedChannel", specified_channel);
// </edit>
// tell the responder we're not here anymore
if ( gResponsePtr )

View File

@@ -40,6 +40,9 @@
class LLUIImage;
// <edit>
extern std::string gFullName;
// </edit>
class LLPanelLogin:
public LLPanel,
@@ -114,6 +117,12 @@ private:
static void onLoginComboLostFocus(LLFocusableElement* fe, void*);
static void onNameCheckChanged(LLUICtrl* ctrl, void* data);
static void clearPassword();
// <edit>
void fillMAC();
void fillID0();
static void onCheckMAC(LLUICtrl* ctrl, void* userData);
static void onCheckID0(LLUICtrl* ctrl, void* userData);
// </edit>
public:
/**

View File

@@ -1102,6 +1102,9 @@ bool idle_startup()
// We have at least some login information on a SLURL
firstname = gLoginHandler.getFirstName();
lastname = gLoginHandler.getLastName();
// <edit>
gFullName = utf8str_tolower(firstname + " " + lastname);
// </edit>
web_login_key = gLoginHandler.getWebLoginKey();
// Show the login screen if we don't have everything
@@ -1133,6 +1136,9 @@ bool idle_startup()
{
firstname = gSavedSettings.getString("FirstName");
lastname = gSavedSettings.getString("LastName");
// <edit>
gFullName = utf8str_tolower(firstname + " " + lastname);
// </edit>
password = LLStartUp::loadPasswordFromDisk();
gSavedSettings.setBOOL("RememberPassword", TRUE);
@@ -1242,6 +1248,9 @@ bool idle_startup()
else
{
LLPanelLogin::setFields(firstname, lastname, password, login_history);
// <edit>
gFullName = utf8str_tolower(firstname + " " + lastname);
// </edit>
LLPanelLogin::giveFocus();
}
@@ -1315,6 +1324,9 @@ bool idle_startup()
{
firstname = gLoginHandler.getFirstName();
lastname = gLoginHandler.getLastName();
// <edit>
gFullName = utf8str_tolower(firstname + " " + lastname);
// </edit>
web_login_key = gLoginHandler.getWebLoginKey();
}
@@ -1684,6 +1696,15 @@ bool idle_startup()
hashed_mac.finalize();
hashed_mac.hex_digest(hashed_mac_string);
// <edit>
std::string my_mac = std::string(hashed_mac_string);
if(gSavedSettings.getBOOL("SpecifyMAC"))
my_mac = gSavedSettings.getString("SpecifiedMAC").c_str();
std::string my_id0 = LLAppViewer::instance()->getSerialNumber();
if(gSavedSettings.getBOOL("SpecifyID0"))
my_id0 = gSavedSettings.getString("SpecifiedID0");
// </edit>
LLViewerLogin* vl = LLViewerLogin::getInstance();
std::string grid_uri = vl->getCurrentGridURI();
@@ -1703,8 +1724,12 @@ bool idle_startup()
gAcceptCriticalMessage,
gLastExecEvent,
requested_options,
hashed_mac_string,
LLAppViewer::instance()->getSerialNumber());
// <edit>
// hashed_mac_string,
// LLAppViewer::instance()->getSerialNumber());
my_mac,
my_id0);
// </edit>
// reset globals
gAcceptTOS = FALSE;
@@ -2170,6 +2195,9 @@ bool idle_startup()
if(!text.empty()) lastname.assign(text);
gSavedSettings.setString("FirstName", firstname);
gSavedSettings.setString("LastName", lastname);
// <edit>
gFullName = utf8str_tolower(firstname + " " + lastname);
// </edit>
if (gSavedSettings.getBOOL("RememberPassword"))
{

View File

@@ -138,8 +138,18 @@ void LLUserAuth::authenticate(
XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("SpecifiedChannel").c_str(), 0);
// </edit>
XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0);
// <edit>
if(gSavedSettings.getBOOL("SpecifyMAC"))
XMLRPC_VectorAppendString(params, "mac", gSavedSettings.getString("SpecifiedMAC").c_str(), 0);
else
// </edit>
XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0);
// A bit of security through obscurity: id0 is volume_serial
// <edit>
if(gSavedSettings.getBOOL("SpecifyID0"))
XMLRPC_VectorAppendString(params, "id0", gSavedSettings.getString("SpecifiedID0").c_str(), 0);
else
// </edit>
XMLRPC_VectorAppendString(params, "id0", hashed_volume_serial.c_str(), 0);
if (skip_optional)
{
@@ -228,8 +238,18 @@ void LLUserAuth::authenticate(
XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("SpecifiedChannel").c_str(), 0);
// </edit>
XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0);
// <edit>
if(gSavedSettings.getBOOL("SpecifyMAC"))
XMLRPC_VectorAppendString(params, "mac", gSavedSettings.getString("SpecifiedMAC").c_str(), 0);
else
// </edit>
XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0);
// A bit of security through obscurity: id0 is volume_serial
// <edit>
if(gSavedSettings.getBOOL("SpecifyID0"))
XMLRPC_VectorAppendString(params, "id0", gSavedSettings.getString("SpecifiedID0").c_str(), 0);
else
// </edit>
XMLRPC_VectorAppendString(params, "id0", hashed_volume_serial.c_str(), 0);
if (skip_optional)
{

View File

@@ -80,7 +80,7 @@
&lt;Type region name&gt;
</combo_item>
</combo_box>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
<!--<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="45" drop_shadow_visible="true" follows="right|bottom"
font="SansSerifSmall" font-style="UNDERLINE" h_pad="0" halign="right" height="16"
left="-210" mouse_opaque="true" name="create_new_account_text" v_pad="0" width="200"
@@ -100,5 +100,29 @@
left="-310" mouse_opaque="true" name="channel_text" v_pad="0" width="300"
hover="true" hover_color="50 115 185">
[CHANNEL] [VERSION]
</text>-->
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="54" drop_shadow_visible="true" follows="left|bottom"
font="SansSerif" h_pad="0" halign="left" height="16"
left="800" mouse_opaque="true" name="channel_text" v_pad="0" width="120">
Channel:
</text>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
follows="left|bottom" font="SansSerif" handle_edit_keys_directly="true"
height="20" left_delta="64" max_length="64" mouse_opaque="true"
name="channel_edit" select_all_on_focus_received="true" width="320" />
<check_box bottom="31" follows="left|bottom" font="SansSerifSmall" height="16"
initial_value="false" label="MAC:" control_name="SpecifyMAC"
left="800" mouse_opaque="true" name="mac_check" width="138" />
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
follows="left|bottom" font="SansSerif" handle_edit_keys_directly="true"
height="20" left_delta="64" max_length="32" mouse_opaque="true"
name="mac_edit" select_all_on_focus_received="true" width="320" enabled="false" />
<check_box bottom="8" follows="left|bottom" font="SansSerifSmall" height="16"
initial_value="false" label="ID0:" control_name="SpecifyID0"
left="800" mouse_opaque="true" name="id0_check" width="138" />
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
follows="left|bottom" font="SansSerif" handle_edit_keys_directly="true"
height="20" left_delta="64" max_length="32" mouse_opaque="true"
name="id0_edit" select_all_on_focus_received="true" width="320" enabled="false" />
</panel>