ANTICHAT.XYZ    VIDEO.ANTICHAT.XYZ    НОВЫЕ СООБЩЕНИЯ    ФОРУМ  
Баннер 1   Баннер 2
Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей. Здесь обсуждаются безопасность, программирование, технологии и многое другое. Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz
Вернуться   Форум АНТИЧАТ > Безопасность и Уязвимости > Уязвимости > Чаты
   
Ответ
 
Опции темы Поиск в этой теме Опции просмотра

  #1  
Старый 17.09.2004, 18:36
Аватар для
Guest
Сообщений: n/a
Провел на форуме:

Репутация:
По умолчанию

вот сам скрипт (narod_chat.js)

var script = "http://narod.yandex.ru/cgi-bin/GetCom";
var optionurl = "http://narod.yandex.ru/chat/chat_ent...F_Chat=";

var cid = 0;
var uid = 0;
var status = 0;

var MessageCount = 40;
var RefreshTime = 15;
var Status = 0;


var text =new Array();
var GetOk = true;
var MesBuf = "";
var toid = 0;
var OptionsSet = false;
//--------------------------------------------------------------------------
function Options(){
OptionsSet = true;
               Exit();
return false;
}
//--------------------------------------------------------------------------
function Refresh(){
send_command(3, 0);
return false;
}
//--------------------------------------------------------------------------
function ChatStart(){
cid = get_val("chatid"
uid = get_val("userid"
send_command(0, ""
}

//--------------------------------------------------------------------------
function Exit(){
send_command(1, ""
return false;
}

//--------------------------------------------------------------------------
function SendMessage(){
Data = top.document.ChatForm.Message.value;
if(Data != "&quot{
if(top.MesBuf == "&quot{
if(GetOk){
send_command(2, Data);
top.document.ChatForm.Message.value = "";
}else{
top.MesBuf = Data;
}
}
}
return false;
}
//----------------------------------------------------------------------
function add_nick_to_message (nick)
{
var s =" " + nick;
if(top.document.ChatForm.Message !="undefined&quot
top.document.ChatForm.Message.value += s;

setTimeout("focus_messager()",200);

return false;

}

//============================================
function SetUserList(ulist, culist, nulist){
var s, ends, elforma;
if(Status == 2){
s = "<form action=\"http://narod.yandex.ru/chat/shtraf.xhtml\"  METHOD=\"get\" name='userlist' target='_top'>";
s += "<INPUT Type=hidden name=userid value="+uid+">";
s += "<INPUT Type=hidden name=chatid value="+cid+">";
s += "<INPUT Type=hidden name=backurl value="+top.document.URL+">";

ends = "<BR><INPUT TYPE=SUBMIT name=deluser value=\"Удалить\"> &q uot;
+"<INPUT TYPE=SUBMIT name=\"shtrafuser\" value=\"Штраф\">"
+"</form>";
}else{
s = "";
ends = "";
}

for(i=0; i< ulist.length; i++){
if(ulist[i] != "undefined&quot{
if (Status==2) s+="<INPUT TYPE=\"Checkbox\" NAME=\"DelList[]\" VALUE=\""+nulist[i]+"\">";
                               else s +="<LI style=color:"+culist[i]+">";
s += "<a style=\"text-decoration: none\" href='' onclick=\" return top.add_nick_to_message(\'"+ulist[i]+": \&#39\"><FONT color="+culist[i]+">";
s += ulist[i]+"</FONT></a>";
if(Status == 2) s+="<BR>";
}
}
top.Chat_UserList.document.body.innerHTML = s+ends;
focus_messager();
return false;
}

//--------------------------------------------------------------------------

function SM(){
if(top.MesBuf != "&quot{
send_command(2, top.MesBuf);
top.MesBuf = "";
top.document.ChatForm.Message.value = "";
}
return 0;
}

//--------------------------------------------------------------------------
function AddMessage(Data){
for(i = Data.length-1; i>= 0; i--){
Message = Data[i].split("<Q>"
if (Message[1].substring(0,4)=="<QA>&quot {
Message[1]=Message[1].substring(4);
adm="<i>";
admc="</i>";
}else {
adm="<b>";
admc="</b>";
}

text[text.length] = "<font size=3 color=#808080>"+Message[0]+" </font><a style=\"text-decoration: none\" href='' onclick=\" return top.add_nick_to_message(\'"+Message[1]+": \&#39\"><font size=3 color=black>"+adm+Message[1]+": "+admc+"</font></a><a style=\"text-decoration: none\" href='' onclick=\"return top.add_nick_to_message(\'"+Message[3]+" \'\"><font size=3 color="+Message[2]+" >"+Message[3]+"</font> </a>\r\n";
}

if(text.length >= MessageCount){
text.reverse();
text.length = MessageCount;
text.reverse();
}
//---  ---

if(Data.length > 0){
top.Chat_Messages.document.body.innerHTML = text.join("<br>"
top.Chat_Messages.scrollBy(0,65534);
top.Chat_Messages.scrollBy(0,65534);
}

// focus_messager();
return false;
}
//--------------------------------------------------------------------------
function unauthorize(){
clearTimeout(toid);
if(top.SDMess){
top.document.location = top.SDMess;
}
else if(top.unAuthorize){
top.unAuthorize();
}
else{
top.document.location = "http://narod.yandex.ru/chat/error.xhtml";
// str = document.URL;
// top.document.location = str.substring(0, str.indexOf("/", 8)+1);
}

return true;
}
//--------------------------------------------------------------------------
function logout(chatid){
clearTimeout(toid);
top.Chat_Messages.document.body.innerHTML = "";
top.Chat_UserList.document.body.innerHTML = "";
               
if(top.Logout){
top.Logout();
}
else{
if (top.OptionsSet) {
top.document.location=optionurl+chatid+"& random_nocache="+Math.random();
} else {
if (top.chat_ref)
top.document.location = top.chat_ref;
else {
    str = document.URL;
top.document.location = str.substring(0, str.indexOf("/", 8)+1);
}
}
}
return true;
}

//============================================
function get_val(name){
var end;
var s = document.URL;
var start = s.indexOf(name+"="
if(start != -1){
start += name.length+1;
if(!(end = s.indexOf("&", start)+1)) end = s.length+1;
return s.substring(start, end-1);
}
return "";
}
//--------------------------------------------------------------------------
function send_command(command, data){
clearTimeout(toid);
if(GetOk){
GetOk = false;
data= escape(data);
                       top.Chat_Command.document.location = script+"?chatid="+cid+"&userid= "+uid+"&command="+command+&quot ;&data="+data+"&wrapper=1&ne w="+Math.round(Math.random(100)*100000);
}
if(RefreshTime != 0) toid = setTimeout("send_command(3,0)", RefreshTime*1000);
}
//--------------------------------------------------------------------------
function focus_messager()
{
if (top.Foc) {
if (top.document.ChatForm.Message != "undefined&quot
top.document.ChatForm.Message.focus();
}
}
//--------------------------------------------------------------------------
function Init(iLines, iStatus, iRefresh){
MessageCount = iLines;
RefreshTime = iRefresh;
Status = iStatus;
               if (Status == 2) top.document.getElementById("ah&quot.innerH TML = "  <a href=/help/10.html target=popuphelp onclick='window.open(\"/help/10.html\", \"popuphelp\",\"alwaysRaised=yes,de pendent=no,resizable=yes,height=250,width=500\&quo t;return false;'><img src=/pics/m16.gif width=11 height=11 border=0></a>";
}
//--------------------------------------------------------------------------
function shtraf(chatid){
top.SDMess = "http://narod.yandex.ru/chat/error.xh..."+chatid;
}
//--------------------------------------------------------------------------
function rshtraf(chatid){
top.SDMess = "http://narod.yandex.ru/chat/error.xh..."+chatid;
}
//============================================



у меня вопрос как скрипт генерит userid
 
Ответить с цитированием

  #2  
Старый 17.09.2004, 22:18
Аватар для zFailure
zFailure
Участник форума
Регистрация: 06.06.2004
Сообщений: 169
Провел на форуме:
0

Репутация: 82
Отправить сообщение для zFailure с помощью ICQ
По умолчанию

всю жизнь думал что userid генирится на сервере
 
Ответить с цитированием

  #3  
Старый 20.09.2004, 16:03
Аватар для DamneD
DamneD
Познающий
Регистрация: 04.06.2004
Сообщений: 87
Провел на форуме:
0

Репутация: 1
По умолчанию

...и был прав
 
Ответить с цитированием

  #4  
Старый 20.09.2004, 21:27
Аватар для ntking
ntking
Новичок
Регистрация: 12.06.2004
Сообщений: 16
Провел на форуме:
5869

Репутация: 0
Отправить сообщение для ntking с помощью ICQ
Angry

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Цитата </td></tr><tr><td id="QUOTE">у меня вопрос как скрипт генерит userid[/QUOTE]<span id='postcolor'>
да стопудова рандомом с занесением в лог чата.

А зачем тебе?

P.S. На скрипт можешь не смотреть, нет там подсказки
 
Ответить с цитированием
Ответ





Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT.XYZ