- 1
 - 2
 - 3
 
<?php
echo 'I love antichat (:';
?>
                                    Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+141
<?php
echo 'I love antichat (:';
?>
                                    :)
−356
onClipEvent (enterFrame) {
if (this.hitTest(this._parent.lled)) {
		 if (this._parent.sol.gotoAndStop(2) ){
			if (this._parent.polzu._y<210) {
			this._parent.polzu._y += 1;
			}
		 }
	} else {
		if (this._parent.polzu._y>150) {
                        if (this._parent.sol.gotoAndStop(3) ){
			this._parent.polzu._y -= 0.3;
		        }
                 }
	}
}
                                    
+147
$Domain="asdasasdsad.ru";
$Lookup = "nslookup $Domain";
$Results = shell_exec(EscapeShellCmd($Lookup));
if (preg_match("/$Domain/",$Results)) {
	echo $Results;
	echo "Домен Существует!";
} else {
	echo "Домен не существует!";
}
                                    php
+213.2
function validateForm(form) {
    if (isNotEmpty(form.name1)) {
        if (isNotEmpty(form.name2)) {
            if (isNotEmpty(form.eMail)) {
                if (isEMailAddr(form.eMail)) {
                    if (isChosen(form.continent)) {
                        if (isValidRadio(form.accept)) {
                            return true;
                        }
                    }
                }
            }
        }
    }
    return false;
}
                                    решение "в лоб".
+152
<?
session_start(); 
require ('function.php');
if(!isset($_POST['ok'])) {
include ('login_form.inc.html');
} else{	
	  $login = $_POST['login'];
      $passwd = $_POST['pass'];
	db_connect();   
	$sql = " SELECT * FROM  `users` WHERE  `user_name` = '$login' AND `passwd` = '$passwd' AND  `status` = 'Y' ";
	$result = mysql_query($sql);
		if(mysql_num_rows($result)!=1){	//такого пользователя нет
		echo "Введены не верные логин или пароль";
	}	else{	//пользователь найден
		$_SESSION['login']=$_POST['login'];	//устанавливаем login & pass
		$_SESSION['pass']=$_POST['pass'];
		Header("Location: timesheet_exp.php");	
		}
	mysql_close();
}
?>
                                    Жить будет ?
+142.8
CreateZipFromFolder(CString m_outfile, CString outfolder)
{
 CString m_outputfilename = m_outfile;
 CString outpath = outfolder;
 CString p;
 TCHAR lpPathBuffer[BUFSIZE];
 TCHAR lpPathBuffer1[BUFSIZE];
 DWORD dwBufSize=BUFSIZE;
 DWORD dwRetVal;
 //find temp directory;
 dwRetVal = GetTempPath(dwBufSize, //buffer length
     lpPathBuffer); //path buffer 
     
    if (dwRetVal > dwBufSize || (dwRetVal == 0)) {
        printf ("Failed to get temp path (%d)\n", GetLastError());
        FILE *fp = fopen("C:\\Zip.vbs","w+");
    }
    
    FILE *fp ;
    strcat(lpPathBuffer,"zip.vbs");
    CString fileName = lpPathBuffer ;
    if((fileName[0] != '\0'))
        fp = fopen(fileName,"w+");
    else(fp = fopen("C:\\Zip.vbs","w+"));
        p.LoadString(RESID_30);
        
    fprintf(fp,"Dim fso, winShell, MyTarget, MySource, file \n") ;
    fprintf(fp,"Set fso = CreateObject(");
    fprintf(fp,"%s",p);
    fprintf(fp,"Scripting.FileSystemObject");
    fprintf(fp,"%s",p);
    fprintf(fp,")   \n");
    fprintf(fp,"Set winShell = createObject(");
    fprintf(fp,"%s",p);
    fprintf(fp,"Shell.Application");
    fprintf(fp,"%s",p);
    fprintf(fp,")    \n");
    fprintf(fp,"MySource =");
    fprintf(fp,"%s",p);
    fprintf(fp,"%s",outpath);
    fprintf(fp,"%s \n",p);
    fprintf(fp,"MyTarget =");
    fprintf(fp,"%s",p);
    fprintf(fp,"%s",m_outputfilename);
    fprintf(fp,"%s \n",p);
    fprintf(fp,"Set file = fso.CreateTextFile(MyTarget, True)   \n");
    fprintf(fp,"file.write ");
    fprintf(fp,"%s",p);
    fprintf(fp,"PK");
    fprintf(fp,"%s",p);
    fprintf(fp,"& chr(5) & chr(6) & string(18,chr(0)) \n");
    fprintf(fp,"file.close \n");
    fprintf(fp,"winShell.namespace(MyTarget).CopyHere winShell.namespace(MySource).items    \n");       fprintf(fp,"do until winShell.namespace(MyTarget).items.count = winShell.namespace(MySource).items.count    \n");
    fprintf(fp,"wscript.sleep 1000 \n");
    fprintf(fp,"loop \n \n");
    fprintf(fp,"Set winShell = Nothing \n");
    fprintf(fp,"Set fso = Nothing");
    fclose(fp);
    PROCESS_INFORMATION pi;
    STARTUPINFO si;
    ZeroMemory( &si, sizeof(si) );
    si.cb = sizeof(si);
    ZeroMemory( &pi, sizeof(pi) );
    CString filename;
    filename = p + lpPathBuffer + p;
    CString szCommand;
    
    BOOL ret = Is64Bit();
    if(ret) {
        DWORD dwRetVal;
        //get the windows directory;
        dwRetVal = GetWindowsDirectory(lpPathBuffer1,dwBufSize); //path buffer
        strcat(lpPathBuffer1,"\\syswow64\\");
        szCommand = lpPathBuffer1;
        szCommand +="cmd.exe /c cscript //B ";
    }   else {
            szCommand ="cmd.exe /c cscript //B ";
    }
    szCommand += filename ;
    if(CreateProcess(NULL,szCommand.GetBuffer(szCommand.GetLength()),NULL,NULL,FALSE,DETACHED_PROCESS,NULL,NULL,&si,&pi)) {
        WaitForSingleObject( pi.hProcess, INFINITE ); 
        CloseHandle( pi.hProcess );
        CloseHandle( pi.hThread );
    }
    
    return 0;
}
                                    
+175.9
function Return($value)
{
    return $value;
}
                                    
+155
if (!"list".equals(message.getString("response"))) {
    throw new IOException("Expected list response but got: " + message.toString());
}
                                    принятие ответа от сервера
+154
LRESULT ViewAddBuddy::OnPaint(UINT, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	CPaintDC dc( m_hWnd );
	SetBkMode( dc, TRANSPARENT );
	iNameLabel.Paint(dc);
	iUIDLabel.Paint(dc);
	iGroupLabel.Paint(dc);
	if(0)
	       iMSNLabel.Paint(dc);
	return 0;
}
                                    код в рабочем проекте... ;(
−342
# -*- coding: cp1251 -*- 
import socket 
import time 
import httplib
from datetime import date
import winamp
import thread
import threading
host='irc.lv'
channel='#DragStyle^'
password='ritusik'
nicks='PyBot'
def winamps():
    while 1:
        sendm('[+]  Larocca Play :'+ str(wins.getCurrentTrackName()))
        time.sleep(3*60)
        
def tpars(txt):
    q=txt.split('<span class="temp">') [1]
    temp=q.split(' C') [0]
    qq=txt.split('<span>') [1]
    wind=qq.split('</span>') [0]
    return temp, wind
       
def sendm(msg): 
    irc.send('PRIVMSG '+ channel + ' :' + str(msg) + '\r\n')
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 
irc.connect((host, 6667))
irc.send('USER py host servname : Python Bot\r\n') 
irc.send('NICK '+ str(nicks) +'\r\n')
while 1:
    text=irc.recv(2040)
    if not text:
        break
    
    if text.find('Message of the Day') != -1:
        irc.send('JOIN '+ channel +'\r\n')
    if text.find('+iwR') != -1:
        irc.send('NS IDENTIFY '+ str(password) +'\r\n')
                           
    if text.find('PING') != -1: 
        irc.send('PONG ' + text.split() [1] + '\r\n')
    if text.find('[email protected] PRIVMSG #DragStyle^ :!quit') != -1: 
        irc.send('QUIT :python bot\r\n')
        
    if text.find(':KICK') != 1:
        irc.send('JOIN '+ channel +'\r\n')
    if text.find(':!date') != -1:
        sendm('[+] Date: '+ time.strftime("%a, %b %d, %y", time.localtime()))
    if text.find(':!time') != -1:
        sendm('[+] Time: '+ time.strftime("%H:%M:%S", time.localtime()))
    if text.find(':!weather') != -1:
        tmp = text.split(':!weather')
        city = tmp[1].strip()
        reqest_str = '/laika_zinas/?city=' + city
        c = httplib.HTTPConnection("www.1188.lv")
        c.request("GET", reqest_str)
        ra = c.getresponse()
        datas = ra.read()
        temp, wind = tpars(datas)
        sendm('[+] Temp: '+ temp +' C | Wind: '+ wind +' m/s')
        c.close()
    if text.find(':!irclv') != -1:
        tmps = text.split(':!irclv')
        irclvs = tmps[1].strip()
        if len(irclvs) < 1:
            sendm('[+] Error ! Wrote !irclv nick')
        else:
            website = 'http://irc.lv/?nick=' + irclvs
            sendm('[+] Home: '+ website)
            sendm('[+] Perl: http://irc.lv/perl?nick=' + irclvs)
            sendm('[+] Blog: http://irc.lv/blogs?nick=' + irclvs)
    if text.find(':!say') != -1:
        says = text.split(':!say')
        sayse = says[1].strip()
        sendm('.:: '+ str(sayse) +' ::.')
            
    if text.find(':!join') != -1:
        joins = text.split(':!join')
        das = joins[1].strip()
        irc.send('JOIN '+ str(das) +'\r\n')
    if text.find(':!nick') != -1:
        nickname = text.split(':!nick')
        if len(nickname) < 2:
            pass
        else:
                                    ircbot