elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


  Mostrar Mensajes
Páginas: 1 ... 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 [29] 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 ... 61
281  Programación / .NET (C#, VB.NET, ASP) / Re: Insertar <Script> en VB.NET en: 28 Junio 2013, 22:58 pm
Tienes controles de reproductor windows media  :silbar:
282  Foros Generales / Foro Libre / Re: Cuentanos tu mejor chiste!! en: 28 Junio 2013, 22:58 pm
A ver, un chiste que se me acaba de ocurrir ahora mientras me estaba duchando, aunque, bueno, si puede resultar molesto y demás, me disculpo;
-¿Que ven las miniaturas de Warhammer y/o Warhammer 40.000 cuando son presa del pánico debido a que, entre otras cosas, otra (u otras) unidades les causan terror y/o las miniaturas de su unidad están cayendo una tras otra y/o ven a otra(s) unidad(es) corriendo presa del pánico por las razones antes expuestas (entre otros muchos ejemplos variados)?.
-A su suegra exigiendo que vuelvan a casa con dinero para mantener a la familia.
Muchas gracias por vuestra atención, y, bueno, me disculpo por las molestias causadas por si este chiste es y/o puede ser molesto y/o muy molesto.
Saludos.

DEJA DE DISCULPARTE !!! SIEMPRE TE DISCULPAS DE TODO !!! ESTO ES INTERNET, NO UNA IGLESIA... !!!!  :laugh:
283  Programación / .NET (C#, VB.NET, ASP) / Re: Insertar <Script> en VB.NET en: 28 Junio 2013, 14:37 pm
No puedes añadir codigo HTML5 a Visual Basic, puedes poner un Webbrowser o añadir el de windows media
Tu decides, que empiece el juego  >:D
284  Seguridad Informática / WarZone / Re: Reto Warzone Muy Sencillito en: 27 Junio 2013, 14:06 pm
Mi siguiente videotutorial irá sobre los primeros niveles del warzone
El siguiente, sobre bypasses varios (trolling web)
El siguiente, sobre SQL injection (lo que necesitas)  ;-)
285  Seguridad Informática / WarZone / Re: Reto Warzone Muy Sencillito en: 27 Junio 2013, 10:21 am
Nunca pensé que iba a tener tantos jugadores  ;-)
A ver si saco un rato, y me hago mi propio reto de sqli  :¬¬

He subido un tutorial sobre como robar cookies  :silbar:
286  Programación / Programación C/C++ / Re: 1º Reto de Retrodev en: 26 Junio 2013, 08:29 am
Yo ya hice el mio
https://www.dropbox.com/s/uxjoyc872t4yudg/Juego%20Isc%20Snake.zip  :silbar:

Pensé que al ser el snake, necesitaba que fuese en consola, para respetar los primeros juegos

Main.cpp
Código
  1. #pragma region Includes
  2.  
  3. #include <windows.h>
  4. #include <string>
  5. #include <conio.h>
  6. #include <iostream>
  7. #include <time.h>
  8. #include <cstdlib>
  9. #include <dos.h>
  10. using namespace std;
  11. #define Izquierda 97
  12. #define Derecha 100
  13. #define Arriba 119
  14. #define Abajo 115
  15.  
  16. void Color(int foreground, int background);
  17. void gotoxy( short x, short y );
  18. void cls();
  19. void Lineas(int Estilo,int xA,int yA,int hA,int wA);
  20. void DibujarPuntos (int p);
  21. void MoverSerpiente(); void PintarSerpiente();
  22. void DibujarMapa();
  23. void BorrarZona(); void BorrarCola();
  24. void PintarZona();
  25. void GameOver(); void AlargarSerpiente();
  26. void MoverComida(); void Comer(int n); void DibujarComida();
  27.  
  28. #pragma endregion
  29. #pragma region Variables
  30.  
  31. int Tecla;
  32. int Puntos = 0;
  33. char* IconoFondo = " ";
  34. int IconoSerpiente = 184; //184, 219
  35. int IconoComida = 15; //3, 15
  36. int SerpienteX = 30; int SerpienteY = 10;
  37. int FinalSerpienteX = 28; int FinalSerpienteY = 10;
  38. int sFinalSerpienteX; int sFinalSerpienteY;
  39. int Largura=2; string DireccionSerpiente = "De"; string DireccionFinalSerpiente = "De"; string DireccionsFinalSerpiente;
  40. int Zona [76][18];
  41. int MaxX = 77; int MinX = 2;
  42. int MaxY = 22; int MinY = 5;
  43. int Velocidad = 100;
  44.  
  45. int c1x; int c1y; bool c1v = true;
  46. int c2x; int c2y; bool c2v = true; bool DibujarC = true;
  47. int c3x; int c3y; bool c3v = true;
  48.  
  49. #pragma endregion
  50.  
  51. int main(){
  52.  
  53. system("title Snake - Blackm4ster 2012");
  54. BorrarZona();
  55. cout << "Pulsa una tecla para Jugar" << endl;
  56. getch();
  57. cls();
  58. DibujarMapa();
  59.  
  60. Color(10,0);
  61. gotoxy (SerpienteX, SerpienteY);
  62. printf("%c", IconoSerpiente); //Dibuja la Serpiente por 1º vez
  63. MoverComida();
  64. Color(15,0);
  65. do{
  66. if (DibujarC == true){
  67. DibujarComida();
  68. DibujarC = false;
  69. }
  70. BorrarCola();
  71. MoverSerpiente();
  72. PintarSerpiente(); //PintarZona();
  73. DibujarPuntos(Puntos);
  74. Sleep(Velocidad);
  75.  
  76. /*
  77. gotoxy (2, 22); cout << SerpienteY;
  78. gotoxy (2, 21); cout << SerpienteX;
  79.  
  80. gotoxy (7, 21); cout << FinalSerpienteX;
  81. gotoxy (7, 22); cout << FinalSerpienteY;
  82.  
  83. gotoxy (13, 21); cout << DireccionSerpiente;
  84. gotoxy (13, 22); cout << DireccionFinalSerpiente;
  85.  
  86. gotoxy (18, 20); cout << c1x << " - " << c1y;
  87. gotoxy (18, 21); cout << c2x << " - " << c2y;
  88. gotoxy (18, 22); cout << c3x << " - " << c3y;
  89. */
  90. }while(1);
  91. return 0;
  92. }
  93.  
  94. void MoverSerpiente(){
  95.  
  96. // CABEZA ----------------------------------------------
  97.  
  98. if(kbhit()){
  99. Tecla = getch();
  100.  
  101. switch(Tecla){
  102. case Izquierda:
  103. //Movimiento
  104. if(DireccionSerpiente == "De"){
  105. GameOver();
  106. return;
  107. }
  108. Zona[SerpienteX - MinX +1][SerpienteY - MinY +1] = 4;
  109. DireccionSerpiente = "Iz";
  110. break;
  111.  
  112. case Derecha:
  113. //Movimiento
  114. if(DireccionSerpiente == "Iz"){
  115. GameOver();
  116. return;
  117. }
  118. Zona[SerpienteX - MinX +1][SerpienteY - MinY +1] = 2;
  119. DireccionSerpiente = "De";
  120. break;
  121.  
  122. case Arriba:
  123. //Movimiento
  124. if(DireccionSerpiente == "Ab"){
  125. GameOver();
  126. return;
  127. }
  128. Zona[SerpienteX - MinX +1][SerpienteY - MinY +1] = 1;
  129. DireccionSerpiente = "Ar";
  130. break;
  131.  
  132. case Abajo:
  133. //Movimiento
  134. if(DireccionSerpiente == "Ar"){
  135. GameOver();
  136. return;
  137. }
  138. Zona[SerpienteX - MinX +1][SerpienteY - MinY +1] = 3;
  139. DireccionSerpiente = "Ab";
  140. break;
  141.  
  142. } //End Case
  143. Beep(900,5);
  144. } //End If Tecla
  145.  
  146. // ------------------ MOVIMIENTO ----------------------
  147.  
  148. if (DireccionSerpiente == "Ar"){
  149. SerpienteY = SerpienteY - 1;
  150. }
  151. if (DireccionSerpiente == "Iz"){
  152. SerpienteX = SerpienteX - 1;
  153. }
  154. if (DireccionSerpiente == "Ab"){
  155. SerpienteY = SerpienteY + 1;
  156. }
  157. if (DireccionSerpiente == "De"){
  158. SerpienteX = SerpienteX + 1;
  159. }
  160.  
  161. // -------------------- COMIDA ------------------------
  162.  
  163. if(SerpienteX == c1x + MinX && SerpienteY == c1y + MinY && c1v == true){
  164. Comer(1);
  165. }
  166. if(SerpienteX == c2x + MinX && SerpienteY == c2y + MinY && c2v == true){
  167. Comer(2);
  168. }
  169. if(SerpienteX == c3x + MinX && SerpienteY == c3y + MinY && c3v == true){
  170. Comer(3);
  171. }
  172.  
  173. // -------------------- CHOQUES -----------------------
  174.  
  175. //Paredes
  176.  
  177. if (SerpienteX < MinX || SerpienteY < MinY || SerpienteX > MaxX || SerpienteY > MaxY){
  178. GameOver();
  179. return;
  180. }
  181.  
  182. //Simulación Cabeza vs Cuerpo.
  183.  
  184. sFinalSerpienteX = FinalSerpienteX; sFinalSerpienteY = FinalSerpienteY; DireccionsFinalSerpiente = DireccionFinalSerpiente;
  185.  
  186. for (int i=1; i!=Largura; i++){
  187.  
  188. //Comparación si coinciden
  189. if (SerpienteX == sFinalSerpienteX && SerpienteY == sFinalSerpienteY){
  190. GameOver();
  191. return;
  192. }
  193.  
  194. switch(Zona[sFinalSerpienteX - MinX +1][sFinalSerpienteY - MinY +1]){
  195. case 1:
  196. DireccionsFinalSerpiente = "Ar";
  197. break;
  198. case 2:
  199. DireccionsFinalSerpiente = "De";
  200. break;
  201. case 3:
  202. DireccionsFinalSerpiente = "Ab";
  203. break;
  204. case 4:
  205. DireccionsFinalSerpiente = "Iz";
  206. break;
  207. default:
  208. DireccionsFinalSerpiente = DireccionsFinalSerpiente;
  209. break;
  210. }
  211.  
  212. if (DireccionsFinalSerpiente == "Ar"){
  213. sFinalSerpienteY = sFinalSerpienteY - 1;
  214. }
  215. if (DireccionsFinalSerpiente == "Iz"){
  216. sFinalSerpienteX = sFinalSerpienteX - 1;
  217. }
  218. if (DireccionsFinalSerpiente == "Ab"){
  219. sFinalSerpienteY = sFinalSerpienteY + 1;
  220. }
  221. if (DireccionsFinalSerpiente == "De"){
  222. sFinalSerpienteX = sFinalSerpienteX + 1;
  223. }
  224.  
  225. }
  226.  
  227. // COLA ----------------------------------------------
  228.  
  229. //Leer giros en la Matriz
  230. switch(Zona[FinalSerpienteX - MinX +1][FinalSerpienteY - MinY +1]){
  231. case 1:
  232. DireccionFinalSerpiente = "Ar";
  233. Zona[FinalSerpienteX - MinX +1][FinalSerpienteY - MinY +1] = 0;
  234. break;
  235. case 2:
  236. DireccionFinalSerpiente = "De";
  237. Zona[FinalSerpienteX - MinX +1][FinalSerpienteY - MinY +1] = 0;
  238. break;
  239. case 3:
  240. DireccionFinalSerpiente = "Ab";
  241. Zona[FinalSerpienteX - MinX +1][FinalSerpienteY - MinY +1] = 0;
  242. break;
  243. case 4:
  244. DireccionFinalSerpiente = "Iz";
  245. Zona[FinalSerpienteX - MinX +1][FinalSerpienteY - MinY +1] = 0;
  246. break;
  247. default:
  248. DireccionFinalSerpiente = DireccionFinalSerpiente;
  249. Zona[FinalSerpienteX - MinX +1][FinalSerpienteY - MinY +1] = 0;
  250. break;
  251. }
  252.  
  253. if (DireccionFinalSerpiente == "Ar"){
  254. FinalSerpienteY = FinalSerpienteY - 1;
  255. }
  256. if (DireccionFinalSerpiente == "Iz"){
  257. FinalSerpienteX = FinalSerpienteX - 1;
  258. }
  259. if (DireccionFinalSerpiente == "Ab"){
  260. FinalSerpienteY = FinalSerpienteY + 1;
  261. }
  262. if (DireccionFinalSerpiente == "De"){
  263. FinalSerpienteX = FinalSerpienteX + 1;
  264. }
  265. }
  266. void PintarSerpiente(){
  267.  
  268. Color(10,0);
  269. gotoxy(SerpienteX, SerpienteY); printf("%c", IconoSerpiente);
  270. Color(15,0);
  271. }
  272. void Comer(int n){
  273. switch (n){
  274. case 1:
  275. Puntos = Puntos + 10;
  276. c1v = false;
  277. break;
  278. case 2:
  279. Puntos = Puntos + 10;
  280. c2v = false;
  281. break;
  282. case 3:
  283. Puntos = Puntos + 10;
  284. c3v = false;
  285. break;
  286. }
  287. Beep(800,5);
  288. AlargarSerpiente();
  289. if (c1v == false && c2v == false && c3v == false){
  290. MoverComida();
  291. DibujarC = true;
  292. }
  293. }
  294. void DibujarComida(){
  295. Color(13,0);
  296. gotoxy(c1x + MinX, c1y + MinY); printf("%c", IconoComida);
  297. gotoxy(c2x + MinX, c2y + MinY); printf("%c", IconoComida);
  298. gotoxy(c3x + MinX, c3y + MinY); printf("%c", IconoComida);
  299. Color(15,0);
  300. }
  301. void MoverComida(){
  302. c1x = (rand() % 76); c1y = (rand() % 18);
  303. c2x = (rand() % 76); c2y = (rand() % 18);
  304. c3x = (rand() % 76); c3y = (rand() % 18);
  305. c1v = true; c2v = true; c3v = true;
  306. }
  307. void AlargarSerpiente(){
  308. Largura = Largura + 1;
  309. Velocidad = Velocidad - 2;
  310. if (DireccionFinalSerpiente == "Ar"){
  311. FinalSerpienteY = FinalSerpienteY + 1;
  312. }
  313. if (DireccionFinalSerpiente == "Iz"){
  314. FinalSerpienteX = FinalSerpienteX + 1;
  315. }
  316. if (DireccionFinalSerpiente == "Ab"){
  317. FinalSerpienteY = FinalSerpienteY - 1;
  318. }
  319. if (DireccionFinalSerpiente == "De"){
  320. FinalSerpienteX = FinalSerpienteX - 1;
  321. }
  322. }
  323. void GameOver(){
  324. cls();
  325. cout << "- Game Ov3r -" << endl;
  326. cout << "Puntos: " << Puntos << endl;
  327. cout << "> Pulsa Enter para Salir <" << endl;
  328. do{Tecla = getch();}while(Tecla != 13);
  329. exit(1);
  330. }
  331. void BorrarCola() {
  332.  
  333. //Borrar Cola Vieja
  334. if (FinalSerpienteX == c1x && FinalSerpienteY == c1y && c1v == true){}else{
  335. gotoxy(FinalSerpienteX,FinalSerpienteY); puts(IconoFondo);}
  336.  
  337. if (FinalSerpienteX == c2x && FinalSerpienteY == c2y && c2v == true){}else{
  338. gotoxy(FinalSerpienteX,FinalSerpienteY); puts(IconoFondo);}
  339.  
  340. if (FinalSerpienteX == c3x && FinalSerpienteY == c3y && c3v == true){}else{
  341. gotoxy(FinalSerpienteX,FinalSerpienteY); puts(IconoFondo);}
  342.  
  343. /*
  344. gotoxy(SerpienteX,SerpienteY);
  345. puts(IconoFondo);
  346. */
  347. }
  348. void PintarZona(){
  349. for (int x=1; x<77;x++){
  350. for (int y=1; y<19; y++){
  351. gotoxy(1+x,4+y);
  352. switch(Zona[x][y]){
  353. case 0:
  354. cout << " ";
  355. break;
  356. case 1:
  357. cout << "1";
  358. break;
  359. case 2:
  360. cout << "2";
  361. break;
  362. case 3:
  363. cout << "3";
  364. break;
  365. case 4:
  366. cout << "4";
  367. break;
  368. default:
  369. cout << "?";
  370. break;
  371. }
  372. }
  373. }
  374.  
  375. }
  376. void DibujarPuntos(int p){
  377.  
  378. gotoxy(54,2); cout << "PUNTOS: ";
  379. Color(12,0); printf("%d", p);
  380. Color(15,0);
  381. }
  382. void BorrarZona(){
  383.  
  384. for (int x=1; x<77;x++){
  385. for (int y=1; y<19; y++){
  386. Zona[x][y] = 0;
  387. }}
  388. }
  389. void DibujarMapa(){
  390.  
  391. Color(15, 0);
  392. Lineas(1,2,2,1,48);
  393. Color(7, 0);
  394. Lineas(2,53,2,1,25);
  395. Color(15, 0);
  396. Lineas(1,2,5,18,76);
  397.  
  398. //Mensaje Isc
  399. Color(14, 0);
  400. gotoxy(16,2); cout << "Snake - Black M4ster";
  401. Color(15, 0);
  402. }
  403.  

Isc.cpp
Código
  1. #include <windows.h>
  2. #include <conio.h>
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. void gotoxy( short x, short y ) {
  7. HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
  8. COORD position = { x, y };
  9. SetConsoleCursorPosition( hStdout, position );
  10. }
  11.  
  12. void cls() {
  13.  DWORD n;
  14.  DWORD size;
  15.  COORD coord = {0};
  16.  CONSOLE_SCREEN_BUFFER_INFO csbi;
  17.  HANDLE h = GetStdHandle ( STD_OUTPUT_HANDLE );
  18.  GetConsoleScreenBufferInfo ( h, &csbi );
  19.  size = csbi.dwSize.X * csbi.dwSize.Y;
  20.  FillConsoleOutputCharacter ( h, TEXT ( ' ' ), size, coord, &n );
  21.  GetConsoleScreenBufferInfo ( h, &csbi );
  22.  FillConsoleOutputAttribute ( h, csbi.wAttributes, size, coord, &n );
  23.  SetConsoleCursorPosition ( h, coord );
  24. }
  25.  
  26. void Lineas(int Estilo,int xA,int yA,int hA,int wA){
  27. int ch,cv,eari,eard,eai,ead;
  28.  
  29. switch (Estilo){
  30. case 1:
  31. ch = 196; cv = 179;
  32. eari = 218; eard = 191;
  33. eai = 192; ead = 217;
  34. break;
  35. case 2:
  36. ch = 205; cv = 186;
  37. eari = 201; eard = 187;
  38. eai = 200; ead = 188;
  39. break;
  40. default:
  41. ch = 196; cv = 179;
  42. eari = 218; eard = 191;
  43. eai = 192; ead = 217;
  44. break;
  45. }
  46. //Horizontal
  47. for (int i=xA;i<wA+xA;i++){
  48. gotoxy(i,yA-1); printf("%c",ch);
  49. }
  50. for (int i=xA;i<wA+xA;i++){
  51. gotoxy(i,yA+hA); printf("%c",ch);
  52. }
  53.  
  54. //Vertical
  55. for (int i=yA;i<hA+yA;i++){
  56. gotoxy(xA-1,i); printf("%c",cv);
  57. }
  58. for (int i=yA;i<hA+yA;i++){
  59. gotoxy(xA+wA,i); printf("%c",cv);
  60. }
  61.  
  62. //Esquinas
  63. gotoxy(xA-1,yA-1); printf("%c",eari);
  64. gotoxy(xA+wA,yA-1); printf("%c",eard);
  65.  
  66. gotoxy(xA-1,yA+hA); printf("%c",eai);
  67. gotoxy(xA+wA,yA+hA); printf("%c",ead);
  68. }
  69.  
  70. void Color(int foreground, int background) {
  71. int Colorfinal = (background * 16) + foreground;
  72. SetConsoleTextAttribute(GetStdHandle (STD_OUTPUT_HANDLE),Colorfinal);
  73. }
  74.  
287  Seguridad Informática / Seguridad / Re: [Ayuda para protegerme de un Hack de Juego] en: 25 Junio 2013, 10:40 am
Eing? Le recomendáis antivirus?
Está claro que esos Hack explotan un Buffer OverFlow para hacer que se cierre dando error. No localizan tu ip, nada de eso. Simplemente provocan un error (causado por un bug) en tu juego, para que se te cierre
288  Seguridad Informática / Seguridad / Re: [Reto] Descifrar swf en: 25 Junio 2013, 10:37 am
Este reto no sirve, ya que el swf no se vé
Para estar cifrado correctamente, debería verse
289  Seguridad Informática / Hacking / Re: ¿Conocéis una página/servidor para hackear legalmente? en: 21 Junio 2013, 10:55 am
Mi propio Wargame  :rolleyes:
http://zonaisc.com  ;-)
Suerte a los que se atrevan  :silbar:
290  Foros Generales / Foro Libre / Re: Cuantas habilidades tenéis? (Programación, idiomas, aprendizaje de algo) ;) en: 21 Junio 2013, 09:14 am
Spammer de *****, me das tu ip?  >:D
Páginas: 1 ... 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 [29] 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 ... 61
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines