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

 

 


Tema destacado: ¿Eres nuevo? ¿Tienes dudas acerca del funcionamiento de la comunidad? Lee las Reglas Generales


  Mostrar Mensajes
Páginas: 1 ... 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 [22] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 ... 50
211  Seguridad Informática / Análisis y Diseño de Malware / Re: Troyano indetectable en: 14 Junio 2013, 16:25 pm
Cifrando y Ejecutando en memoria.  ;D

busca en el foro RunPE/crypter
212  Programación / Programación C/C++ / Re: Validaciones 2 digitos en c++ en: 13 Junio 2013, 08:06 am
Creo que podrías hacer algo así


Código
  1. (!(num<0 || num>99))

así compruebas que este entre esos rangos

saludos
213  Programación / Scripting / [AutoIt] VirusTotal API 2.0 UDF en: 4 Junio 2013, 13:40 pm
Bueno aquí una una UDF que tenias hace unos días lita pero ayer me decidí a actualizarla.  ;D


Requiere  winhttp

http://www.autoitscript.com/forum/topic/84133-winhttp-functions/?hl=winhttp


Ejemplo:

Código
  1. #include <Crypt.au3>
  2. #include "VT.au3"
  3.  
  4. Example()
  5.  
  6. Func Example()
  7.  
  8.    _Crypt_Startup()
  9.    Local $sFilePath = @WindowsDir & "\Explorer.exe"
  10.  
  11.    Local $bHash = _Crypt_HashFile($sFilePath, $CALG_MD5)
  12.   _Crypt_Shutdown()
  13.    Local $hVirusTotal = VT_Open()
  14.    Local $APIkey='Your API key'
  15.    ConsoleWrite(VT($hVirusTotal, $fReport, '20c83c1c5d1289f177bc222d248dab261a62529b19352d7c0f965039168c0654',$APIkey) & @CRLF)
  16.    ConsoleWrite(VT($hVirusTotal, $fScan, $sFilePath,$APIkey) & @CRLF)
  17.    ConsoleWrite(VT($hVirusTotal, $fRescan, hex($bHash),$APIkey) & @CRLF)
  18.    ConsoleWrite(VT($hVirusTotal, $uReport, "http://www.virustotal.com",$APIkey) & @CRLF)
  19.    ConsoleWrite(VT($hVirusTotal, $uScan, "http://www.google.com",$APIkey) & @CRLF)
  20.    ConsoleWrite(VT($hVirusTotal, $Comment, hex($bHash) ,$APIkey,"Hello Word | Hola Mundo") & @CRLF)
  21.    VT_Close($hVirusTotal) ;
  22. EndFunc   ;==>Example
  23.  


VT.au3 UDF

Código
  1. #include-once
  2. #include "WinHttp.au3"
  3.  
  4. ; #INDEX# =================================================================================================
  5. ; Title .........: VT.au3
  6. ; AutoIt Version : 3.3.8.1
  7. ; Language ......: English
  8. ; Description ...: VirusTotal public API version 2.0 implementation in Autoit
  9. ;thanks to: trancexx|ProgAndy "WinHttp.au3"  ||| guinness "Suggestions+Snippets ||| www.virustotal.com
  10. ;Reference https://www.virustotal.com/es/documentation/public-api
  11. ;Written by Danyfirex
  12. ;Date 12/05/2013 | Update 03/06/2013
  13. ; #FUNCTION# =============================================================================================
  14.  
  15.  
  16.  
  17.  
  18. ;===================CONSTANTS/CONSTANTES=======================
  19. Global Const $__sVirusTotal_Page = 'www.virustotal.com'
  20. Global Enum $eAPI_HttpOpen, $eAPI_HttpConnect
  21. Global Enum $fReport,$fScan,$fRescan,$uReport,$uScan,$Comment
  22. Global Const $tURL[6]=['/vtapi/v2/file/report','/vtapi/v2/file/scan','/vtapi/v2/file/rescan', _
  23.                       '/vtapi/v2/url/report','/vtapi/v2/url/scan','/vtapi/v2/comments/put']
  24. ;==============================================================
  25.  
  26.  
  27. ; #FUNCTIONS/FUNCIONES# =======================================
  28. ;VT() ;Use respective flag($Type)
  29. ;VT(ByRef $aAPI, $Type, $sResource, $sAPIkey,$Comments="")
  30. ;flags($Type)
  31. ;$fReport = retrieve a scan report on a given file
  32. ;$fScan   = submit a file for Scanning
  33. ;$fRescan = Rescan files in VirusTotal's file store
  34. ;$uReport = retrieve a scan report on a given URL
  35. ;$uScan   = submit a URL for Scanning
  36. ;$Comment = Make a commnet on files and URLs
  37. ; ==============================================================
  38.  
  39.  
  40.  
  41. ; #FUNCTION# =============================================================================================
  42. ; Name...........: VT_Open
  43. ; Description ...: Initialize and get session handle & connection handle
  44. ; Syntax.........: VT_Open()
  45. ; guinness
  46. ; #FUNCTION# =============================================================================================
  47. Func VT_Open()
  48.    Local $aAPI[2] = [0, 0]
  49.    $aAPI[$eAPI_HttpOpen] = _WinHttpOpen()
  50.    If @error Then $aAPI[$eAPI_HttpOpen] = -1
  51.    $aAPI[$eAPI_HttpConnect] = _WinHttpConnect($aAPI[$eAPI_HttpOpen], $__sVirusTotal_Page)
  52.    If @error Then $aAPI[$eAPI_HttpConnect] = -1
  53.    Return $aAPI
  54. EndFunc   ;==>VT_Open
  55.  
  56.  
  57. ; #FUNCTION# =============================================================================================
  58. ; Name...........: VT_Close
  59. ; Description ...: Close handles
  60. ; Syntax.........: VT_Close($handle)
  61. ;guinness
  62. ; #FUNCTION# =============================================================================================
  63. Func VT_Close(ByRef Const $aAPI)
  64.    _WinHttpCloseHandle($aAPI[$eAPI_HttpOpen])
  65.    _WinHttpCloseHandle($aAPI[$eAPI_HttpConnect])
  66.    Return True
  67. EndFunc   ;==>VT_Close
  68.  
  69.  
  70.  
  71. ; #FUNCTION# =============================================================================================
  72. ; Name...........: VT
  73. ; Syntax.........: VT(ByRef $aAPI, $Type, $sResource, $sAPIkey,$Comments="")
  74. ;VT($hVirusTotal, $fReport, '20c83c1c5d1289f177bc222d248dab261a62529b19352d7c0f965039168c0654',$APIkey)
  75. ;VT($hVirusTotal, $fScan, "C:\file.exe",$APIkey)
  76. ;VT($hVirusTotal, $fRescan, hex($bHash),$APIkey)
  77. ;VT($hVirusTotal, $uReport, "http://www.virustotal.com",$APIkey)
  78. ;VT($hVirusTotal, $uScan, "http://www.google.com",$APIkey)
  79. ;VT($hVirusTotal, $Comment, hex($bHash) ,$APIkey,"Hello Word | Hola Mundo")
  80. ; Parameters....: $Resource - md5/sha1/sha256/scan_id | filename | Url | respectively for flag($Type)
  81. ;                 $APIkey -  your API key.
  82. ;                 $Comments - your Comments
  83. ;Return.........; response format is a JSON object
  84. ; #FUNCTION# =============================================================================================
  85. Func VT(ByRef $aAPI, $Type, $sResource, $sAPIkey,$Comments="")
  86.  
  87.    If $aAPI[$eAPI_HttpConnect] = -1 Then $aAPI = VT_Open()
  88.  
  89. Select ;$fReport,$fScan,$fRescan,$uReport,$uScan,$Comment
  90.    Case $Type = $fReport
  91.         Return _WinHttpSimpleRequest($aAPI[$eAPI_HttpConnect], 'POST', $tURL[$Type], Default, 'resource=' & $sResource & '&key=' & $sAPIkey)
  92.  
  93. Case $Type = $fScan
  94.  Local $sBoundary="--------Boundary"
  95.  Local $sHeaders = "Content-Type: multipart/form-data; boundary=" & $sBoundary & @CRLF
  96.  Local $sData = ''
  97.    $sData &= "--" & $sBoundary & @CRLF
  98. $sData &= 'Content-Disposition: form-data; name="apikey"' & @CRLF & @CRLF & $sAPIkey & @CRLF
  99. $sData &= "--" & $sBoundary & @CRLF
  100. $sData &= __WinHttpFileContent("", "file", $sResource,$sBoundary)
  101. $sData &= "--" & $sBoundary & "--" & @CRLF
  102. Return _WinHttpSimpleRequest($aAPI[$eAPI_HttpConnect], "POST", $tURL[$Type], Default, StringToBinary($sData,0), $sHeaders)
  103.  
  104. Case $Type = $fRescan
  105.         Return _WinHttpSimpleRequest($aAPI[$eAPI_HttpConnect], "POST", "/vtapi/v2/file/rescan", Default, "resource=" & $sResource &"&key=" & $sAPIkey)
  106.  
  107. Case $Type = $uReport
  108.         Return _WinHttpSimpleRequest($aAPI[$eAPI_HttpConnect], 'POST', $tURL[$Type], Default, 'resource=' & $sResource & '&key=' & $sAPIkey)
  109.  
  110. Case $Type = $uScan
  111.         Return _WinHttpSimpleRequest($aAPI[$eAPI_HttpConnect], 'POST', $tURL[$Type], Default, 'url=' & $sResource & '&key=' & $sAPIkey)
  112.  
  113. Case $Type = $Comment
  114.         return _WinHttpSimpleRequest($aAPI[$eAPI_HttpConnect], "POST", "/vtapi/v2/comments/put", Default, "resource=" & $sResource & _
  115. "&comment=" & $Comments & "&key=" & $sAPIkey)
  116.  
  117.    Case Else
  118.        SetError(3)
  119. EndSelect
  120.  
  121. EndFunc   ;==>VT
  122.  


Saludos
214  Programación / ASM / Re: Pregunta acerca de MessageBox en: 28 Mayo 2013, 23:52 pm
Bueno, me meto sin que me llamen:

Como dijo Eternal, normalmente las API A son wrappers de las W. Osea, terminan llamando a la versión W de dicha API.

Saludos!

Muchas gracias  MCKSys Argentina   ;-)
215  Programación / ASM / Re: Pregunta acerca de MessageBox en: 28 Mayo 2013, 21:26 pm
@Eternal Idol 7D me puedes explicar lo que pongo en negrita:


MessageBoxW (de Wide) es la otra version, por regla general casi todas la funciones A terminan llamando a las W.


saludos
216  Programación / Scripting / Re: [Perl] VirusTotal Scanner 0.1 en: 16 Mayo 2013, 21:49 pm
Gracias muy bueno el código.  ;-)


PD: no escanea un archivo. Retorna el reporte de un archivo ya escaneado.

saludos
217  Programación / Programación Visual Basic / Función Enviar Archivo VirusTotal (Escanea) en: 15 Mayo 2013, 00:47 am
Hola una función mas.  ;D
Envía muestra recuérdenlo!!!  >:D



Código
  1. ' =================================================================
  2. ' =================================================================
  3. ' => Autor: Pink
  4. ' => Upload file to VirusTotal.com For Scanning
  5. ' => Gracias VirusTotal.com
  6. ' => Fecha : 14|05|2013
  7. ' => Uso: VT_Scan("c:\hola.exe","your_APIKey")
  8. ' => Retorno:
  9. '{"response_code": 1,
  10. ' "verbose_msg": "Scan request successfully queued, come back later for the report",
  11. ' "resource": "999f7d93aa3d4a1a94cccfb4ea96bc2e28fd48020a481aa2dc7e215f3ce27bc0",
  12. ' "scan_id": "999f7d93aa3d4a1a94cccfb4ea96bc2e28fd48020a481aa2dc7e215f3ce27bc0-1324376258",
  13. ' "permalink": "https://www.virustotal.com/file/999f7d93aa3d4a1a94cccfb4ea96bc2e28fd48020a481aa2dc7e215f3ce27bc0/analysis/1324376258/",
  14. ' "sha256": "999f7d93aa3d4a1a94cccfb4ea96bc2e28fd48020a481aa2dc7e215f3ce27bc0",
  15. ' "sha1": "2cc875bca8030d745adfd14388b8c001471c2474",
  16. ' "md5": "4a00e1a3a14e4fec6f2b353b4f20bb73"}
  17. ' =================================================================
  18. ' =================================================================
  19. Option Explicit
  20.  
  21. Function VT_Scan(filepath As String, APIkey As String) As String
  22. Dim boundary As String
  23. Dim Post As String
  24. Dim bytesfinal()  As Byte
  25. Dim bytes() As Byte
  26. Dim Url As String
  27. Dim Http As Object
  28. Dim filedata As String
  29.  
  30. Url = "https://www.virustotal.com/vtapi/v2/file/scan"
  31. boundary = "--------Boundary"
  32.  
  33.  
  34. Open filepath For Binary As #1
  35. ReDim bytes(LOF(1) - 1)
  36. Get #1, , bytes()
  37. Close #1
  38.  
  39. filedata = StrConv(bytes(), vbUnicode)
  40.  
  41. Post = "--" & boundary & vbCrLf & _
  42. "Content-Disposition: form-data; name=" & Chr(34) & "apikey" & Chr(34) & vbCrLf & vbCrLf & _
  43. APIkey & vbCrLf & _
  44. "--" & boundary & vbCrLf & _
  45. "Content-Disposition: form-data; name=" & Chr(34) & "file" & Chr(34) & "; filename=" & Chr(34) & filename(filepath) & Chr(34) & vbCrLf & _
  46. "Content-Type: application/octet-stream" & vbCrLf & vbCrLf & _
  47. filedata & vbCrLf & _
  48. "--" & boundary & "--" & vbCrLf
  49.  
  50. bytesfinal() = StrConv(Post, vbFromUnicode)
  51.  
  52. Set Http = CreateObject("winhttp.winhttprequest.5.1")
  53. Http.Open "POST", Url, False
  54. Http.SetRequestHeader "Content-Type", "multipart/form-data; " & "boundary=" & boundary
  55. Http.Send (bytesfinal())
  56. VT_Scan = Http.Responsetext
  57. Set Http = Nothing
  58. End Function
  59.  
  60.  
  61. Function filename(cadena As String) As String
  62. Dim cadenas() As String
  63. cadenas() = Split(cadena, "\")
  64. filename = cadenas(UBound(cadenas))
  65. End Function
  66.  

Saludos
218  Programación / Programación Visual Basic / AnonFilesUpload Función en: 14 Mayo 2013, 20:22 pm
Una funcion para subir archivos a Anonfiles  :rolleyes:

Código
  1. ' =================================================================
  2. ' =================================================================
  3. ' => Autor: Danyfirex
  4. ' => Upload file to AnonFiles.com
  5. ' => Gracias AnonFiles.com
  6. ' => Fecha : 14|05|2013
  7. ' => Uso: AnonFilesUpload("c:\hola.rar")
  8. ' => Retorno: Texto de Respuesta (hotlink)
  9. ' =================================================================
  10. ' =================================================================
  11.  
  12.  
  13. Option Explicit
  14.  
  15. Function AnonFilesUpload(filepath As String) As String
  16. Dim boundary As String
  17. Dim Post As String
  18. Dim bytesfinal()  As Byte
  19. Dim bytes() As Byte
  20. Dim url As String
  21. Dim Http As Object
  22. Dim filedata As String
  23.  
  24. url = "https://anonfiles.com/api/hotlink"
  25. boundary = "--------Boundary"
  26.  
  27.  
  28. Open filepath For Binary As #1
  29. ReDim bytes(LOF(1) - 1)
  30. Get #1, , bytes()
  31. Close #1
  32. filedata = StrConv(bytes(), vbUnicode)
  33.  
  34. Post = "--" & boundary & vbCrLf & _
  35. "Content-Disposition: form-data; name=" & Chr(34) & "file" & Chr(34) & "; filename=" & Chr(34) & filename(filepath) & Chr(34) & vbCrLf & _
  36. "Content-Type: application/octet-stream" & vbCrLf & vbCrLf & _
  37. filedata & vbCrLf & _
  38. "--" & boundary & "--" & vbCrLf
  39.  
  40. bytesfinal() = StrConv(Post, vbFromUnicode)
  41.  
  42. Set Http = CreateObject("winhttp.winhttprequest.5.1")
  43. Http.Open "POST", url, False
  44. Http.SetRequestHeader "Content-Type", "multipart/form-data; " & "boundary=" & boundary
  45. Http.Send (bytesfinal())
  46. AnonFilesUpload = Http.ResponseText
  47. Set Http = Nothing
  48. End Function
  49.  
  50. Function filename(cadena As String) As String
  51. Dim cadenas() As String
  52. cadenas() = Split(cadena, "\")
  53. filename = cadenas(UBound(cadenas))
  54. End Function
219  Programación / ASM / Re: Mostrar menú al hacer clic en un listview en: 12 Mayo 2013, 23:40 pm
hola.
creo que este tema te ayudara.

http://foro.elhacker.net/asm/gui_y_eventos-t385648.0.html

saludos
220  Programación / .NET (C#, VB.NET, ASP) / Re: Ejecutar .vbs con Vb.net en: 11 Mayo 2013, 00:14 am
algo así debería funcionar.

Código
  1.  Process.Start("C:\WINDOWS\system32\cscript.exe", "C:\Testfiles\file.vbs")

saludos
Páginas: 1 ... 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 [22] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 ... 50
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines