|
Mostrar Mensajes
|
Páginas: 1 2 3 4 5 6 [7] 8
|
61
|
Foros Generales / Foro Libre / Re: Sintomas de que su hijo es un hacker
|
en: 6 Febrero 2015, 20:59 pm
|
¿Juega su hijo al "CounterStrike"?
Bajo la apariencia de un juego de ordenador, el programa "CounterStrike" esconde un mundo de realidad virtual, donde los hackers se reúnen para formar clanes (grupos hackers), así mismo este juego fomenta la apología del terrorismo y la violencia, proporciona información real para actos terroristas, como detallados manuales del uso de la metralleta kalasnikov o de bombas de mano (tipo flash-bang) caseras. Si encuentra a su hijo jugando al "counter" (como suelen abreviar los hackers) , dialogue con el, y hágale entender que este tipo de programas no están permitidos en su casa. Otras variantes del "CounterStrike" (los llamados en la jerga hacker MODS) son los programas "Doom", "Ku-EIC" y el "Sims". ¿Ha descubierto de su hijo consume drogas? Es habitual la relación del mundo del Hacker, con las drogas ilegales , particularmente los hackers tienden a consumir drogas que les ayuden a pasar horas y horas despiertos delante del ordenador, como anfetaminas, speed, extasis, crack, etc. Si su hijo usa habitualmente una computadora y consume drogas, quizás esto solo sea un síntoma de que ha entrado en el submundo de los hackers.
Enserio eso me ha matado xD
|
|
|
64
|
Programación / .NET (C#, VB.NET, ASP) / Re: [C#] detectar imagen y obtener coordenadas
|
en: 6 Febrero 2015, 16:59 pm
|
Hola ^^ sabrías qué falla aquí? Bitmap bmpScreenshot = new Bitmap (Screen .PrimaryScreen.Bounds.Width, Screen .PrimaryScreen.Bounds.Height, PixelFormat .Format32bppArgb); Graphics gfxScreenshot = Graphics.FromImage(bmpScreenshot); gfxScreenshot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy); System.Drawing.Bitmap sourceImage = new Bitmap (@"C:\Users\PC\Documents\Visual Studio 2012\Projects\NeoBux\NeoBux\obj\Debug\Ball.bmp"); System.Drawing.Bitmap template = new Bitmap (bmpScreenshot ); ExhaustiveTemplateMatching tm = new ExhaustiveTemplateMatching (0 .921f ); TemplateMatch[] matchings = tm.ProcessImage(sourceImage, template);//fallo aquí
|
|
|
66
|
Programación / .NET (C#, VB.NET, ASP) / Re: [C#] ¿Cómo podría hacer esto?
|
en: 5 Febrero 2015, 18:54 pm
|
No te preocupes, aquí nadie es mejor que nadie y todos vienen a aprender. Hombre, por supuesto, solo debes obtener la imagen de la zona donde quieras buscar (puede ser una captura de la pantalla completa, claro), y si la imagen es demasiado grande redimensionar la imagen a unas dimensiones que te permitan realizar la búsqueda y comparación de imagen de una forma eficiente, rápida, pero sin aumentar el margen de falsos positivos, buscando esa relación (ej: 100x100 píxeles quizás, depende).
EDITO: No me ha quedado claro que camino vas a tomar para llevarlo a cabo, pero bueno vuelvo a aconsejarte utilizar la librería de AForge.Net, aunque he visto algoritmos de pago mucho más rápidos que obtienen los mismos o mejores resultados, pero AForge es excelente para ser gratis.
Realizar un algoritmo de ese estilo es relativamente fácil, de forma básica, pero es un tema muy delicado ya que procesar/comparar una imagen, una imagen que sea grande, es una operación muy lenta (y si usas metodologías anticuadas lo es aun mucho más), si no optimizas tu propio algoritmo hasta el punto que puede llegar a optimizarlo un grupo de desarrolladores profesionales en el tema que están vendiendo un producto de ese estilo entonces te puede quedar un algoritmo muy lento o incompetente en otros sentidos, y yo no soy ningún gurú en la optimización de este tema, pero llegué a implementar funcionalidades GPU para aumentar la velocidad de procesamiento de imagen y aun así no me convenció mucho el resultado que obtuve, sigo prefiriendo la estabilidad de AForge.
Saludos
ahora le hecho un vistazo ^^,y bueno no te dije lo que quería cambiar,a sí que te lo dejo ahora , estoy usando una lista de coordenadas. a.MouseClick("Left", X , Y, 1, 1); y bueno,resulta que donde quiero pulsar aparece de forma aleatoria en la pantalla,por lo que rara vez clicaba,y por eso necesitaba lo de las imágenes ^^
|
|
|
67
|
Programación / .NET (C#, VB.NET, ASP) / Re: [C#] ¿Cómo podría hacer esto?
|
en: 2 Febrero 2015, 20:14 pm
|
Buenas 1) El título de un tema debe describir el problema.Porfavor, lee las normas del subforo de programación.
¿Donde está el código que demuestra tus progresos?, en este lugar no hacemos trabajos, ayudamos a resolver dudas específicas o aportamos orientación. Hay varias librerías, algunas gratis y otras de pago, que ofrecen algoritmos profesionales de técnicas ImageSearch o PixelSearch, como por ejemplo AForge.Nethttp://www.aforgenet.com/framework/downloads.htmlSi quieres desarrollar tu propio algoritmo de forma tradicional no te lo recomiendo, por el simple hecho de que jamás podrás optimizarlo hasta tal punto, pero de todas formas puedes ver un ejemplo escrito en VB.Net en la class PixelUtil que desarrollé: Librería de Snippets !! (Compartan aquí sus snippets)Este ejemplo utilizando Aforge, es una función de uso genérico que busca una imagen en otra imagen, y devuelve un objeto con las coordenadas y otra información relevante: VB.Net: ' Find Image ' ( By Elektro ) ' ' Usage Examples: ' 'Private Sub Test() Handles MyBase.Shown ' ' ' A Desktop Screenshot, in 1920x1080 px. resolution. ' Dim desktopScreenshoot As New Bitmap("C:\Desktop.png") ' ' ' A cutted piece of the screenshot, in 50x50 px. resolution. ' Dim partOfDesktopToFind As New Bitmap("C:\PartOfDesktop.png") ' ' ' Find the part of the image in the desktop, with the specified similarity. ' For Each matching As AForge.Imaging.TemplateMatch In ' ' FindImage(baseImage:=desktopScreenshoot, imageToFind:=partOfDesktopToFind, similarity:=80.5R) ' 80,5% similarity. ' ' Dim sb As New System.Text.StringBuilder ' ' sb.AppendFormat("Top-Left Corner Coordinates: {0}", matching.Rectangle.Location.ToString()) ' sb.AppendLine() ' sb.AppendFormat("similarity Image Percentage: {0}%", (matching.similarity * 100.0F).ToString("00.00")) ' ' MessageBox.Show(sb.ToString) ' ' Next matching ' 'End Sub ' ''' <summary> ''' Finds a part of an image inside other image and returns the top-left corner coordinates and it's similarity percent. ''' </summary> ''' <param name="baseImage"> ''' Indicates the base image. ''' </param> ''' <param name="imageToFind"> ''' Indicates the image to find in the base image. ''' </param> ''' <param name="similarity"> ''' Indicates the similarity percentage to compare the images. ''' A value of '100' means identical image. ''' Note: High percentage values with big images could take several minutes to finish. ''' </param> ''' <returns>AForge.Imaging.TemplateMatch().</returns> Private Function FindImage(ByVal baseImage As Bitmap, ByVal imageToFind As Bitmap, ByVal similarity As Double) As AForge.Imaging.TemplateMatch() Dim currentSimilarity As Single ' Translate the readable similarity percent value to Single value. Select Case similarity Case Is < 0.1R, Is > 100.0R ' Value is out of range. Throw New Exception(String.Format("similarity value of '{0}' is out of range, range is from '0.1' to '100.0'", CStr(similarity))) Case Is = 100.0R ' Identical image comparission. currentSimilarity = 1.0F Case Else ' Image comparission with specific similarity. currentSimilarity = Convert.ToSingle(similarity) / 100.0F End Select ' Set the similarity threshold to find all matching images with specified similarity. Dim tm As New AForge.Imaging.ExhaustiveTemplateMatching(currentSimilarity) ' Return all the found matching images, ' it contains the top-left corner coordinates of each one ' and matchings are sortered by it's similarity percent. Return tm.ProcessImage(baseImage, imageToFind) End Function
C#:EDITO: El Snippet está traducido incorrectamente. // Find Image // ( By Elektro ) /// <summary> /// Finds a part of an image inside other image and returns the top-left corner coordinates and it's similarity percent. /// </summary> /// <param name="baseImage"> /// Indicates the base image. /// </param> /// <param name="imageToFind"> /// Indicates the image to find in the base image. /// </param> /// <param name="similarity"> /// Indicates the similarity percentage to compare the images. /// A value of '100' means identical image. /// Note: High percentage values with big images could take several minutes to finish. /// </param> /// <returns>AForge.Imaging.TemplateMatch().</returns> private AForge.Imaging.TemplateMatch[] FindImage(Bitmap baseImage, Bitmap imageToFind, double similarity) { float currentSimilarity = 0; // Translate the readable similarity percent value to Single value. switch (similarity) { case 100.0: // Identical image comparission. currentSimilarity = 1f; break; default: // Image comparission with specific similarity. currentSimilarity = Convert.ToSingle(similarity) / 100f; break; } // Set the similarity threshold to find all matching images with specified similarity. AForge .Imaging.ExhaustiveTemplateMatching tm = new AForge .Imaging.ExhaustiveTemplateMatching(currentSimilarity ); // Return all the found matching images, // it contains the top-left corner coordinates of each one // and matchings are sortered by it's similarity percent. return tm.ProcessImage(baseImage, imageToFind); } //======================================================= //Service provided by Telerik (www.telerik.com) //=======================================================
Saludos. La prueba: public static void Start() { while (true) { for (int i = 0; i < totalCoords; i++) { a.MouseClick("Left", X[i], Y[i], 1, 1); Thread.Sleep(seconds * 1000); a.MouseClick("Left", CloseX, CloseY, 1, 1); Thread.Sleep(1900); if (i == totalCoords - 1) i = 0; } } } private void Form1_Load(object sender, EventArgs e) { this.KeyPreview = true; } private void button2_Click(object sender, EventArgs e) { this.KeyDown += new KeyEventHandler (Form1_KeyDown ); textBox4.Text = ""; } void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode.ToString() == "F3") { textBox4.Text = textBox4.Text + Cursor.Position.X.ToString()+"@"+Cursor.Position.Y + "\r\n"; } } void cerrar(object sender, KeyEventArgs e) { if (e.KeyCode.ToString() == "F1") { textBox1.Text = Cursor.Position.X.ToString(); textBox2.Text = Cursor.Position.Y.ToString(); } } private void button3_Click(object sender, EventArgs e) { this.KeyDown += new KeyEventHandler (cerrar ); } } }
Ya sé que no es limpio es mi primera aplicación en autoit,pero la idea que me has dado serviría para buscarlo por toda la pantalla?
|
|
|
|
|
|
|