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

 

 


Tema destacado: Estamos en la red social de Mastodon


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  Duda para crear un ''programa''
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Duda para crear un ''programa''  (Leído 2,951 veces)
Sr.papanoel

Desconectado Desconectado

Mensajes: 15


Ver Perfil
Duda para crear un ''programa''
« en: 8 Mayo 2011, 12:57 pm »

Hola, bueno como veis soy nuevo en este foro, y me gustaría hacer un ''programa'' pero no sé con que lenguaje ni con que programa lo podría hacer...
Por esto posteo, esto, para que me ayudéis...
El ''programa'' que quiero hacer consta, en que este programado de tal forma en que cuando lo ejecutes, una información de el pc se me envíe algún correo o alguna otra parte ...
(NO ESTÁ ECHO PARA HACER MALDADES)
Bueno, pues eso es todo...
Me gustaría que me ayudaseis os lo agradecería muchísimo.
Un saludo :D


En línea

WHK
Moderador Global
***
Desconectado Desconectado

Mensajes: 6.589


Sin conocimiento no hay espíritu


Ver Perfil WWW
Re: Duda para crear un ''programa''
« Respuesta #1 en: 8 Mayo 2011, 13:15 pm »

Hola, puedes hacerlo en c++, es lo más básico, también puedes usar otros lenguajes mas fáciles como visual pero tienes el inconveniente de las dependencias.

Te recomiendo c++, averigua sobre apis en windows para c++ y como usar winsock en dev cpp.

Toda la información que necesitas de una pc se encuentra en el registro del sistema.

Acá tengo el código fuente de un módulo clase para visual basic 6 en donde verás en que lugar se encuentran los datos en el registro del sistema y si te sirve el código pues mejor todavía:

Código
  1. 'Recopilación de múltiples ejemplos sobre el manejo de información.
  2. 'Recopilado y modificado por WHK.
  3.  
  4. Option Explicit
  5. Private m_os As OSVERSIONINFO
  6. Private m_NT As Boolean
  7. Private m_95 As Boolean
  8. Private m_98 As Boolean
  9.  
  10. Private Sub Class_Initialize()
  11. Dim nNull As Long
  12. m_os.dwOSVersionInfoSize = Len(m_os)
  13. Call GetVersionEx(m_os)
  14.  
  15. nNull = InStr(m_os.szCSDVersion, vbNullChar)
  16. If nNull > 1 Then
  17. m_os.szCSDVersion = Left(m_os.szCSDVersion, nNull - 1)
  18. ElseIf nNull = 1 Then
  19. m_os.szCSDVersion = ""
  20. End If
  21.  
  22. Select Case m_os.dwPlatformId
  23. Case VER_PLATFORM_WIN32_WINDOWS
  24. If m_os.dwMinorVersion >= 10 Then
  25.  m_95 = False
  26.  m_98 = True
  27. Else
  28.  m_95 = True
  29.  m_98 = False
  30. End If
  31. m_NT = False
  32. Case VER_PLATFORM_WIN32_NT
  33. m_95 = False
  34. m_98 = False
  35. m_NT = True
  36. End Select
  37. End Sub
  38.  
  39. Public Property Get PlatformID() As Long
  40. PlatformID = m_os.dwPlatformId
  41. End Property
  42.  
  43. Public Property Get Platform() As String
  44. If m_95 Then
  45. Platform = "Windows 95"
  46. ElseIf m_98 Then
  47. Platform = "Windows 98"
  48. ElseIf m_NT Then
  49. Platform = "Windows NT"
  50. Else
  51. Platform = "Desconocido"
  52. End If
  53. End Property
  54.  
  55. Public Property Get Version() As String
  56. Version = Platform & " v" & m_os.dwMajorVersion & "." & m_os.dwMinorVersion & ", Build " & WordLo(m_os.dwBuildNumber)
  57. End Property
  58.  
  59. Public Property Get CSDVersion() As String
  60. CSDVersion = Trim(m_os.szCSDVersion)
  61. End Property
  62.  
  63. Public Property Get ComputerName() As String
  64. Dim X As Integer
  65. Dim Y As String
  66.  
  67. Y = String(255, " ")
  68. X = GetComputerName(Y, 256)
  69. Y = Trim(Y)
  70. If Len(Y) > 0 Then
  71. ComputerName = Left(Y, Len(Y) - 1)
  72. End If
  73. If Trim(ComputerName) = "" Then
  74. ComputerName = "Desconocido"
  75. End If
  76. End Property
  77.  
  78. Public Property Get UserName() As String
  79. Dim X As Integer
  80. Dim Y As String
  81.  
  82. Y = String(255, " ")
  83. X = GetUserName(Y, 256)
  84. Y = Trim(Y)
  85. If Len(Y) > 0 Then
  86. UserName = Left(Y, Len(Y) - 1)
  87. End If
  88. If Trim(UserName) = "" Then
  89. UserName = "Desconocido"
  90. End If
  91. End Property
  92.  
  93.  
  94. Public Property Get RegCompany() As String
  95. RegCompany = GetStringKey(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion", "RegisteredOrganization")
  96. If Trim(RegCompany) = "" Then
  97. RegCompany = GetStringKey(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOrganization")
  98. End If
  99. If Trim(RegCompany) = "" Then
  100. RegCompany = "Desconocido"
  101. End If
  102. End Property
  103.  
  104.  
  105. Public Property Get Sistema_Operativo() As String
  106. Sistema_Operativo = GetStringKey(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion", "ProductName")
  107. If Trim(Sistema_Operativo) = "" Then
  108. Sistema_Operativo = GetStringKey(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductName")
  109. End If
  110. If Trim(Sistema_Operativo) = "" Then
  111. Sistema_Operativo = "Desconocido"
  112. End If
  113. End Function
  114.  
  115. Public Property Get ProgramsPath() As String
  116. ProgramsPath = GetStringKey(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir")
  117. If Trim(ProgramsPath) = "" Then
  118. ProgramsPath = "Desconocido"
  119. Exit Property
  120. End If
  121. If Right(ProgramsPath, 1) <> "\" Then
  122. ProgramsPath = ProgramsPath & "\"
  123. End If
  124. End Property
  125.  
  126. Public Property Get WinPath() As String
  127. Dim RTN
  128. Dim Buffer As String
  129. Buffer = Space(144)
  130. RTN = GetWindowsDirectory(Buffer, Len(Buffer))
  131. WinPath = Left(Buffer, RTN)
  132. If Trim(WinPath) = "" Then
  133. WinPath = "Desconocido"
  134. Exit Property
  135. End If
  136. If Right(WinPath, 1) <> "\" Then
  137. WinPath = WinPath & "\"
  138. End If
  139. End Property
  140.  
  141. Public Property Get TempPath() As String
  142. Dim RTN
  143. Dim Buffer As String
  144. Buffer = Space(255)
  145. RTN = GetTempPath(Len(Buffer), Buffer)
  146. TempPath = Left(Buffer, RTN)
  147. If Trim(TempPath) = "" Then
  148. TempPath = "Desconocido"
  149. Exit Property
  150. End If
  151. If Right(TempPath, 1) <> "\" Then
  152. TempPath = TempPath & "\"
  153. End If
  154. End Property
  155.  
  156. Public Property Get SysPath() As String
  157. Dim RTN
  158. Dim Buffer As String
  159. Buffer = Space(144)
  160. RTN = GetSystemDirectory(Buffer, Len(Buffer))
  161. SysPath = Left(Buffer, RTN)
  162. If Trim(SysPath) = "" Then
  163. SysPath = "Desconocido"
  164. Exit Property
  165. End If
  166. If Right(SysPath, 1) <> "\" Then
  167. SysPath = SysPath & "\"
  168. End If
  169. End Property
  170.  
  171. Public Property Get DirectXVer() As String
  172. DirectXVer = GetStringKey(HKEY_LOCAL_MACHINE, "Software\Microsoft\DirectX", "Version")
  173. DirectXVer = "DirectX " & Mid(DirectXVer, 4, 3) & " (" & DirectXVer & ")"
  174. If Trim(DirectXVer) = "" Then
  175.   DirectXVer = "Desconocido"
  176. End If
  177. End Property
  178.  
  179. Public Property Get ScrResolution() As String
  180. Dim iWidth As Integer
  181. Dim iHeight As Integer
  182. iWidth = Screen.Width / Screen.TwipsPerPixelX
  183. iHeight = Screen.Height / Screen.TwipsPerPixelY
  184. ScrResolution = iWidth & "x" & iHeight & "x" & ColorDepth
  185. End Property
  186.  
  187. Public Property Get ColorDepth() As String
  188. Dim lhDC As Long, lPlanes As Long, lBitsPerPixel As Integer
  189. lhDC = CreateIC("DISPLAY", 0&, 0&, 0&)
  190. If lhDC = 0 Then ColorDepth = "Desconocido": Exit Property
  191. lPlanes = GetDeviceCaps(lhDC, PLANES)
  192. lBitsPerPixel = GetDeviceCaps(lhDC, BITSPIXEL)
  193. lhDC = DeleteDC(lhDC)
  194. Select Case lPlanes
  195. Case 1
  196.  Select Case lBitsPerPixel
  197.   Case 4: ColorDepth = "4 Bit 16 Colors"
  198.   Case 8: ColorDepth = "8 Bit 256 Colors"
  199.   Case 16: ColorDepth = "16 Bit High Color"
  200.   Case 24: ColorDepth = "24 Bit True Color"
  201.   Case 32: ColorDepth = "32 Bit True Color"
  202.  End Select
  203. Case 4
  204.  ColorDepth = "16 Bit High Color"
  205. Case Else
  206.  ColorDepth = "Undetermined"
  207. End Select
  208. End Property
  209.  
  210.  
  211. Public Property Get CPU_Modelo() As String
  212. CPU_Modelo = GetStringKey(HKEY_LOCAL_MACHINE, "Hardware\Description\System\CentralProcessor\0", "Identifier")
  213. If Trim(CPU_Modelo) = "" Then
  214. CPU_Modelo = GetStringKey(HKEY_LOCAL_MACHINE, "Hardware\Description\System\CentralProcessor\0", "VendorIdentifier")
  215. End If
  216. If Trim(CPU_Modelo) = "" Then
  217. CPU_Modelo = "Desconocido"
  218. End If
  219. End Property
  220.  
  221.  
  222. Public Property Get CPU_Nombre() As String
  223. CPU_Nombre = GetStringKey(HKEY_LOCAL_MACHINE, "Hardware\Description\System\CentralProcessor\0", "ProcessorNameString")
  224. If Trim(CPU_Nombre) = "" Then
  225. CPU_Nombre = "Desconocido"
  226. End If
  227. End Property
  228.  
  229. Public Property Get CPU_Velocidad() As String
  230. CPU_Velocidad = GetDWORDKey(HKEY_LOCAL_MACHINE, "Hardware\Description\System\CentralProcessor\0", Chr(126) & "MHz")
  231. If Trim(CPU_Velocidad) = "" Then
  232. CPU_Velocidad = "Desconocido"
  233. End If
  234. End Function
  235.  
  236. Public Property Get Memoria_RAM_Total() As Double
  237. Dim InfoMemoria As MEMORYSTATUS
  238. Call GlobalMemoryStatus(InfoMemoria)
  239. Memoria_RAM_Total = Format(InfoMemoria.dwTotalPhys / 1024 / 1021.45, "###.##")
  240. End Property
  241.  
  242. Public Property Get Memoria_RAM_Libre() As Double
  243. Dim InfoMemoria As MEMORYSTATUS
  244. Call GlobalMemoryStatus(InfoMemoria)
  245. Memoria_RAM_Libre = Format(InfoMemoria.dwAvailPhys / 1024 / 1021.45, "###.##")
  246. End Property
  247.  
  248. Public Property Get Memoria_Virtual_Total() As Double
  249. Dim InfoMemoria As MEMORYSTATUS
  250. Call GlobalMemoryStatus(InfoMemoria)
  251. Memoria_Virtual_Total = Format(InfoMemoria.dwTotalVirtual / 1024 / 1021.45, "###.##")
  252. End Property
  253.  
  254. Public Property Get Memoria_Virtual_Libre() As Double
  255. Dim InfoMemoria As MEMORYSTATUS
  256. Call GlobalMemoryStatus(InfoMemoria)
  257. Memoria_Virtual_Libre = Format(InfoMemoria.dwAvailVirtual / 1024 / 1021.45, "###.##")
  258. End Property
  259.  
  260. Public Property Get Memoria_PaginacionArchivo_Total() As Double
  261. Dim InfoMemoria As MEMORYSTATUS
  262. Call GlobalMemoryStatus(InfoMemoria)
  263. Memoria_PaginacionArchivo_Total = Format(InfoMemoria.dwTotalPageFile / 1024 / 1021.45, "###.##")
  264. End Property
  265.  
  266. Public Property Get Memoria_PaginacionArchivo_Libre() As Double
  267. Dim InfoMemoria As MEMORYSTATUS
  268. Call GlobalMemoryStatus(InfoMemoria)
  269. Memoria_PaginacionArchivo_Libre = Format(InfoMemoria.dwAvailPageFile / 1024 / 1021.45, "###.##")
  270. End Property
  271.  
  272. Public Property Get Mouse_Coordenadas() As String
  273. Dim Coordenadas As POINTAPI
  274. Call GetCursorPos(Coordenadas)
  275. Mouse_Coordenadas = Coordenadas.X & ", " & Coordenadas.Y
  276. End Property
  277.  
  278. Public Property Get Tiempo_PC_Encendido()
  279. Dim MilloSec, Dias, Horas, Minutos, Segundos As Long
  280. MilloSec = GetTickCount()
  281. Segundos = MilloSec \ 1000
  282. Dias = Segundos \ (24& * 3600&)
  283. If Dias > 0 Then Segundos = Segundos - (24 * 3600 * Dias)
  284. Horas = Segundos \ 3600
  285. If Horas > 0 Then Segundos = Segundos - (3600 * Horas)
  286. Minutos = Segundos \ 60
  287. Segundos = Segundos Mod 60
  288. Tiempo_PC_Encendido = "Dias:" & Dias & " Hrs:" & Horas & " Min:" & Minutos & " Seg:" & Segundos
  289. End Property
  290.  
  291. Public Property Get HDDSpace() As String
  292. Dim HD, Cuenta, Status As Long
  293. Dim HDDLetter, GetHDD, HDS As String
  294. Dim TotalBytes, FreeBytes, BytesAvailableToCaller, FreeMB, TotalMB As Currency
  295.  
  296. For Cuenta = Asc("C") To Asc("Z")
  297. If GetDriveType(Chr(Cuenta) + ":\") = 3 Then
  298. GetHDD = GetHDD & Chr(Cuenta)
  299. End If
  300. Next Cuenta
  301.  
  302. HD = Len(GetHDD)
  303. For Cuenta = 1 To HD
  304. HDDLetter = Mid(GetHDD, Cuenta, 1)
  305. Status = GetDiskFreeSpaceEx(HDDLetter & ":", BytesAvailableToCaller, TotalBytes, FreeBytes)
  306. If Status <> 0 Then
  307.  TotalMB = Format((TotalBytes * 10000) / 1000000, "###")
  308.  FreeMB = Format((FreeBytes * 10000) / 1000000, "###")
  309.  HDS = HDS & "Drive " & HDDLetter & ": " & FreeMB & " MB of " & TotalMB & " MB "
  310. End If
  311. Next Cuenta
  312. HDDSpace = HDS
  313. End Property
  314.  
  315. Public Property Get Tiempo_Local() As String
  316. Tiempo_Local = Format(Time, "hh:mm:ss")
  317. End Property
  318. Private Function WordLo(LongIn As Long) As Integer
  319. If (LongIn And &HFFFF&) > &H7FFF Then
  320. WordLo = (LongIn And &HFFFF&) - &H10000
  321. Else
  322. WordLo = LongIn And &HFFFF&
  323. End If
  324. End Function
  325.  


En línea

LightHades

Desconectado Desconectado

Mensajes: 33


Ver Perfil
Re: Duda para crear un ''programa''
« Respuesta #2 en: 8 Mayo 2011, 14:35 pm »

Antes de nada yo de ti me aprendería algun lenguaje de programación tipo C++, java... ya que si te meten el codigo asi no aprenderás nada, a no ser que no quieras aprender ^^
En línea

Sr.papanoel

Desconectado Desconectado

Mensajes: 15


Ver Perfil
Re: Duda para crear un ''programa''
« Respuesta #3 en: 9 Mayo 2011, 09:20 am »

Gracias, pero me habían dicho de programarlo en ''batch'', que resulta mas sencillo...
Que crees?
Un saludo :D
En línea

skapunky
Electronik Engineer &
Colaborador
***
Desconectado Desconectado

Mensajes: 3.667


www.killtrojan.net


Ver Perfil WWW
Re: Duda para crear un ''programa''
« Respuesta #4 en: 9 Mayo 2011, 11:23 am »

batch es perder el tiempo, te recomiendo o "C" o "delphi", si en parte no te interesa demasiado la programación y quieres ir a lo rapido puedes probar con "visual basic" aunque uses el lenguaje que uses, deberás aprender las bases para programar y eso es tiempo. En dos meses según como te puedes quedar corto así que si empiezas de zero mentalizate porque va para largo.
En línea

Killtrojan Syslog v1.44: ENTRAR
Sr.papanoel

Desconectado Desconectado

Mensajes: 15


Ver Perfil
Re: Duda para crear un ''programa''
« Respuesta #5 en: 11 Mayo 2011, 12:52 pm »

Lo que quiero es hacer el programa rápido... y que funcione.
Por eso elegí usar BATCH
Un saludo
En línea

N3Tw0lf

Desconectado Desconectado

Mensajes: 20


NETwolf


Ver Perfil
Re: Duda para crear un ''programa''
« Respuesta #6 en: 14 Mayo 2011, 21:11 pm »

Lo que pasa es que algunas veces en batch los comandos pueden fallar y te dejaria sin la info que queres recibir, imaginate si lo que vos "infectas" tiene windows vista que tiene muchos errores o windows seven que cambiaron algunas cosas. Aparte batch es algo como para que puedas ejecutar algunos procesos en tu propia pc pero en otras algunas cosas cambian depende de quien reciba la info tambien imaginate que esa info la reciba alguien que sabe apenas un poco de su entorno con solo poner el mouse arriba del archivo, tocar el  boton derecho y clickear Editar podria ver lo que queres hacer en su computadora . En cambio en un lenguaje todo es mas seguro , desde mi punto de vista en un lengua de programacion vos creas tus propias reglas de como queres que se hagan las cosas en cambio en batch vas a estas siempre limitado al entorno guindous , no quiero desprestigiar batch la mayoria empesamos por ahi pero lo mejor es aprenderse un lenguaje de programacion . Con respecto a que lenguaje te podria recomendar diria que uses uno que este orientado a objetos , POO, personalmente yo empese programando en batch despues me pase al turbo de pascal y desde que conoci delphi aprendi muchisimas cosas y es muy facil de aprender.

Salud y exitos.
En línea

Experiencia es el nombre que le damos a nuestros errores
bomba1990


Desconectado Desconectado

Mensajes: 395



Ver Perfil WWW
Re: Duda para crear un ''programa''
« Respuesta #7 en: 15 Mayo 2011, 08:42 am »

Aqui te dejo unos articulos que quizas te puedan servir:

http://geeks.ms/blogs/gballadares/archive/2009/11/21/c-243-mo-enviar-correo-correo-electr-243-nico-quot-a-mano-quot-parte-i.aspx

http://geeks.ms/blogs/gballadares/archive/2009/11/24/c-243-mo-enviar-correo-electr-243-nico-a-mano-parte-ii-smtp-autenticado.aspx
En línea

"Cuando le di de comer a los pobres me llamaron santo, pero cuando pregunte porque los pobres eran pobres me dijeron comunista"

http://sosinformatico.blogspot.com/
http://www.publisnet.com.ve
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Programa para crear emoticonos. « 1 2 »
Diseño Gráfico
NeRoFiLo 11 3,707 Último mensaje 19 Mayo 2005, 23:13 pm
por MinusFour
PROGRAMA PARA CREAR MENUS PARA DVD QUE LEA TAMBIEN EXE O SWF ?
Multimedia
rocagt 2 4,903 Último mensaje 7 Mayo 2011, 13:18 pm
por Songoku
[Duda] Crear programa para descargar audio
Programación General
Br1ant 0 1,580 Último mensaje 17 Mayo 2015, 00:35 am
por Br1ant
Contratacion para Crear programa
Programación General
LukaCrosszeria 0 2,659 Último mensaje 20 Julio 2022, 12:19 pm
por LukaCrosszeria
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines