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ú

Mensajes - Abraham20

#21
Eliminalo del registro

Para eliminar registros de una base de datos, utiliza el método TableAdapter.Update o el método TableAdapter.Delete.  Si tu aplicación no utiliza TableAdapters, puedes utilizar objetos de comando para eliminar registros de una base de datos (por ejemplo, ExecuteNonQuery).

Generalmente se utiliza el método TableAdapter.Update cuando la aplicación utiliza conjuntos de datos para almacenar datos, en tanto que se utiliza el método TableAdapter.Delete cuando la aplicación utiliza objetos para almacenar los datos. 

Si el TableAdapter no dispone de un método Delete, significa que el TableAdapter está configurado para utilizar procedimientos almacenados o que su propiedad GenerateDBDirectMethods está establecida en false.  Prueba a establecer la propiedad GenerateDBDirectMethods de TableAdapter en true desde el Diseñador de Dataset y guarda el conjunto de datos para volver a generar el TableAdapter. Si aun así el TableAdapter no dispone de un método Delete, probablemente la tabla no proporciona información suficiente para distinguir entre filas individuales (por ejemplo, la tabla no dispone de clave principal).

Eliminar registros mediante TableAdapters 

Los TableAdapters proporcionan maneras diferentes de eliminar registros de una base de datos en función de los requisitos de su aplicación. 

Si la aplicación utiliza conjuntos de datos para almacenar datos, puedes eliminar los registros del conjunto DataTable deseado en DataSet y, a continuación, llamar al método TableAdapter.Update.  El método TableAdapter.Update toma cualquier cambio en la tabla de datos y envía esos cambios a la base de datos (incluidos registros insertados, actualizados y eliminados).

Para eliminar registros de una base de datos utilizando el método TableAdapter.Update

Elimina los registros del DataTable deseado eliminando los objetos DataRow de la tabla. Después de que las filas se eliminen de DataTable, llama al método TableAdapter.Update. Puedes controlar la cantidad de datos que se actualizan pasando un objeto DataSet completo, un objeto DataTable, una matriz de DataRows o un único objeto DataRow.

Espero que funcione

Saludos
#22
Hola seth,
pero todos andan solo por 20 segundos.

Cómo puedo cambiar eso?

Gracias ;)
#23
Haz paisajes aventureros;
Extiende el mapa

;)
#24
debes darle a menú e ir a la opción USB MSDC. En este instante el ordenador reconocerá el dispositivo. Recuerda que debe estar la tarjeta de memoria insertada.
Asegúrate de que la tarjeta de memoria funcione correctamente sin ser insertada en el Kadok, es decir, que funcione bien por si sola y que el ordenador la reconoce sin problemas. De esta manera descartaremos que el problema sea de la tarjeta.
#25
Citar
No entro en esos chats, pero si configuras el proxy todo lo que hagas a través de Internet lo hará por ese proxy.

Si. Pero la configuracion no funcionaba en Ares. Puedes probarlo si quieres ;)

Sin embargo consegui tener otra ip en una sala de chat de ares mediante un proxy. Pero a los 20 segundos se me desconecta la conexion.
Porque? Cómo puedo evitarlo

Saludos :)

Gracias
#26
Este ejemplo abrirá una ventana en el escritorio con un solo botón. Capturará los eventos para cerrar la ventana y mostrará un mensaje en consola para demostrarlo. Al pulsar el botón mostrará el mensaje "Hola Mundo" y se cerrará.

Es un ejemplo básico para comprobar como crear una ventana, un componente gráfico, cómo capturar eventos y asociarlos a una función.

Para compilar este ejemplo es necesatio tener instaladas las librerias gtk 2.0 y las cabeceras. En debian o ubunto eso se hace instalando el paquete libgtk2.0-dev. Ahora, lo compilas y ejecutas con las siguientes lineas:
$ gcc ventanagtk.c -o ventanagtk `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0`
$ ./ventanagtk
Los comandos pkg-config devuelven los includes y librerias que hay que indicar al compilador para compilar con gtk. Esto te ahorra especificar los includes y librerias manualmente.



Código: text
1: #include <gtk/gtk.h>

  3: /* Función respuesta para dar el mensaje en el botón. */
  4: static void hello( GtkWidget *widget,
  5:                    gpointer   data )
  6: {
  7:     g_print ("Hola Mundo\n");
  8: }

10: static gboolean delete_event( GtkWidget *widget,
11:                               GdkEvent  *event,
12:                               gpointer   data )
13: {
14:     
15: /* Si devuelves FALSE en el manejador de este evento hará que la
16: ventana se destruya. Si devuelves TRUE cancelaras el cierre de la
17: ventana. Esto te permite abortar intentos de cerrar la ventana. */

19:     g_print ("Capturado evento delete\n");
20:     return TRUE;
21: }

23: /* Función callback para la acción del botón.*/
24: static void destroy( GtkWidget *widget,
25:                      gpointer   data )
26: {
27:     gtk_main_quit ();
28: }

30: int main( int   argc,
31:           char *argv[] )
32: {
33:     /* GtkWidget es el tipo de datos para todos los Widgets*/
34:     GtkWidget *window;
35:     GtkWidget *button;
36:     
37:     /* Todas las aplicaciones que usan GTK deben llamar a esta función.
38: Sirve para que la libreria gtk se inicialice y compruebe los argumentos
39: en linea de comandos destinados a ella. */
40:     gtk_init (&argc, &argv);
41:     
42:     /* Creamos una nueva ventana en el escritorio.*/
43:     window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
44:     
45: /* la función signal_connect hace que cada vez que el objeto incicado reciba un evento
46: del tipo indicado, se llame a la función que se indica.*/

48: /* El evento "delete" se produce al indicar al gestor de ventanas que cierre
49: la ventana (normalmente con un botón con una X. En este caso lo asociamos con
50: una función que captura el evento, da un mensaje en consola y evita el cierre
51: de la ventana. */
52:     g_signal_connect (G_OBJECT (window), "delete_event",
53:                       G_CALLBACK (delete_event), NULL);
54:     
55: /* El evento destroy se produce al llamar a la fuciónn para destruir un widget.
56: Aquí lo conectamos a una función que cerrará el programa.*/

58:     g_signal_connect (G_OBJECT (window), "destroy",
59:                       G_CALLBACK (destroy), NULL);
60:     
61: /* Esto establece el ancho del borde de la ventana. */
62:     gtk_container_set_border_width (GTK_CONTAINER (window), 10);
63:     
64: /* Creamos un nuevo botón. */
65:     button = gtk_button_new_with_label ("Hola Mundo");
66:     
67: /* Conectamos el evento click de este botón, con la función que escribe
68: en consola el mensaje "Hola Mundo" */
69:     g_signal_connect (G_OBJECT (button), "clicked",
70:                       G_CALLBACK (hello), NULL);
71:     
72: /* Conectamos el evento click de este botón con la llamada a destruir
73: el widget de la ventana principal.*/
74:     g_signal_connect_swapped (G_OBJECT (button), "clicked",
75:                               G_CALLBACK (gtk_widget_destroy),
76:                               G_OBJECT (window));
77:     
78: /* Metemos el botón en la ventana. */
79:     gtk_container_add (GTK_CONTAINER (window), button);
80:     
81: /* Indicamos que se muestre el botón. */
82:     gtk_widget_show (button);
83:     
84: /* y la ventana */
85:     gtk_widget_show (window);
86:     
87:     /* Entramos en el bucle de eventos, donde toda aplicación orientada a eventos
88: debería entrar. */
89:     gtk_main ();
90:     
91:     return 0;
92: }


Suerte :)
#27
Ahh vale. Pues me alegro :)

Pero yo queria entrar a un chat de Ares con las Proxys. Puedes tu tambien?

Saludos ;)
#28
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
Hmmm que extraño... Lo probaré esta noche cuando llegue.

Te paso otras por si acaso:

You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

Ahh vale.
Aprovecho para decirte que los links tampoco sirven  :(
Saludos!
#29
Hola,
querias hacer una wargame a partir de esta imagen?
No entiendo este tema. Que quieres hacer

Espero tu respuesta.

Gracias ;)
#30
Hola Stiuvert,
lo de la proxy en ares es buenisimo.
El problema es este:

Prueba una proxy del link que me pasaste.

En todas las Proxys te dira: "Test failed"

Te pasa a vos tambien?

Saludos :)
#31
Hola Stiuvert; hola seth,
VPN es bueno y lo de configurar la proxy tambien;
pero para que me entiendan a lo que quiero llegar:


hay alguna manera o algun programa que permita que me conecte a una proxy que solamente se aplique al programa que yo indique?
Es decir que para chatear en ares quiero una proxy; pero para navegar en el internet al mismo tiempo quiero mi ip pública normal

Espero que me exprese bien

Gracias y saludos :)

#32
Hola,
muchisimas gracias genios de la vida por explicarme como funciona esto;
Tiene bastante esperiencia en esto. El foro necesitara especialmente su ayuda.

Queria hacer un post nuevo.
Pero como creo que esta mal sigo aqui:


Tengo windows 10
Me voy a Inicio; despues a Ajustes; luego a Redes e internet; luego me voy a Proxy;
En Configuración de proxy manual prendo la opcion: Usar un servidor proxy;

Luego me voy a esta pagina: You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
En el filtro solo cambio la opcion de tipos; ahi le pongo high anonymity;

Pero cuando me conecto a un servidor Sb0t, este sabe todavia de que pais soy.
Porque? Como puedo hacer para que no lo sepa?

Gracias y saludos :)
#33
abre cert.exe y pon el contenido aqui por favor

lo que pasa es que probablemente instalaste openssl para convertir el certificado pfx a pem sin encriptar y los nuevos DLL del openssl se instalaron en una carpeta compartida.

:)
#34
Click derecho y selecciona la siguiente accion:

CPU window -> Search for -> All Referenced Text Strings

Una vez que OllyDbg lo encontro, haz doble clic en él y navega a la dirección de memoria

suerte
#35
descargate este serial You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

saludos
#36
Hola,
:o oh no; recien ahora ceo tu mensaje. Ya Abri un nuevo tema. Lo dejo como esta o lo escribo en este post mi duda y pido que me cierren el nuevo post que hice ayer?

Saludos

MODERADOR: Seguimos mejor aquí




Hola,
de donde saca mi ip Cb0t 2.70?

Les dejo dos archivos .cs que provienen del codigo fuente de Cb0t 2.70:

AresDataPacket.cs:

Código: text
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;

namespace Ares.PacketHandlers
{
    /// <summary>
    /// Helpful Ares Packet Processor Object
    /// </summary>
    public class AresDataPacket
    {
        private int Position = 0;
        private List<byte> Data = new List<byte>();

        /// <summary>
        /// Creates an empty Ares Data Packet Object ready for Writing
        /// </summary>
        public AresDataPacket()
        {
            this.Data.Clear();
            this.Position = 0;
        }

        /// <summary>
        /// Creates a populated Ares Data Packet Object ready for Reading
        /// </summary>
        /// <param name="bytes">The Byte Array of the Received Ares Packet</param>
        public AresDataPacket(byte[] bytes)
        {
            this.Data.Clear();
            this.Position = 0;
            this.Data.AddRange(bytes);
        }

        /// <summary>
        /// Returns size of byte array
        /// </summary>
        /// <returns></returns>
        public int GetByteCount()
        {
            return this.Data.Count;
        }

        /// <summary>
        /// Examine current byte without incrementing the reader index
        /// </summary>
        /// <returns></returns>
        public byte PeekByte()
        {
            return this.Data[this.Position];
        }

        /// <summary>
        /// Return the reader index of the first instance of a byte
        /// </summary>
        /// <param name="b"></param>
        /// <returns></returns>
        public int IndexOf(byte b)
        {
            return this.Data.IndexOf(b, this.Position);
        }

        /// <summary>
        /// Return number of bytes unread in the packet reader
        /// </summary>
        /// <returns></returns>
        public int Remaining()
        {
            return this.Data.Count - this.Position;
        }

        /// <summary>
        /// Manually set the position of the Packet Reader
        /// </summary>
        /// <param name="position"></param>
        public void SetPosition(int position)
        {
            this.Position = position;
        }

        /// <summary>
        /// Force the Packet Reader to move forward one byte
        /// </summary>
        public void SkipByte()
        {
            this.Position++;
        }

        /// <summary>
        /// Force the Packet Reader to move forward a specified number of bytes
        /// </summary>
        /// <param name="count"></param>
        public void SkipBytes(int count)
        {
            this.Position += count;
        }

        /// <summary>
        /// Positions the Packet Reader ahead of the first 3 bytes which are reserved for Ares Protocol ID and Length
        /// </summary>
        public void PositionReaderAfterHeader()
        {
            this.Position = 3;
        }

        /// <summary>
        /// Packet Reader returns the next byte
        /// </summary>
        /// <returns></returns>
        public byte ReadByte()
        {
            byte tmp = this.Data[this.Position];
            this.Position++;
            return tmp;
        }

        /// <summary>
        /// Packet Reader returns the final byte
        /// </summary>
        /// <returns></returns>
        public byte LastByte()
        {
            return this.Data[this.Data.Count - 1];
        }

        /// <summary>
        /// Packet Reader returns the next specified number of bytes
        /// </summary>
        /// <param name="count"></param>
        /// <returns></returns>
        public byte[] ReadBytes(int count)
        {
            if ((this.Data.Count - this.Position) < count) return null;
            byte[] tmp = new byte[count];
            Array.Copy(this.Data.ToArray(), this.Position, tmp, 0, tmp.Length);
            this.Position += count;
            return tmp;
        }

        /// <summary>
        /// Packet Reader returns all remaining bytes
        /// </summary>
        /// <returns></returns>
        public byte[] ReadBytes()
        {
            byte[] tmp = new byte[this.Data.Count - this.Position];
            Array.Copy(this.Data.ToArray(), this.Position, tmp, 0, tmp.Length);
            this.Position += tmp.Length;
            return tmp;
        }

        /// <summary>
        /// Packet Reader returns the next 16 byte GUID
        /// </summary>
        /// <returns></returns>
        public Guid ReadGuid()
        {
            if ((this.Data.Count - this.Position) < 16) return new Guid();
            byte[] tmp = new byte[16];
            Array.Copy(this.Data.ToArray(), this.Position, tmp, 0, tmp.Length);
            this.Position += 16;
            return new Guid(tmp);
        }

        /// <summary>
        /// Packet Reader returns the next 2 byte Integer
        /// </summary>
        /// <returns></returns>
        public ushort ReadInt16()
        {
            if ((this.Data.Count - this.Position) < 2) return 0;
            ushort tmp = (ushort)BitConverter.ToInt16(this.Data.ToArray(), this.Position);
            this.Position += 2;
            return tmp;
        }

        /// <summary>
        /// Packet Reader returns the next 4 byte Integer
        /// </summary>
        /// <returns></returns>
        public uint ReadInt32()
        {
            if ((this.Data.Count - this.Position) < 4) return 0;
            uint tmp = (uint)BitConverter.ToInt32(this.Data.ToArray(), this.Position);
            this.Position += 4;
            return tmp;
        }

        /// <summary>
        /// Packet Reader returns the next 8 byte Integer
        /// </summary>
        /// <returns></returns>
        public ulong ReadInt64()
        {
            if ((this.Data.Count - this.Position) < 8) return 0;
            ulong tmp = (ulong)BitConverter.ToInt64(this.Data.ToArray(), this.Position);
            this.Position += 8;
            return tmp;
        }

        /// <summary>
        /// Packet Reader returns the next IPAddress Object
        /// </summary>
        /// <returns></returns>
        public IPAddress ReadIP()
        {
            if ((this.Data.Count - this.Position) < 4) return null;
            byte[] tmp = new byte[4];
            Array.Copy(this.Data.ToArray(), this.Position, tmp, 0, tmp.Length);
            this.Position += 4;
            return new IPAddress(tmp);
        }

        /// <summary>
        /// Packet Reader returns the next 4 byte Unix Timestamp DateTime Object
        /// </summary>
        /// <returns></returns>
        public DateTime ReadUnixTimeStamp()
        {
            if ((this.Data.Count - this.Position) < 4) return new DateTime();
            DateTime tmp = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
            tmp = tmp.AddSeconds(BitConverter.ToInt32(this.Data.ToArray(), this.Position));
            this.Position += 4;
            return tmp;
        }

        /// <summary>
        /// Packet Reader returns the next Null Terminated String
        /// </summary>
        /// <returns></returns>
        public String ReadString()
        {
            if (this.Position >= this.Data.Count) return String.Empty;
            int split = this.Data.IndexOf(0, this.Position);
            byte[] tmp = new byte[split > -1 ? (split - this.Position) : (this.Data.Count - this.Position)];
            Array.Copy(this.Data.ToArray(), this.Position, tmp, 0, tmp.Length);
            this.Position = split > -1 ? (split + 1) : this.Data.Count;
            return Encoding.UTF8.GetString(tmp);
        }

        /// <summary>
        /// Packet Writer adds a byte to the end of the packet
        /// </summary>
        /// <param name="b">The single Byte to be added</param>
        public void WriteByte(byte b)
        {
            this.Data.Add(b);
        }

        /// <summary>
        /// Packet Writer adds a byte array to the end of the packet
        /// </summary>
        /// <param name="b">The Byte Array to be added</param>
        public void WriteBytes(byte[] b)
        {
            this.Data.AddRange(b);
        }

        /// <summary>
        /// Packet Writer adds a 16 byte GUID to the end of the packet
        /// </summary>
        /// <param name="g">The GUID to be added</param>
        public void WriteGuid(Guid g)
        {
            this.Data.AddRange(g.ToByteArray());
        }

        /// <summary>
        /// Packet Writer adds a 2 byte Integer to the end of the packet
        /// </summary>
        /// <param name="i">The 16 bit Integer to be added</param>
        public void WriteInt16(ushort i)
        {
            this.Data.AddRange(BitConverter.GetBytes(i));
        }

        /// <summary>
        /// Packet Writer adds a 4 byte Integer to the end of the packet
        /// </summary>
        /// <param name="i">The 32 bit Integer to be added</param>
        public void WriteInt32(uint i)
        {
            this.Data.AddRange(BitConverter.GetBytes(i));
        }

        /// <summary>
        /// Packet Writer adds a 8 byte Integer to the end of the packet
        /// </summary>
        /// <param name="i">The 64 bit Integer to be added</param>
        public void WriteInt64(ulong i)
        {
            this.Data.AddRange(BitConverter.GetBytes(i));
        }

        /// <summary>
        /// Packet Writer converts a dotted IP Address to bytes and adds to the end of the packet
        /// </summary>
        /// <param name="ip_string">The Dotted IP Address to be added</param>
        public void WriteIP(String ip_string)
        {
            this.Data.AddRange(IPAddress.Parse(ip_string).GetAddressBytes());
        }

        /// <summary>
        /// Packet Writer converts a numeric IP Address to bytes and adds to the end of the packet
        /// </summary>
        /// <param name="ip_numeric">The Numeric IP Address to be added</param>
        public void WriteIP(long ip_numeric)
        {
            this.Data.AddRange(new IPAddress(ip_numeric).GetAddressBytes());
        }

        /// <summary>
        /// Packet Writer converts a 4 element byte array into Network Order and adds to the end of the packet
        /// </summary>
        /// <param name="ip_bytes">The 4 element Byte Array to be added</param>
        public void WriteIP(byte[] ip_bytes)
        {
            if (ip_bytes.Length != 4) return;
            this.Data.AddRange(new IPAddress(ip_bytes).GetAddressBytes());
        }

        /// <summary>
        /// Packet Writer converts an IPAddress Object into bytes and adds to the end of the packet
        /// </summary>
        /// <param name="ip_object">The IPAddress Object to be added</param>
        public void WriteIP(IPAddress ip_object)
        {
            this.Data.AddRange(ip_object.GetAddressBytes());
        }

        /// <summary>
        /// Packet Writer adds a 4 byte Integer representing the current Unix Time to the end of the packet
        /// </summary>
        public void WriteUnixTimeStamp()
        {
            TimeSpan ts = (DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0));
            this.Data.AddRange(BitConverter.GetBytes((uint)ts.TotalSeconds));
        }

        /// <summary>
        /// Packet Writer adds a Null Terminated String to the end of the packet
        /// </summary>
        /// <param name="text">The String to be added</param>
        public void WriteString(String text)
        {
            this.Data.AddRange(Encoding.UTF8.GetBytes(text));
            this.Data.Add(0);
        }

        /// <summary>
        /// Packet Writer adds a String to the end of the packet
        /// </summary>
        /// <param name="text">The String to be added to the packet</param>
        /// <param name="null_terminated">Set to False if the string does not require Null Termination</param>
        public void WriteString(String text, bool null_terminated)
        {
            this.Data.AddRange(Encoding.UTF8.GetBytes(text));
            if (null_terminated) this.Data.Add(0);
        }

        /// <summary>
        /// Convert AresDataPacket Object into a Byte Array
        /// </summary>
        /// <returns></returns>
        public byte[] ToByteArray()
        {
            return this.Data.ToArray();
        }

        /// <summary>
        /// Convert AresDataPacket Object into a correctly formatted Ares Packet Byte Array ready for sending
        /// </summary>
        /// <param name="packet_id">The Ares Protocol Packet Identification Number</param>
        /// <returns></returns>
        public byte[] ToAresPacket(byte packet_id)
        {
            List<byte> tmp = new List<byte>(this.Data.ToArray());
            tmp.Insert(0, packet_id);
            tmp.InsertRange(0, BitConverter.GetBytes((ushort)(tmp.Count - 1)));
            return tmp.ToArray();
        }

        /// <summary>
        /// Convert AresDataPacket Object into a corrently formatted Ares DC Packet
        /// </summary>
        /// <param name="packet_id">The Ares Protocol Packet Identification Number</param>
        /// <returns></returns>
        public byte[] ToAresDCPacket(byte packet_id)
        {
            List<byte> tmp = new List<byte>(this.Data.ToArray());
            tmp.Insert(0, packet_id);
            tmp.InsertRange(0, BitConverter.GetBytes((ushort)(tmp.Count - 1)));
            tmp.Insert(0, 0);
            return tmp.ToArray();
        }
    }
}



Nota: AresDataPacket.cs tambien aparece en Sb0t 4.60 y en otras versiones.

Packet.cs:

Código: text
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;
using Ares.PacketHandlers;

namespace cb0t_chat_client_v2
{
    class Packets
    {
        public delegate void SendPacketDelegate(byte[] packet);

        public static byte[] CustomPM(String target, String text)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("cb0t_pm_msg", true);
            packet.WriteString(target, true);
            String str = text;
            str = Helpers.FormatAresColorCodes(str);
            byte[] msg = Helpers.SoftEncrypt(target, Encoding.UTF8.GetBytes(str));
            packet.WriteBytes(msg);
            return packet.ToAresPacket(200);
        }

        public static byte[] DisableCustomNames(bool yes)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("cb0t_no_custom_names", true);
            byte[] buf = packet.ToAresPacket(yes ? (byte)202 : (byte)203);
            packet = new AresDataPacket();
            packet.WriteBytes(buf);
            return packet.ToAresPacket(250);
        }

        public static byte[] CustomEmoteItem(CEmoteItem item)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString(item.Shortcut);
            packet.WriteByte((byte)item.Size);
            packet.WriteBytes(item.Image);
            byte[] buf = packet.ToAresPacket(221);
            packet = new AresDataPacket();
            packet.WriteBytes(buf);
            return packet.ToAresPacket(250);
        }

        public static byte[] CustomEmoteFlag()
        {
            return new byte[] { 3, 0, 250, 0, 0, 220 };
        }

        public static byte[] CustomEmoteDelete(String shortcut)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString(shortcut);
            byte[] buf = packet.ToAresPacket(222);
            packet = new AresDataPacket();
            packet.WriteBytes(buf);
            return packet.ToAresPacket(250);
        }

        public static byte[] EnableClips(bool main, bool pvt)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteByte(main ? (byte)1 : (byte)0);
            packet.WriteByte(pvt ? (byte)1 : (byte)0);
            byte[] buf = packet.ToAresPacket(205);
            packet = new AresDataPacket();
            packet.WriteBytes(buf);
            return packet.ToAresPacket(250);
        }

        public static byte[] VCIgnore(String name)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString(name);
            byte[] buf = packet.ToAresPacket(210);
            packet = new AresDataPacket();
            packet.WriteBytes(buf);
            return packet.ToAresPacket(250);
        }

        public static byte[] LoginPacket()
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteGuid(Settings.my_guid);
            packet.WriteInt16(666);
            packet.WriteByte(0);
            packet.WriteInt16(Settings.dc_port); // dc port
            packet.WriteIP("0.0.0.0");
            packet.WriteInt16(65535);
            packet.WriteInt32(0); // speed no longer needed
            packet.WriteString(Settings.my_username, true);
            packet.WriteString("cb0t 2.70 client", true);
            packet.WriteIP(Settings.local_ip);
            packet.WriteIP(Settings.external_ip); // external
            packet.WriteByte(7); // browse + zlib
            packet.WriteBytes(new byte[] { 0, 0, 0 });
            packet.WriteByte(Settings.age);
            packet.WriteByte(Settings.sex);
            packet.WriteByte(Settings.country);
            packet.WriteString(Settings.region);
            return packet.ToAresPacket(2);
        }

        public static byte[] UpdatePacket()
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteInt16(666);
            packet.WriteByte(7); // browse + zlib
            packet.WriteIP("0.0.0.0");
            packet.WriteInt16(0);
            packet.WriteIP(Settings.external_ip); // external
            packet.WriteBytes(new byte[] { 0, 0, 0 });
            packet.WriteByte(Settings.age);
            packet.WriteByte(Settings.sex);
            packet.WriteByte(Settings.country);
            packet.WriteString(Settings.region);
            return packet.ToAresPacket(4);
        }

        public static Byte[] FakeFilePacket(String filename)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteByte(0);
            packet.WriteInt32(69);
            packet.WriteInt16(4);
            packet.WriteString("cb0t123456789012345", false);
            packet.WriteByte((byte)filename.Length);
            packet.WriteInt16((ushort)(filename.Length + filename.Length + 4));
            packet.WriteByte((byte)filename.Length);
            packet.WriteByte(15);
            packet.WriteString(filename, false);
            packet.WriteByte((byte)filename.Length);
            packet.WriteByte((byte)1);
            packet.WriteString(filename, false);
            return packet.ToAresPacket(50);
        }

        public static byte[] TextPacket(String text)
        {
            AresDataPacket packet = new AresDataPacket();

            if (text.Length > 250)
                text = text.Substring(0, 250);

            packet.WriteString(Helpers.FormatAresColorCodes(text), false);
            return packet.ToAresPacket(10);
        }

        public static byte[] EmotePacket(String text)
        {
            AresDataPacket packet = new AresDataPacket();

            if (text.Length > 250)
                text = text.Substring(0, 250);

            packet.WriteString(Helpers.FormatAresColorCodes(text), false);
            return packet.ToAresPacket(11);
        }

        public static byte[] FontPacket()
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteByte((byte)Settings.p_font_size);
            packet.WriteString(Settings.p_font_name, true);
            packet.WriteByte((byte)Settings.p_name_col);
            packet.WriteByte((byte)Settings.p_text_col);
            byte[] buf = packet.ToAresPacket(204);
            packet = new AresDataPacket();
            packet.WriteBytes(buf);
            return packet.ToAresPacket(250);
        }

        public static byte[] FontOffPacket()
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteBytes(new byte[] { 0, 0 });
            byte[] buf = packet.ToAresPacket(204);
            packet = new AresDataPacket();
            packet.WriteBytes(buf);
            return packet.ToAresPacket(250);
        }

        public static byte[] PMPacket(String name, String text)
        {
            AresDataPacket packet = new AresDataPacket();

            if (text.Length > 200)
                text = text.Substring(0, 200);

            packet.WriteString(name);
            packet.WriteString(Helpers.FormatAresColorCodes(text), false);
            return packet.ToAresPacket(25);
        }

        public static byte[] CommandPacket(String text)
        {
            AresDataPacket packet = new AresDataPacket();

            if (text.Length > 200)
                text = text.Substring(0, 200);

            packet.WriteString(Helpers.FormatAresColorCodes(text), false);
            return packet.ToAresPacket(74);
        }

        public static byte[] BrowseRequestPacket(String target, ushort ident, byte type)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteInt16(ident);
            packet.WriteByte(type);
            packet.WriteString(target, false);
            return packet.ToAresPacket(52);
        }

        public static byte[] IgnoreUserPacket(String name, bool ignore)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteByte(ignore ? (byte)1 : (byte)0);
            packet.WriteString(name);
            return packet.ToAresPacket(45);
        }

        public static byte[] NudgePacket(String source, String target)
        {
            byte[] temp = Encoding.UTF8.GetBytes("0" + source);
            temp = AresCryptography.e67(temp, 1488);
            temp = Encoding.Default.GetBytes(Convert.ToBase64String(temp));

            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("cb0t_nudge");
            packet.WriteString(target);
            packet.WriteBytes(temp);
            return packet.ToAresPacket(200);
        }

        public static byte[] NudgeRejectPacket(String target)
        {
            byte[] temp = Encoding.UTF8.GetBytes("1");
            temp = AresCryptography.e67(temp, 1488);
            temp = Encoding.Default.GetBytes(Convert.ToBase64String(temp));

            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("cb0t_nudge");
            packet.WriteString(target);
            packet.WriteBytes(temp);
            return packet.ToAresPacket(200);
        }

        public static byte[] PasswordPacket(String password)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString(password, false);
            return packet.ToAresPacket(82);
        }

        public static byte[] AutoLoginPasswordPacket(ChannelObject cObj)
        {
            List<byte> temp = new List<byte>();
            temp.AddRange(SHA1.Create().ComputeHash(Encoding.UTF8.GetBytes(cObj.password)));
            temp.InsertRange(0, cObj.ip.GetAddressBytes());
            temp.InsertRange(0, BitConverter.GetBytes(cObj.cookie));

            AresDataPacket packet = new AresDataPacket();
            packet.WriteBytes(SHA1.Create().ComputeHash(temp.ToArray()));
            return packet.ToAresPacket(7);
        }

        public static byte[] PersonalMessagePacket()
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString(Settings.personal_message, false);
            return packet.ToAresPacket(13);
        }

        public static byte[] UserlistSongPacket(String text)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteByte(7);
            packet.WriteString(text, false);
            return packet.ToAresPacket(13);
        }

        public static byte[] AvatarPacket()
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteBytes(Avatar.avatar_small);
            return packet.ToAresPacket(9);
        }

        public static byte[] ScribbleOncePacket(String target, byte[] data)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("cb0t_scribble_once");
            packet.WriteString(target);
            packet.WriteBytes(data);
            return packet.ToAresPacket(200);
        }

        public static byte[] ScribbleFirstPacket(String target, byte[] data)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("cb0t_scribble_first");
            packet.WriteString(target);
            packet.WriteBytes(data);
            return packet.ToAresPacket(200);
        }

        public static byte[] ScribbleChunkPacket(String target, byte[] data)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("cb0t_scribble_chunk");
            packet.WriteString(target);
            packet.WriteBytes(data);
            return packet.ToAresPacket(200);
        }

        public static byte[] ScribbleLastPacket(String target, byte[] data)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("cb0t_scribble_last");
            packet.WriteString(target);
            packet.WriteBytes(data);
            return packet.ToAresPacket(200);
        }

        public static byte[] ScribbleRejectedPacket(String target)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("cb0t_scribble_reject");
            packet.WriteString(target);
            packet.WriteByte(1);
            return packet.ToAresPacket(200);
        }

        public static byte[] LagCheckPacket(String name, ulong time)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("cb0t_lag_check");
            packet.WriteString(name);
            packet.WriteInt64(time);
            return packet.ToAresPacket(200);
        }

        public static byte[] LatencyCheckPacket(String name)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("cb0t_latency_check");
            packet.WriteString(name);
            TimeSpan ts = (DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0));
            packet.WriteInt64((ulong)ts.TotalMilliseconds);
            return packet.ToAresPacket(200);
        }

        public static byte[] WritingPacket(bool writing)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("cb0t_writing");
            packet.WriteByte(writing ? (byte)2 : (byte)1);
            return packet.ToAresPacket(201);
        }

        public static byte[] OnlineStatusPacket()
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("cb0t_online_status");
            packet.WriteByte((byte)Settings.my_status);
            return packet.ToAresPacket(201);
        }

        // Direct Chat

        public static byte[] DCSessionRequestString()
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("CHAT CONNECT/0.1", false);
            packet.WriteBytes(new byte[] { 13, 10, 13, 10 });

            return packet.ToByteArray();
        }

        public static byte[] DCVersionString()
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("CHAT/0.1 200 OK", false);
            packet.WriteBytes(new byte[] { 13, 10, 13, 10 });

            return packet.ToByteArray();
        }

        public static byte[] DCMyInfo()
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString("|01:0.0.0.0:0|" + Settings.external_ip.ToString() + ":" + Settings.dc_port, false);
            packet.WriteByte(10);
            packet.WriteString("|02:" + Settings.my_username, false);
            packet.WriteByte(10);
            packet.WriteString("|03:2.1.1.3035", false);
            packet.WriteByte(10);
            packet.WriteBytes(new byte[] { 0, 10, 0, 29 });
            packet.WriteIP(Settings.external_ip);
            packet.WriteInt16(Settings.dc_port);
            packet.WriteIP(Settings.local_ip);
            packet.WriteByte(0);
            packet.WriteByte((byte)(Settings.my_username.Length + 1));
            packet.WriteBytes(new byte[] { 0, 26 });
            packet.WriteString(Settings.my_username);
            packet.WriteBytes(new byte[] { 0, 5, 0, 12 });
            packet.WriteIP(Settings.local_ip);
            packet.WriteByte(1);

            return packet.ToByteArray();
        }

        public static byte[] DCPing()
        {
            return new AresDataPacket().ToAresDCPacket(10);
        }

        public static byte[] DCPong()
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteIP(Settings.external_ip);
            packet.WriteInt16(Settings.dc_port);
            packet.WriteIP(Settings.local_ip);

            return packet.ToAresDCPacket(30);
        }

        public static byte[] DCTextMessage(String text)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString(text, false);

            return packet.ToAresDCPacket(1);
        }

        public static byte[] DCSendFileRequest(ulong filesize, ushort referral, uint rnd, String filename)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteInt64(filesize);
            packet.WriteInt16(referral);
            packet.WriteInt32(rnd);
            packet.WriteString(filename);
            packet.WriteByte(0);

            return packet.ToAresDCPacket(2);
        }

        public static byte[] DCAcceptFileRequest(String filename)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteBytes(new byte[8]);
            packet.WriteString(filename);
            packet.WriteByte(0);

            return packet.ToAresDCPacket(3);
        }

        public static byte[] DCDeclineFileRequest(String filename)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteString(filename);

            return packet.ToAresDCPacket(4);
        }

        public static byte[] DCFileChunk(ushort referral, byte[] data)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteInt16(referral);
            packet.WriteBytes(data);

            return packet.ToAresDCPacket(5);
        }

        public static byte[] DCAvatarChunkPacket(byte[] data)
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteBytes(data);
            return packet.ToAresDCPacket(6);
        }

        public static byte[] DCAvatarEndPacket()
        {
            return new AresDataPacket().ToAresDCPacket(6);
        }

    }
}


Les sirve esta parte de Packets.cs?
Linea 83 a 104:
Código: text
 public static byte[] LoginPacket()
        {
            AresDataPacket packet = new AresDataPacket();
            packet.WriteGuid(Settings.my_guid);
            packet.WriteInt16(666);
            packet.WriteByte(0);
            packet.WriteInt16(Settings.dc_port); // dc port
            packet.WriteIP("0.0.0.0");
            packet.WriteInt16(65535);
            packet.WriteInt32(0); // speed no longer needed
            packet.WriteString(Settings.my_username, true);
            packet.WriteString("cb0t 2.70 client", true);
            packet.WriteIP(Settings.local_ip);
            packet.WriteIP(Settings.external_ip); // external
            packet.WriteByte(7); // browse + zlib
            packet.WriteBytes(new byte[] { 0, 0, 0 });
            packet.WriteByte(Settings.age);
            packet.WriteByte(Settings.sex);
            packet.WriteByte(Settings.country);
            packet.WriteString(Settings.region);
            return packet.ToAresPacket(2);
        }


Gracias :)
#37
Hola,
no te hagas problema; te explicaste perfectamente;
hare un nuevo post para preguntar por la ip;
en cuanto a este post, la duda no se resolvio como yo queria pero con tu ayuda se aclaro el asunto

muchas gracias ;)
#38
Hola Nobody,
muchisisisimas gracias por ver el programa; te lo agradezco de verdad;

A que te refieres con request?
Y otra cosa: Yo crei que yo le mandaba un paquete al servidor y el servidor pregunta por mi ip mediante el paquete que yo le mande. No es asi?

gracias de nuevo :)
#39
No hay problema
El querer estuvo ;)
#40
hola,
Crea un nombre de usuario que no tenga ninguna relación contigo;

10 Minute Mail te crea una cuenta de correo electrónico desechable. Desde el momento en el que llegas a la página, tienes diez minutos para mandar tu mensaje anónimo antes de que se borre la cuenta;
Silent Sender te permite enviar mensajes anónimos y comprobar el estado de envío de estos;
Puedes ampliar la protección con Tor;

Utiliza un servidor de reenvío;
Un servidor de reenvío recibe correos electrónicos con instrucciones de a donde mandarlos para después reenviarlos de forma anónima;

El reenvío con seudónimo, también llamado servidor nym, sustituye la auténtica dirección de correo electrónico por una falsa e ilocalizable, y después envía el mensaje al destinatario. Después, el destinatario puede responder al servidor de reenvío;
Un servidor de reenvío cypherpunk te permite encriptar un mensaje y enviarlo al servidor, donde se desencripta y se envía al destinatario. Este método protege tu mensaje de la posible vigilancia de tu buzón de entrada;
Un servidor de reenvío Mixmaster encripta tus mensajes antes de enviarlos y los protege del análisis de tráfico;
Un servidor de reenvío Mixminion encripta tus mensajes y te permite recibir respuestas de los destinatarios, no como Mixmaster, que es unilateral;

Saludos ;)