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

 

 


Tema destacado: Rompecabezas de Bitcoin, Medio millón USD en premios


  Mostrar Mensajes
Páginas: 1 ... 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 [37] 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 ... 72
361  Programación / Desarrollo Web / [SOURCE-CODE] Proyecto - Educación Ambiental en: 18 Noviembre 2018, 15:03 pm
Hola. bueno un amigo y yo de la uní hemos hecho una pagina, como proyecto Final de una materia que se llama "EDUCACIÓN AMBIENTAL" y publico el código aquí para que lo reutilice el que quiera.





Source Code



Preview




El código puede estar desordenado y muchas otras cosas, pero mi conocimiento de html es medio y las funciones CSS las hizo mi compañero.

362  Programación / .NET (C#, VB.NET, ASP) / Re: [SOURCE-CODE] Color.NET - Color Picker en: 16 Noviembre 2018, 03:59 am
Bastante útil, gracias!
Se agradece que sea software libre, creo que deberías colocarla bajo la GNU GPL o la MIT...
Desafortundamente en mi PC (con windows 10) no se ejecuta el exe, osea no funciona.
Saludos.

Hola , bueno esta app es muy sencilla, la librería Cyotek esta haciendo todo el trabajo, por eso no creo necesario colocarlo bajo ninguna licencia, ademas hay muchos Color picker, la mayoría como por ejemplo esta : Color.NET o esta Color.Net v2.2 . pero no esta gratis ni el código fuente , así que me puse manos a la obra :V y bueno lo compartí.  




Todos Los Errores solucionados, Prueba ahora!


363  Programación / .NET (C#, VB.NET, ASP) / [SOURCE-CODE] Color.NET - Color Picker en: 16 Noviembre 2018, 03:05 am

Bueno el compañero @Elektro ya había hecho uno , pero ya no compartió mas el código fuente así que me vi en la tarea de buscar por mi cuenta y hacerme yo mismo el mio, he usado una Liberia que me facilito todo XD
.




Source Code + Executable


Pueden comentar conño , no dejarme ignorado!!
364  Programación / Scripting / Re: Eliminar lineas archivo txt en: 15 Noviembre 2018, 12:04 pm
Hablemos esto por mensajes Privados , no quiero llenar este post con mensajes. me puedes pasar tu código completo por privado y te echo una mano.
365  Programación / Scripting / Re: Eliminar lineas archivo txt en: 15 Noviembre 2018, 00:02 am
Hubieras Simplemente dicho esto sin rodeos desde un principio, toma :

Código
  1. @echo off
  2. :inicio
  3. cls
  4. color a
  5. dir /b prestamos\*.txt | findstr /n ".txt$"                                
  6. (for %%x in (prestamos\*.txt) do set /a a+=1)
  7. echo/
  8. echo      Libros Actuales:  %a%
  9. echo/
  10. echo Que libro desea devolver?
  11. echo/
  12. set /p libro=  
  13. if not defined libro (goto:inicio) >NUL
  14. if not exist prestamos\%libro%.txt (goto:inicio) >NUL
  15. move .\prestamos\%libro%.txt .\libros\%libro%.txt
  16.  
  17. :log
  18. if exist prestamos.txt del prestamos.txt
  19. for %%i in ("prestamos\*.txt") do (
  20.        echo %%~nxi
  21.        type %%i
  22.        echo/
  23.        echo/
  24.    )>> prestamos.txt
  25. goto :Eof

Esto si te lo deja asi :

Código:
libro8.txt 
Zakaria 2
13/11/2018 | 14:03:08,39

Nota: Si queréis eliminarle el .txt hazlo tu ya te he hecho bastante.


366  Programación / Scripting / Re: Eliminar lineas archivo txt en: 14 Noviembre 2018, 20:21 pm
Lo que entendí es que tienes un archivo "Prestamo.txt" en la cual están registrados los libros tales como :

Código:
libro6 
Zakaria
13/11/2018 | 14:02:36,75

libro7
Zakaria
13/11/2018 | 14:03:08,39

Lo que quieres con el Bat es que cuando Muevas el Libro6.txt también se borre del "Prestamo.txt" . Bueno hay varias maneras (Complicadas) de hacer esto.

1) La Primera es Buscar en "Prestamo.txt" la Palabra "Libro6" y eliminar esa linea con las dos de abajo que le siguen. así quedaría solo el LIBRO7.

2) La Segunda es Modificar el Log que te hice en el código anterior, una manera simple y sencilla


Bueno hare la segunda manera , me es mas facil.




Toma:

Código
  1. @echo off
  2. :inicio
  3. cls
  4. color a
  5. dir /b prestamos\*.txt | findstr /n ".txt$"                                
  6. (for %%x in (prestamos\*.txt) do set /a a+=1)
  7. echo/
  8. echo      Libros Actuales:  %a%
  9. echo/
  10. echo Que libro desea devolver?
  11. echo/
  12. set /p libro=  
  13. if not defined libro (goto:inicio) >NUL
  14. if not exist prestamos\%libro%.txt (goto:inicio) >NUL
  15. move .\prestamos\%libro%.txt .\libros\%libro%.txt
  16.  
  17. :log
  18. if exist prestamos.txt del prestamos.txt
  19. For %%i in (prestamos\*.txt) do (echo %%i & type %%i & echo/ & echo/ ) >> prestamos.txt
  20. goto :Eof

367  Programación / Scripting / Re: Eliminar lineas archivo txt en: 14 Noviembre 2018, 01:57 am
Ese Echo no te borra nada , mas bien lanza error en la sintaxis. de hecho no hace nada mas que mostrar error. y el libro si se mueve. de la carpeta prestamos a la carpeta libros. Plantea mejor tu duda. y con gusto te ayudo.



No entendí tu duda pero supongo que lo que querías era hacer un log de los archivos que quedan en la carpeta prestamos , y ademas te faltan agregar algunos condicionales ; por ejemplo en la parte que te pregunta Que libro desea Devolver?

1) si no pones nada y sigues te dará error.
2) Si el archivo no existe, también te dará error.


Bueno de todos modos aquí esta :

Código
  1. @echo off
  2. :inicio
  3. cls
  4. color a
  5. dir /b prestamos\*.txt | findstr /n ".txt$"                                
  6. (for %%x in (prestamos\*.txt) do set /a a+=1)
  7. echo/
  8. echo      Libros Actuales:  %a%
  9. echo/
  10. echo Que libro desea devolver?
  11. echo/
  12. set /p libro=  
  13. if not defined libro (goto:inicio) >NUL
  14. if not exist prestamos\%libro%.txt (goto:inicio) >NUL
  15. move .\prestamos\%libro%.txt .\libros\%libro%.txt
  16. if exist prestamos.txt del prestamos.txt
  17. For %%i in (prestamos\*.txt) do echo %%i >> prestamos.txt
  18. pause

Salida :



368  Seguridad Informática / Análisis y Diseño de Malware / Re: [BATCH] [APORTE] Virus . (Te hace pensar que agarraste ramsomware) en: 31 Octubre 2018, 23:59 pm
Realmente te vas a cagar de la risa como Windows en otra versión no tenga los nombres
de tipo de archivo que has puesto en la solución.  :¬¬

sheett, no se lo digas a nadie , eso fue un extra :V asdasdasd. En Win 10 . cuando ejecuto la solución no restaura la clase .exe por que los nombres de la clase no son iguales a WIN7, por lo tanto windows no los reconocerá y se abrirán así : (por ejemplo) :
369  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-API

Documentación



Bueno y como siempre, yo no planteo nada sin algo de codigo :

Wrapper :

DX9Overlay.vb --- Clase


Código
  1. Imports System
  2. Imports System.Runtime.InteropServices
  3.  
  4. Namespace DX9OverlayAPI
  5.    Class DX9Overlay
  6.        Public Const PATH As String = "dx9_overlay.dll"
  7.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  8.        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
  9.        End Function
  10.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Unicode)>
  11.        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
  12.        End Function
  13.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  14.        Public Shared Function TextDestroy(ByVal id As Integer) As Integer
  15.        End Function
  16.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  17.        Public Shared Function TextSetShadow(ByVal id As Integer, ByVal b As Boolean) As Integer
  18.        End Function
  19.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  20.        Public Shared Function TextSetShown(ByVal id As Integer, ByVal b As Boolean) As Integer
  21.        End Function
  22.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  23.        Public Shared Function TextSetColor(ByVal id As Integer, ByVal color As UInteger) As Integer
  24.        End Function
  25.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  26.        Public Shared Function TextSetPos(ByVal id As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
  27.        End Function
  28.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  29.        Public Shared Function TextSetString(ByVal id As Integer, ByVal str As String) As Integer
  30.        End Function
  31.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Unicode)>
  32.        Public Shared Function TextSetStringUnicode(ByVal id As Integer, ByVal str As String) As Integer
  33.        End Function
  34.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  35.        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
  36.        End Function
  37.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Unicode)>
  38.        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
  39.        End Function
  40.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  41.        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
  42.        End Function
  43.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  44.        Public Shared Function BoxDestroy(ByVal id As Integer) As Integer
  45.        End Function
  46.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  47.        Public Shared Function BoxSetShown(ByVal id As Integer, ByVal bShown As Boolean) As Integer
  48.        End Function
  49.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  50.        Public Shared Function BoxSetBorder(ByVal id As Integer, ByVal height As Integer, ByVal bShown As Boolean) As Integer
  51.        End Function
  52.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  53.        Public Shared Function BoxSetBorderColor(ByVal id As Integer, ByVal dwColor As UInteger) As Integer
  54.        End Function
  55.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  56.        Public Shared Function BoxSetColor(ByVal id As Integer, ByVal dwColor As UInteger) As Integer
  57.        End Function
  58.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  59.        Public Shared Function BoxSetHeight(ByVal id As Integer, ByVal height As Integer) As Integer
  60.        End Function
  61.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  62.        Public Shared Function BoxSetPos(ByVal id As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
  63.        End Function
  64.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  65.        Public Shared Function BoxSetWidth(ByVal id As Integer, ByVal width As Integer) As Integer
  66.        End Function
  67.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  68.        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
  69.        End Function
  70.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  71.        Public Shared Function LineDestroy(ByVal id As Integer) As Integer
  72.        End Function
  73.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  74.        Public Shared Function LineSetShown(ByVal id As Integer, ByVal bShown As Boolean) As Integer
  75.        End Function
  76.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  77.        Public Shared Function LineSetColor(ByVal id As Integer, ByVal color As UInteger) As Integer
  78.        End Function
  79.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  80.        Public Shared Function LineSetWidth(ByVal id As Integer, ByVal width As Integer) As Integer
  81.        End Function
  82.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  83.        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
  84.        End Function
  85.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  86.        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
  87.        End Function
  88.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  89.        Public Shared Function ImageDestroy(ByVal id As Integer) As Integer
  90.        End Function
  91.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  92.        Public Shared Function ImageSetShown(ByVal id As Integer, ByVal bShown As Boolean) As Integer
  93.        End Function
  94.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  95.        Public Shared Function ImageSetAlign(ByVal id As Integer, ByVal align As Integer) As Integer
  96.        End Function
  97.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  98.        Public Shared Function ImageSetPos(ByVal id As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
  99.        End Function
  100.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  101.        Public Shared Function ImageSetRotation(ByVal id As Integer, ByVal rotation As Integer) As Integer
  102.        End Function
  103.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  104.        Public Shared Function DestroyAllVisual() As Integer
  105.        End Function
  106.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  107.        Public Shared Function ShowAllVisual() As Integer
  108.        End Function
  109.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  110.        Public Shared Function HideAllVisual() As Integer
  111.        End Function
  112.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  113.        Public Shared Function GetFrameRate() As Integer
  114.        End Function
  115.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  116.        Public Shared Function GetScreenSpecs(<Out> ByRef width As Integer, <Out> ByRef height As Integer) As Integer
  117.        End Function
  118.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  119.        Public Shared Function SetCalculationRatio(ByVal width As Integer, ByVal height As Integer) As Integer
  120.        End Function
  121.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  122.        Public Shared Function SetOverlayPriority(ByVal id As Integer, ByVal priority As Integer) As Integer
  123.        End Function
  124.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  125.        Public Shared Function Init() As Integer
  126.        End Function
  127.        <DllImport(PATH, CallingConvention:=CallingConvention.Cdecl)>
  128.        Public Shared Sub SetParam(ByVal _szParamName As String, ByVal _szParamValue As String)
  129.        End Sub
  130.    End Class
  131. End Namespace
  132.  

En el Form1, Un ejemplo de como Dibujar texto, Cuadro o linea :

Código
  1. Imports System
  2. Imports DX9OverlayAPI
  3.  
  4. Public Class Form1
  5.  
  6.    Shared overlayText As Integer = -1
  7.    Shared overlayBox As Integer = -1
  8.    Shared overlayLine As Integer = -1
  9.  
  10.    Private Sub texto()
  11.        DX9Overlay.SetParam("process", "hl2.exe")
  12.        DX9Overlay.DestroyAllVisual()
  13.        overlayText = DX9Overlay.TextCreateUnicode("Arial", 12, False, False, 200, 200, 4278255615, "Hello world!", True, True)
  14.    End Sub
  15.  
  16.    Private Sub linea()
  17.        DX9Overlay.SetParam("process", "hl2.exe")
  18.        DX9Overlay.DestroyAllVisual()
  19.        overlayLine = DX9Overlay.LineCreate(0, 0, 300, 300, 5, 4294967295, True)
  20.    End Sub
  21.  
  22.    Private Sub caja()
  23.        DX9Overlay.SetParam("process", "hl2.exe")
  24.        DX9Overlay.DestroyAllVisual()
  25.        overlayBox = DX9Overlay.BoxCreate(200, 200, 100, 100, 1358889215, True)
  26.    End Sub
  27.  
  28.    Private Sub eliminarTodo()
  29.        DX9Overlay.TextDestroy(overlayText)
  30.        DX9Overlay.BoxDestroy(overlayBox)
  31.        DX9Overlay.LineDestroy(overlayLine)
  32.    End Sub
  33.  
  34. 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\  DLL

Gracias 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.

370  Programación / Scripting / Re: ¿Es posible el que se ejecute un archivo BAT con derechos de Administrador? en: 20 Octubre 2018, 18:16 pm
El problema era q no mataba el proceso, Bueno aqui esta
(Funcionando correctamente en Win7 32bits y 64 bits) ,  Me avisas si te sirvió.

Código
  1. @echo off
  2.  
  3. REM .bat con permisos de administrador
  4. :-------------------------------------
  5. REM  --> Analizando los permisos
  6.    IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
  7. >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
  8. ) ELSE (
  9. >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  10. )
  11.  
  12. REM --> Si hay error es que no hay permisos de administrador.
  13. if '%errorlevel%' NEQ '0' (
  14.    echo Solicitando permisos de administrador... Requesting administrative privileges... Anfordern Administratorrechte ...
  15.    goto UACPrompt
  16. ) else ( goto gotAdmin )
  17.  
  18. :UACPrompt
  19.    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  20.    set params = %*:"=""
  21.    echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
  22.  
  23.    "%temp%\getadmin.vbs"
  24.    del "%temp%\getadmin.vbs"
  25.    exit /B
  26.  
  27. :gotAdmin
  28.    pushd "%CD%"
  29.    CD /D "%~dp0"
  30. :--------------------------------------  
  31.  
  32. REM  
  33. ECHO.
  34. if %PROCESSOR_ARCHITECTURE%==x86 (goto Uni32bit) else if %PROCESSOR_ARCHITECTURE%==AMD64 (goto Uni64bit)
  35.  
  36. :Uni32bit
  37. goto Condicional
  38.  
  39. :Uni64bit
  40. net user administrador /active:yes
  41. goto Condicional
  42.  
  43.  
  44. :Condicional
  45. tasklist | find /i "JAHER.exe" && (
  46. TASKKILL /IM "JAHER.exe" /F
  47. echo Proceso Encontrado y Terminado, Procedemos a eliminar la carpeta . . .
  48. goto delete
  49. ) || (
  50. echo Proceso no Abierto Procedemos a eliminar la carpeta . . .
  51. )
  52. goto delete
  53.  
  54. :delete
  55. cls
  56. color a
  57. cd "%PROGRAMFILES%"
  58. set Folder=JAHER
  59.  
  60. if exist %folder% (
  61. RD /S /Q %Folder%
  62. echo La Carpeta %folder% Fue Eliminada.
  63. pause
  64. DEL /F /Q %0
  65. ) else (
  66. echo La Carpeta no existe.
  67. pause
  68. DEL /F /Q %0
  69. )
  70.  
  71. exit
Páginas: 1 ... 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 [37] 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 ... 72
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines