|
81
|
Programación / .NET (C#, VB.NET, ASP) / VB.NET Overlay in Games Full Screen
|
en: 22 Octubre 2018, 16:27 pm
|
Hola, Bueno mi duda es como haría yo para Sobreponer Un formulario encima de un juego Direcx En pantalla Completa, El compañero @Elektro lo logro con la api de SharpDX, Bueno yo he logrado casi lo mismo pero Con una api Direxc , he logrado hasta ahora sobreponer texto y dibujar en juegos en pantalla completa que usan direcx 9 , Ya puedo Simplemente dibujar un menu d3d y listo creo las funciones y hago un hack, pero no logro ni tengo idea de como sobreponer el Formulario. Necesito ayuda en eso.La api que estoy usando : DX9-Overlay-APIDocumentación Bueno y como siempre, yo no planteo nada sin algo de codigo : Wrapper : DX9Overlay.vb --- ClaseImports System Imports System.Runtime.InteropServices Namespace DX9OverlayAPI Class DX9Overlay Public Const PATH As String = "dx9_overlay.dll" <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function TextCreate(ByVal font As String, ByVal fontSize As Integer, ByVal bBold As Boolean, ByVal bItalic As Boolean, ByVal x As Integer, ByVal y As Integer, ByVal color As UInteger, ByVal text As String, ByVal bShadow As Boolean, ByVal bShow As Boolean) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Unicode)> Public Shared Function TextCreateUnicode(ByVal font As String, ByVal fontSize As Integer, ByVal bBold As Boolean, ByVal bItalic As Boolean, ByVal x As Integer, ByVal y As Integer, ByVal color As UInteger, ByVal text As String, ByVal bShadow As Boolean, ByVal bShow As Boolean) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function TextDestroy(ByVal id As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function TextSetShadow(ByVal id As Integer, ByVal b As Boolean) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function TextSetShown(ByVal id As Integer, ByVal b As Boolean) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function TextSetColor(ByVal id As Integer, ByVal color As UInteger) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function TextSetPos(ByVal id As Integer, ByVal x As Integer, ByVal y As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function TextSetString(ByVal id As Integer, ByVal str As String) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Unicode)> Public Shared Function TextSetStringUnicode(ByVal id As Integer, ByVal str As String) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function TextUpdate(ByVal id As Integer, ByVal font As String, ByVal fontSize As Integer, ByVal bBold As Boolean, ByVal bItalic As Boolean) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Unicode)> Public Shared Function TextUpdateUnicode(ByVal id As Integer, ByVal font As String, ByVal fontSize As Integer, ByVal bBold As Boolean, ByVal bItalic As Boolean) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function BoxCreate(ByVal x As Integer, ByVal y As Integer, ByVal w As Integer, ByVal h As Integer, ByVal dwColor As UInteger, ByVal bShow As Boolean) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function BoxDestroy(ByVal id As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function BoxSetShown(ByVal id As Integer, ByVal bShown As Boolean) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function BoxSetBorder(ByVal id As Integer, ByVal height As Integer, ByVal bShown As Boolean) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function BoxSetBorderColor(ByVal id As Integer, ByVal dwColor As UInteger) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function BoxSetColor(ByVal id As Integer, ByVal dwColor As UInteger) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function BoxSetHeight(ByVal id As Integer, ByVal height As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function BoxSetPos(ByVal id As Integer, ByVal x As Integer, ByVal y As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function BoxSetWidth(ByVal id As Integer, ByVal width As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function LineCreate(ByVal x1 As Integer, ByVal y1 As Integer, ByVal x2 As Integer, ByVal y2 As Integer, ByVal width As Integer, ByVal color As UInteger, ByVal bShow As Boolean) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function LineDestroy(ByVal id As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function LineSetShown(ByVal id As Integer, ByVal bShown As Boolean) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function LineSetColor(ByVal id As Integer, ByVal color As UInteger) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function LineSetWidth(ByVal id As Integer, ByVal width As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function LineSetPos(ByVal id As Integer, ByVal x1 As Integer, ByVal y1 As Integer, ByVal x2 As Integer, ByVal y2 As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function ImageCreate(ByVal path As String, ByVal x As Integer, ByVal y As Integer, ByVal rotation As Integer, ByVal align As Integer, ByVal bShow As Boolean) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function ImageDestroy(ByVal id As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function ImageSetShown(ByVal id As Integer, ByVal bShown As Boolean) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function ImageSetAlign(ByVal id As Integer, ByVal align As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function ImageSetPos(ByVal id As Integer, ByVal x As Integer, ByVal y As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function ImageSetRotation(ByVal id As Integer, ByVal rotation As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function DestroyAllVisual() As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function ShowAllVisual() As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function HideAllVisual() As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function GetFrameRate() As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function GetScreenSpecs(<Out> ByRef width As Integer, <Out> ByRef height As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function SetCalculationRatio(ByVal width As Integer, ByVal height As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function SetOverlayPriority(ByVal id As Integer, ByVal priority As Integer) As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Function Init() As Integer End Function <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)> Public Shared Sub SetParam(ByVal _szParamName As String, ByVal _szParamValue As String) End Sub End Class End Namespace
En el Form1, Un ejemplo de como Dibujar texto, Cuadro o linea : Imports System Imports DX9OverlayAPI Public Class Form1 Shared overlayText As Integer = -1 Shared overlayBox As Integer = -1 Shared overlayLine As Integer = -1 Private Sub texto() DX9Overlay.SetParam("process", "hl2.exe") DX9Overlay.DestroyAllVisual() overlayText = DX9Overlay.TextCreateUnicode("Arial", 12, False, False, 200, 200, 4278255615, "Hello world!", True, True) End Sub Private Sub linea() DX9Overlay.SetParam("process", "hl2.exe") DX9Overlay.DestroyAllVisual() overlayLine = DX9Overlay.LineCreate(0, 0, 300, 300, 5, 4294967295, True) End Sub Private Sub caja() DX9Overlay.SetParam("process", "hl2.exe") DX9Overlay.DestroyAllVisual() overlayBox = DX9Overlay.BoxCreate(200, 200, 100, 100, 1358889215, True) End Sub Private Sub eliminarTodo() DX9Overlay.TextDestroy(overlayText) DX9Overlay.BoxDestroy(overlayBox) DX9Overlay.LineDestroy(overlayLine) End Sub End Class
Y bueno la .DLL no la agregan a referencias, solo la colocan en donde esta su .exe . osea en la carpeta .\bin\Debug\ DLLGracias de antemano, solo quiero superponer el Formulario no dibujar y no se como hacer eso. PD : @Elektro Pasaste de Mod. Global a Colaborador? como @Shell Root? Colaborador no es un rango menor al q tenias? , que paso? tu eres el que mas ayuda al foro y te bajan de rango. están bien pendejos.
|
|
|
82
|
Programación / .NET (C#, VB.NET, ASP) / Convertir Cadena Hex a Bytes y compararlos Con Bytes de un archivo
|
en: 13 Octubre 2018, 19:57 pm
|
Bueno hola foro, Como dice el titulo, tengo un Escanear Hexadecimal para identificar archivos, Pero es lento y segun me he documentado se puede mejorar si : 1) Convierto la cadena Hex a Bytes.
2) Obtengo los Bytes del archivo .
4) Comparo la Cadena Hex convertida a Bytes con los Bytes del archivo.
Bueno ahora lo que tengo hecho hasta ahora : Cadena Hex Almacenada en una variable XML:Dim xml = <?xml version="1.0"?> <signatures> <signature> <name>Archivo1</name> <hex>58354f2150254041505b345c505a58353428505e2937434329377d2445494341522d5354414e4441</hex> </signature> <signature> <name>Archivo2</name> <hex>f649e7cc1e00d37e7f3bc85fff3486ac6de91433aa3a39ef1b114d37b534b8323f6ff67132638a3fe2f2afb4aaf9b7e3b4669bb3cab028298aab533c5d73546cdd396fd58c2c7734c50bca68eb709b889a086fb3db5f8ae533a4d5816e8c5f560983695efa14e291c204b1316e657773</hex> </signature> </signatures>
Aquí el código para leer el XML y Convertirlo a Bytes:Private Sub hexttoBytes() Dim Str As New StringBuilder For Each signature As XElement In xml.Root.Elements stringToByteArray(signature.<hex>.Value) Next End Sub Public Shared Function stringToByteArray(text As String) As Byte() Dim bytes As Byte() = New Byte(text.Length \ 2 - 1) {} For i As Integer = 0 To text.Length - 1 Step 2 bytes(i \ 2) = Byte.Parse(text(i).ToString() & text(i + 1).ToString(), System.Globalization.NumberStyles.HexNumber) Next Return bytes End Function
Aquí el código para Obtener los Bytes del archivo a comparar ' Opendia IS OPENFILEDIALOG Dim result As DialogResult = OpenDia.ShowDialog() If result = Windows.Forms.DialogResult.OK Then Dim path As String = OpenDia.FileName Try Dim bytesFile As Byte() = File. ReadAllBytes(path ) ' BytesFile es donde se almacenan Los Bytes del archivo a comparar ' Necesito saber Como los Comparo con los Otros Bytes que antes eran HEX Catch ex As Exception MsgBox(ex.Message) End Try End If
AHORA LAS DUDAS, SEGÚN LO QUE TENGO ECHO , No logro Como hacer Para Comparar los Bytes que antes eran HEX con los Bytes del archivo. Lo que quiero lograr seria algo como esto : 'Donde BytesFiles es el Archivo y BytesHex eran la Cadena Hex que ahora son Bytes ' En caso de que los Bytes sean Iguales. lanza el mensaje de que encontró el archivo o no. If bytesFile = BytesHex then Msgbox("Archivo Coincide") else Msgbox("Archivo No Coincide") end if
Gracias De Antemano
|
|
|
83
|
Programación / .NET (C#, VB.NET, ASP) / [Ayuda] Agrego el paquete NuGet "SharpDX" pero me da error.
|
en: 3 Octubre 2018, 17:18 pm
|
En internet encontré el sig código : Clase : "SharpDXRenderer"Imports System Imports System.Windows.Forms Imports SharpDX Imports SharpDX.DXGI Imports SharpDX.Direct3D Imports SharpDX.Direct3D11 Imports SharpDX.Direct2D1 Imports SharpDX.Windows Imports SharpDX.Mathematics Imports Device = SharpDX.Direct3D11.Device Imports FactoryD2D = SharpDX.Direct2D1.Factory Imports FactoryDXGI = SharpDX.DXGI.Factory1 Public Class SharpDXRenderer #Region "Properties" Private _showFPS As Boolean = False Public Property ShowFPS() As Boolean Get Return _showFPS End Get Set(ByVal value As Boolean) _showFPS = value End Set End Property Private _renderWindow As New RenderForm Public Property RenderWindow As RenderForm Get Return _renderWindow End Get Set(value As RenderForm) _renderWindow = value End Set End Property Private _renderWindowTitle As String = "" Public Property RenderWindowTitle As Integer Get Return Nothing End Get Set(value As Integer) End Set End Property Private _renderWindowWidth As Integer = 800 Public Property RenderWindowWidth() As String Get Return _renderWindowWidth End Get Set(ByVal value As String) _renderWindowWidth = value End Set End Property Private _renderWindowHeight As Integer = 600 Public Property RenderWindowHeight() As Integer Get Return _renderWindowHeight End Get Set(ByVal value As Integer) _renderWindowHeight = value End Set End Property Private _isWindowed As Boolean = True Public Property IsWindowed() As Boolean Get Return _isWindowed End Get Set(ByVal value As Boolean) _isWindowed = value End Set End Property Private _refreshRate As Integer = 60 Public Property RefreshRate() As Integer Get Return _refreshRate End Get Set(ByVal value As Integer) _refreshRate = value End Set End Property #End Region ' **** Operational class level vars Dim device As Device Dim swapChain As SwapChain Dim renderTarget As RenderTarget Public Sub New() 'nuttin atm End Sub Public Sub Initialize() ' Create render target window _renderWindow.Text = _renderWindowTitle ' Create swap chain description Dim swapChainDesc = New SwapChainDescription() With { .BufferCount = 2, .Usage = Usage.RenderTargetOutput, .OutputHandle = _renderWindow.Handle, .IsWindowed = _isWindowed, .ModeDescription = New ModeDescription(0, 0, New Rational(_refreshRate, 1), Format.R8G8B8A8_UNorm), .SampleDescription = New SampleDescription(1, 0), .Flags = SwapChainFlags.AllowModeSwitch, .SwapEffect = SwapEffect.Discard } ' Create swap chain And Direct3D device ' The BgraSupport flag Is needed for Direct2D compatibility otherwise RenderTarget.FromDXGI will fail! Device.CreateWithSwapChain(DriverType.Hardware, DeviceCreationFlags.BgraSupport, swapChainDesc, device, swapChain) ' Get back buffer in a Direct2D-compatible format (DXGI surface) Dim backBuffer As Surface = Surface.FromSwapChain(swapChain, 0) 'Create Direct2D factory Using factory = New FactoryD2D() 'Get desktop DPI Dim dpi = factory.DesktopDpi 'Create bitmap render target from DXGI surface renderTarget = New RenderTarget(factory, backBuffer, New RenderTargetProperties() With { .DpiX = dpi.Width, .DpiY = dpi.Height, .MinLevel = SharpDX.Direct2D1.FeatureLevel.Level_DEFAULT, .PixelFormat = New PixelFormat(Format.Unknown, Direct2D1.AlphaMode.Ignore), .Type = RenderTargetType.[Default], .Usage = RenderTargetUsage.None }) End Using 'Disable automatic ALT+Enter processing because it doesn't work properly with WinForms Using factory = swapChain.GetParent(Of FactoryDXGI)() factory.MakeWindowAssociation(_renderWindow.Handle, WindowAssociationFlags.IgnoreAltEnter) End Using ' Add event handler for ALT+Enter AddHandler _renderWindow.KeyDown, Sub(o, e) If e.Alt AndAlso e.KeyCode = Keys.Enter Then swapChain.IsFullScreen = Not swapChain.IsFullScreen End If End Sub ' Set window size _renderWindow.Size = New System.Drawing.Size(_renderWindowWidth, _renderWindowHeight) ' Prevent window from being re-sized _renderWindow.AutoSizeMode = AutoSizeMode.GrowAndShrink End Sub Public Sub RunRenderLoop() Dim clock = New System.Diagnostics.Stopwatch() Dim clockFrequency = CDbl(System.Diagnostics.Stopwatch.Frequency) clock.Start() Dim deltaTime = 0.0 Dim fpsTimer = New System.Diagnostics.Stopwatch() fpsTimer.Start() Dim fps = 0.0 Dim fpsFrames As Integer = 0 RenderLoop.Run(_renderWindow, Function() renderTarget.BeginDraw() renderTarget.Transform = Matrix3x2.Identity renderTarget.Clear(Color.DarkBlue) ' FPS display Dim totalSeconds = clock.ElapsedTicks / clockFrequency fpsFrames += 1 If fpsTimer.ElapsedMilliseconds > 1000 Then fps = 1000 * fpsFrames / fpsTimer.ElapsedMilliseconds If _showFPS Then ' Update window title with FPS once every second _renderWindow.Text = String.Format("D3DRendering D3D11.1 - FPS: {0:F2} ({1:F2}ms/frame)", fps, CSng(fpsTimer.ElapsedMilliseconds) / fpsFrames) End If ' Restart the FPS counter fpsTimer.Reset() fpsTimer.Start() fpsFrames = 0 End If 'Draw the frame DrawFrame(renderTarget) renderTarget.EndDraw() swapChain.Present(0, PresentFlags.None) ' Determine the time it took to render the frame deltaTime = (clock.ElapsedTicks / clockFrequency) - totalSeconds End Function) renderTarget.Dispose() swapChain.Dispose() device.Dispose() End Sub Private Function DrawFrame(renderTarget As RenderTarget) As RenderTarget renderTarget.DrawRectangle(New RectangleF(renderTarget.Size.Width / 2 - (Form1.WidthTB.Value / 2), renderTarget.Size.Height / 2 - (Form1.HeightTB.Value / 2), Form1.WidthTB.Value, Form1.HeightTB.Value), New SolidColorBrush(renderTarget, Color.CornflowerBlue)) Return renderTarget End Function End Class
Bueno entonces abro mi VS he instalo la referencia de SharpDX . pero como verán me sale esto: Entonces intento buscar por ejemplo la referencia que me sale que no tengo , por ejemplo : "SharpDX.Direct2D1" y me dice que ya tengo esa referencia en SharpDX que agregue, pero entonce por que me sale como si no la tuviera?Gracias de Antemano!
|
|
|
84
|
Seguridad Informática / Análisis y Diseño de Malware / [BATCH] [APORTE] Virus . (Te hace pensar que agarraste ramsomware)
|
en: 2 Octubre 2018, 19:13 pm
|
YO Hice un virus simple que confunde los formatos por medio del registro. la cual causaba q no pudieras correr ningún formato .msi .exe .mp4 . no corría nada ni siquiera el administrador de tareas , ni siquiera el antivirus.
Bueno me desvíe del tema al que me refería :V . Bueno el virus del que hablaba es este: Source code ( ATENCION : este virus puede llegar a ser peligroso , si le ponen una linea debilitando el registro y otra linea confundiendo los formatos .bat y otros formatos de ejecución puede a llegar a ser peligroso. (sin reparacion) ): --- cura removida
Bueno cuando abran el Parche les pedirá una contraseña que es : 2111995 , Como ven el Ofusque el codigo fuente del Parche con la herramienta BatchCrypt , Perdon por no proporcionar el codigo desofuscado pero lo perdi y me da flojera ponerme a desofuscarlo . :v
|
|
|
85
|
Programación / .NET (C#, VB.NET, ASP) / [SOURCE-CODE] RDYou - Radio, Youtube (Search) (Player)
|
en: 11 Septiembre 2018, 00:44 am
|
Hola foro , ando perdido es que andaba de vacaciones :v y ahorita es que Empieza la universidad . Bueno esto lo hice hace unos dias espero que les guste (Alfin aprendi a subir proyectos a Github wii ) : La aplicación te permite escuchar música de Emisoras en línea, también tiene un sistema que te permite escuchar y mirar videos YOUTUBE.caracteristicas:* Poco consumo de RAM
* No causa retraso mientras juegas o trabajas.
* GUI comprensible y moderna
*Totalmente libre
PD: A los amantes del Rock , Kpop, Pop y mas le gustara la radio! tiene exelente musica
PD: Porfa Comenten : "Duda", "Criticas Constructuvas" (Elektro) XD, lo que quieran!
|
|
|
87
|
Programación / .NET (C#, VB.NET, ASP) / Ayuda con Scaneer Hexadecimal
|
en: 3 Agosto 2018, 02:12 am
|
Bueno como dice el titulo. necesito ayuda con un escaner hex. Bueno pondré el code y de ultimo mis preguntas! Bueno tengo un Listbox con el sig directorio de archivos:C:\Users\S4LXenox\Desktop\Ransomware Wannacry - copia.exe C:\Users\S4LXenox\Desktop\eicartest.exe C:\Users\S4LXenox\Desktop\parite.exe y con un boton escaneo cada archivo del listbox :code del boton: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click listv.Items.Clear() For abc = 0 To ListBox1.Items.Count - 1 Scan(ListBox1.Items(a).ToString) Next abc End Sub
Y aquí la Función de scaneo hex: Dim xml = <?xml version="1.0"?> <signatures> <signature> <name>Eicar-Test-Signature</name> <hex>58354f2150254041505b345c505a58353428505e2937434329377d2445494341522d5354414e4441</hex> </signature> <signature> <name>Hybris.Gen</name> <hex>f649e7cc1e00d37e7f3bc85fff3486ac6de91433aa3a39ef1b114d37b534b8323f6ff67132638a3fe2f2afb4aaf9b7e3b4669bb3cab028298aab533c5d73546cdd396fd58c2c7734c50bca68eb709b889a086fb3db5f8ae533a4d5816e8c5f560983695efa14e291c204b1316e657773</hex> </signature> </signatures> Private Sub Scan(ByVal dir As String) Dim myStreamReader As StreamReader = Nothing myStreamReader = File. OpenText(dir) InputString = myStreamReader.ReadToEnd() ArrayHold = Encoding.Default.GetBytes(InputString) Do IndexEnd = Index + 9 For x As Integer = Index To IndexEnd If x > UBound(ArrayHold) Then tempStr = tempStr Else tStr = UCase(Convert.ToString(ArrayHold(x), 16)) If tStr.Length < 2 Then tStr = "0" & tStr Str.Append(tStr) tempStr = tempStr & Chr(ArrayHold(x)) End If Next Index = Index + 10 Loop While IndexEnd < UBound(ArrayHold) For Each signature As XElement In xml.Root.Elements If InStr(1, Str.ToString, signature.<hex>.Value, vbTextCompare) Then listv.Items.Add(signature.<name>.Value) If listv.Items.Count > 0 Then Label1.Text = "Virus" Else Label1.Text = "No Virus" End If End If Next End Sub
Bueno ahora mis dudas:1) Cuando Utilizo el OPENFILEDIALOG En el botón y selecciono un virus el sacanner funciona y lo detecta! , Pero cuando coloco el directorio del virus en el listbox asi como puse arriba , el scanner no detecta nada! como corrigo eso?2) Cuando intento escanear un archivo de mas de 10 mb tarda muchísimo! aunque eso se puede arreglar con un BackgrounWorker y asi no se pegue la app, pero no hay manera de hacer el escaneo hex mas rapido?Bueno eso es todo, Gracias de antemano!
|
|
|
88
|
Programación / .NET (C#, VB.NET, ASP) / Buscar valores en el Registro de windows....
|
en: 21 Julio 2018, 03:11 am
|
Hola foro, Como dice el titulo quiero Buscar valores en el regedit, Ejemplo : Virus >> wscript.exe //B "C:\Users\S4LXenox\AppData\Local\Temp\VirusUSB.vbs" agrego un virus que se auto inicio. por medio una app quiero Que si en el valor: wscript.exe //B "C:\Users\S4LXenox\AppData\Local\Temp\VirusUSB.vbs"sea detectado por mi app y me pregunte si quiere que elimine esa entrada, para el vbs no se ejecute.
Bueno lo primero que imagino es listar en un listbox mis app que se auto inician, Bueno eso es facil ya que es casi lo mismo que la duda que tenia hace tiempo de como verificar los programas instalados ( link). 1) En-listo mis apps que se auto inician:Imports Microsoft.Win32 Public Class Form1 Private Sub ListarHKCU() Dim key As RegistryKey Dim valueNames As String() Dim currentUser As RegistryKey = Registry.CurrentUser Dim name As String = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" Dim str2 As String = "Software\Microsoft\Windows\CurrentVersion\Runonce" Try key = currentUser.OpenSubKey(name, True) valueNames = key.GetValueNames Dim str3 As String For Each str3 In valueNames Try ListBox1.Items.Add((str3 & " >> " & key.GetValue(str3).ToString)) Catch ex As Exception End Try Next Catch ex As Exception End Try Try key = currentUser.OpenSubKey(str2, True) valueNames = key.GetValueNames Dim str3 As String For Each str3 In valueNames Try ListBox1.Items.Add((str3 & " >> " & key.GetValue(str3).ToString)) Catch ex As Exception End Try Next Catch ex As Exception End Try End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ListBox1.Items.Clear() ListarHKCU() End Sub End Class
Lo segundo seria Buscar en ese listbox la cadena de texto "Wscript.exe"Bueno en esta parte ya he intentado con : FindMyString pero no logra reconocer ese string. Busque una solución algo floja, osea use un textbox en vez de el Listbox. y para detectar el virus use el siguiente codigo: Dim APP_string As String() = {"wscript", "Cmd"} For Each elemento As String In APP_string If TextBox1.Text.Contains(elemento) Then 'AQUI VA EL CODIGO DEL MENSAJE Y LA OPCION PARA BORRAR EL VIRUS DEL REGISTRO End If Next
Ahora Es la parte en la que necesito ayuda, es en la que borra el auto inicio del vbs, osea borra esa entrada del regedit. Bueno he puesto como lo he intentado haber si me pueden echar una mano.Basicamente lo que quiero es Buscar en donde inician las app por medio del regedit :SOFTWARE\Microsoft\Windows\CurrentVersion\Run y hay busca archivos script , Que por lo general usan en los valores : "CMD /C" o "wscript.exe //B" para ejecutarse y cuando encuentre ese string en el regedit elimine esa entrada.
Gracias de antemano. si logro hacerlo lo posteare. PD: Si se preguntan para que estoy haciendo esto , es por que llevo ya un tiempo desarrollando un motor de antiviurs . y apenas he logrado esto : https://ibb.co/geS69J Cuando lo termine , (si es q lo termino subire el codigo fuente aqui)
|
|
|
89
|
Programación / Scripting / [BATCH] [APORTE] Batch Auto Hide Start [BAHS]
|
en: 20 Julio 2018, 20:15 pm
|
Hola foro, Bueno les traigo un simple codigo que se me ocurrio al leer el siguiente post: Una pregunta sencilla de BATCHBueno este simple código les sirve para ejecutar su código batch Invisible. bueno aqui el batch :@echo off :Comandline IF ["%~1"]==["-e"] goto o :Crear vbs set Batch=%~dpnx0 ( echo set objshell ^= createobject^("wscript.shell"^) echo objshell^.run "%Batch% -e"^,vbhide ) > %temp%\bas.vbs start %temp%\bas.vbs exit :o :::::::::::::::::::::::::::::::: :: Tu código aquí... : ::::::::::::::::::::::::::::::::
Bueno a decir verdad se abre la consola cuando crea el vbs, pero el vbs se encargara de ejecutar tu codigo invisible.
Aunque la mejor opción para hacer un batch invisible es convertirlo a .EXE , Les recomiendo mi sencilla app: Posee: *Ofuscacion del Batch *Convertor bat to vbs y viceversa *Convertor a .exe y maslink: LinkBueno espero que les sirva de algo este sencillo aporte.
|
|
|
90
|
Programación / .NET (C#, VB.NET, ASP) / Como detectar USB , Memorias SD y mostrar un aviso?
|
en: 29 Junio 2018, 04:33 am
|
Buenas, Estoy intentando hacer una app que cuando alguien introduzca un Pendrive o Adaptador SD el programa lo detecte y te muestre un form 2 con un label que contenga la ruta del mismo. pero no logro hacerlo. Me inmagino que debería definir las letras desde la A hasta la Z en un string saltándome las letras del dico local C y la D. que nunca son de algún dispositivo extraible. en pocas palabras tengo 2 formularios, el primero detectara si algún dispositivo de almacenamiento extraible es conectado y cuando detecte alguno mostrara el formulario 2 que contendrá la ruta en un label. eso es lo que no logro hacer . si alguien tiene algún code que me facilite. Gracias de antemano.
|
|
|
|
|
|
|