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

 

 


Tema destacado: Introducción a la Factorización De Semiprimos (RSA)


  Mostrar Mensajes
Páginas: 1 ... 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 [1023] 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 ... 1236
10221  Programación / .NET (C#, VB.NET, ASP) / (solucionado) ¿clonar evento para varios elementos? ¿FOR? en: 18 Noviembre 2012, 12:39 pm
Hola,

Tengo un panel con casi 50 checkboxes (todos siguen un orden de nombre bien enumerado), y por ejemplo este es el sub del chekbox1:

Código
  1.    Public Sub C1CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles C1CheckBox1.CheckedChanged
  2.        If C1CheckBox1.Checked = True Then My.Settings.box1_selected = "Y" Else My.Settings.box1_selected = "N"
  3.        Dim checkedpath1 = C1CheckBox1.Text
  4.    End Sub

Lo que quisiera poder hacer es que ese mismo evento afecte a todos los checkboxes, eso se que se puede hacer añadiendo los checkboxes al "handle", vale, pero no es suficiente, ya que lo que hay dentro del sub del ejemplo solo afectará al checkbox 1 aunque yo añada todos al handle, ¿entienden lo que quiero decir?

Hay alguna forma de no escribir el mismo evento para los 50 checkboxes?

es decir, yo necesito hacer esto:

(Pseudocode)

Public Sub TODOS_LOS_CHECKBOXES_CheckedChanged(sender As Object, e As EventArgs) Handles TODOS_LOS_CHECKBOXES.CheckedChanged
If CUALQUIER_CHECKBOX.Checked = True Then My.Settings.NÚMERO_DEL_CHECKBOX_SELECCIONADO_selected = "Y" Else My.Settings.boxNÚMERO_DEL_CHECKBOX_SELECCIONADO_selected = "N"
Dim checkedpathNÚMERO_DEL_CHECKBOX _SELECCIONADO = C1CheckBoxNÚMERO_DEL_CHECKBOX _SELECCIONADO.Text
End Sub


Gracias y un saludo...
10222  Programación / Scripting / [RUBY] MP3Crank Leecher v0.2 en: 18 Noviembre 2012, 08:27 am
MP3Crank es una página web que actualizan constantemente con albums de muchos estilos... pop, rock, dance, electro, heavy metal, indie, folk, hiphop, r&b etc...
Yo personalmente descargo musica casi todos los días en esta página porque los enlaces están en "potload" y se descargan enseguida usando JDownloader.

La cuestión es que para acceder a un link de descarga primer hay que pasar por 3 páginas, así que para evitar ese tiempo de espera tán incómodo he decidido hacer este pequeño script que parsea las "X" primeras páginas de la página web y guarda los links en un archivo de texto...

Los enlaces que se listen se registran en un archivo log para que no se vuelvan a listar en el próximo uso del script.











- Se puede configurar el máximo de páginas a parsear.
- Se pueden excluir los albumes por "tags", en la configuración del script. por ejemplo si excluimos el tag "pop" no se listará ningún album de estilo pop.
NOTA: Tener en cuenta que muchos albumes de la página tienen varios tags, por ejemplo "pop, rock, indie", si el tag "pop" lo hemos excluido, ese album se omitirá tenga los otros tags que tenga.

- El archivo de salida que obtendremos es algo parecido a este:

Código:
Title   : Layo & Bushwacka! - Rising & Falling
Genre   : House, Techno
Year    : 2012
Page    : http://www.mp3crank.com/layo-bushwacka/rising-falling.htm
Download: http://potload.com/w34j2fem2bra


Title   : Press Gang Metropol - Checkpoint
Genre   : New Wave, Post-punk
Year    : 2012
Page    : http://www.mp3crank.com/press-gang-metropol/checkpoint.htm
Download: http://potload.com/dizvwuf3m3sy


Title   : Porcupine Tree - Octane Twisted (Live) (2CD)
Genre   : Progressive, Rock
Year    : 2012
Page    : http://www.mp3crank.com/porcupine-tree/octane-twisted-live-2cd.htm
Download: http://potload.com/7h1rld0rfz03


Title   : Nightwish - Imaginaerum (The Score)
Genre   : Symphonic Metal
Year    : 2012
Page    : http://www.mp3crank.com/nightwish/imaginaerum-the-score.htm
Download: http://potload.com/eqznab8d44uk


EXECUTABLE: http://exoshare.com/download.php?uid=1Z1TPBQO

MP3Crank.rb:
Código
  1. # -*- coding: UTF-8 -*-
  2.  
  3.  
  4. # MP3Crank Leecher v0.2
  5. #
  6. # By Elektro H@cker
  7.  
  8.  
  9. # Description:
  10. # -----------
  11. #
  12. # MP3Crank Leecher it's a tool that helps you to keep updated your music collection.
  13. #
  14. # This tool is intended for (almost) daily use.
  15. #
  16. # The script retreives all the downloadable links of the first "X" pages from the MP3Crank website,
  17. # And then list the links into a text file for use it with a download managaer like "JDownloader".
  18. #
  19. # All the links are stored permanently into a log file to be excluded at the next use,
  20. # (that's the reason why this tool is intended for daily use).
  21. #
  22. #
  23. # The pass for the links is: mp3crank.com
  24.  
  25.  
  26. require 'net/http'
  27. require 'win32/registry'
  28. require "highline/system_extensions"
  29. include HighLine::SystemExtensions
  30.  
  31.  
  32. exit if Object.const_defined?(:Ocra)
  33.  
  34.  
  35. def logo()
  36. puts "
  37. MP3CRANK Leecher v0.2
  38. By Elektro H@cker"
  39. end
  40.  
  41.  
  42. def main()
  43. puts "\n\n(Remember, the password for the links is: \"mp3crank.com\")\n\n[+] Press \"C\" to config or press any other key to start leeching..."
  44. key = get_character
  45. config("") if key.to_s =~ /^67$|^99$/
  46. get_downloads_list()
  47. puts "\n\n\n[+] All links are stored in: #{$mp3crank_leecherfile}\n\n(Remember, the password for the links is: \"mp3crank.com\")"
  48. exit
  49. end
  50.  
  51.  
  52. def get_settings()
  53. begin
  54. $mp3crank_logfile = regread("LOGFILEPATH")
  55. rescue
  56. $mp3crank_logfile = "#{ENV['WINDIR']}\\MP3Crank Leecher LOG.txt"
  57. end
  58.  
  59. begin
  60. $mp3crank_leecherfile = regread("LEECHERFILEPATH") +  "MP3Crank Leecher #{Time.new.strftime("%Y-%m-%d")}.txt"
  61. rescue
  62. $mp3crank_leecherfile = "#{ENV['USERPROFILE']}\\Desktop\\MP3Crank Leecher #{Time.new.strftime("%Y-%m-%d")}.txt"
  63. end
  64.  
  65. begin
  66. $max_pages = regread("MAXPAGES")
  67. $max_pages = $max_pages.to_i
  68. rescue
  69. $max_pages = 10
  70. end
  71.  
  72. begin
  73. $excluded_tags = regread("EXCLUDED TAGNAMES")
  74. rescue
  75. $excluded_tags = ""
  76. end
  77.  
  78. end
  79.  
  80.  
  81. def config(errorcode)
  82.  
  83. puts "
  84. º---------------------------------º---------------------------------º
  85. | [1] Set the log file path       | [S] Show the current settings   |
  86. | [2] Set the leecher file path   | [R] Reset the settings          |
  87. | [3] Delete the log file         | [Z] Backup all the settings     |
  88. |---------------------------------|---------------------------------|
  89. | [M] Max. Pages to parse         |                                 |
  90. | [T] Tagnames to exclude         | [E] Exit                        |
  91. º---------------------------------º---------------------------------º
  92. "
  93. get_settings()
  94. puts errorcode
  95.  
  96. keystr = "NOTHING"
  97. until keystr =~ /^49$|^50$|^51$|^69$|^80$|^82|^83$|^84$|^90$|^101$|^112$|^114$|^115$|^116$|^122$/
  98. print "\nChoose an option >> "
  99. key = get_character
  100. keystr = key.to_s
  101. end
  102.  
  103. # Log file path
  104. if key == 49
  105. logfilepath = "NOTHING"
  106. until File.directory?(logfilepath)
  107. print "\n\nEnter the path to an existing directory for the logfile: "
  108. logfilepath = STDIN.gets.chomp
  109. end
  110. if logfilepath[-1] == '\\' then logfilepath = logfilepath[0..-2] end
  111. regwrite("LOGFILEPATH", logfilepath + "\\MP3Crank Leecher LOG.txt")
  112. config("[+] Operation completed.")
  113. end
  114.  
  115. # Leecher file path
  116. if key == 50
  117. leecherfile = "NOTHING"
  118. until File.directory?(leecherfile)
  119. print "\n\Enter the path to an existing directory for the leecher file: "
  120. leecherfile = STDIN.gets.chomp
  121. end
  122. if not leecherfile[-1] == '\\' then leecherfile = leecherfile+"\\" end
  123. regwrite("LEECHERFILEPATH", leecherfile)
  124. config("[+] Operation completed.")
  125. end
  126.  
  127. # delete log file
  128. if key == 51
  129. filedel = "NOTHING"
  130. while not filedel =~ /^78$|^89$|^110$|^121$/
  131. print "\n\nWant to delete the log file, Are you sure? [Y/N]: "
  132. filedel = get_character.to_s
  133. end
  134. begin
  135. if filedel =~ /^89$|^121$/ then File.delete($mp3crank_logfile) end
  136. config("[+] Operation completed.")
  137. rescue
  138. config("\n\nERROR\n\nCan't find the logfile.")
  139. end
  140. end
  141.  
  142. # Max pages
  143. if key == 80 or key == 112
  144. maxpages = "NOTHING"
  145. puts "\n\nThis option lets you configure the maximum pages to leech..."
  146. until not maxpages[/[a-z]/i]
  147. print "\nEnter a number for the max pages value: "
  148. maxpages = STDIN.gets.chomp
  149. end
  150. regwrite("MAXPAGES", maxpages)
  151. config("[+] Operation completed.")
  152. end
  153.  
  154. # exclude tagnames
  155. if key == 84 or key == 116
  156. addtag = "NOTHING"
  157. puts "\n\nThis option lets you exclude albums by their genre tagnames..."
  158. until not addtag == "NOTHING"
  159. print "\n\nEnter a tagname (Example: \"Hip Hop\") \nor enter the word \"none\" to reset the exclusions: "
  160. addtag = STDIN.gets.chomp
  161. end
  162. begin
  163. tags=regread("EXCLUDED TAGNAMES")
  164. rescue
  165. tags=""
  166. end
  167. if addtag =~ /^none$/i then regwrite("EXCLUDED TAGNAMES", "") else regwrite("EXCLUDED TAGNAMES", "#{tags};#{addtag}") end
  168. config("[+] Operation completed.")
  169. end
  170.  
  171. # show the current settings
  172. if key == 83 or key == 115
  173. config("
  174.  
  175. Log file path       : #{$mp3crank_logfile}
  176.  
  177. Leecher file path   : #{$mp3crank_leecherfile}
  178.  
  179. Max. pages to parse : #{$max_pages} pages
  180.  
  181. Excluded tagnames   : #{$excluded_tags.gsub(";","|")}
  182.  
  183. ")
  184. end
  185.  
  186. # reset the settings
  187. if key == 114 or key == 82
  188. resetkey = "NOTHING"
  189. while not resetkey =~ /^78$|^89$|^110$|^121$/
  190. print "\n\nWant to reset all the settings, Are you sure? [Y/N]: "
  191. resetkey = get_character.to_s
  192. end
  193. if resetkey =~ /^89$|^121$/
  194. Win32::Registry::HKEY_CURRENT_USER.open("SOFTWARE\\MP3Crank Leecher\\", Win32::Registry::KEY_ALL_ACCESS) do |reg|
  195. reg['LOGFILEPATH'] = 'DELETE'
  196. reg.delete_value("LOGFILEPATH")
  197. reg['LEECHERFILEPATH'] = 'DELETE'
  198. reg.delete_value("LEECHERFILEPATH")
  199. reg['MAXPAGES'] = 'DELETE'
  200. reg.delete_value("MAXPAGES")
  201. reg['EXCLUDED TAGNAMES'] = 'DELETE'
  202. reg.delete_value("EXCLUDED TAGNAMES")
  203. end
  204. config("[+] Operation completed.")
  205. end
  206. end
  207.  
  208. # backup the settings
  209. if key == 90 or key == 122
  210. system %[ regedit /e \"%USERPROFILE%\\Desktop\\MP3Crank Leecher settings %DATE:/=-%.reg\" \"HKEY_CURRENT_USER\\Software\\MP3Crank Leecher\" ]
  211. config("\n\n[+] Settings stored in #{ENV['USERPROFILE']}\\Desktop\\MP3Crank Leecher settings.reg")
  212. end
  213.  
  214. # exit
  215. if key == 69 or key == 101 then main() end
  216.  
  217. end
  218.  
  219.  
  220. def show_info()
  221.  @info = "
  222.  
  223. Title   : #{@album_title}
  224. Genre   : #{@album_tags.to_s.gsub('\\t','').gsub(']','').gsub('[','').gsub('"','').gsub('nil','').gsub(', , ','')}
  225. Year    : #{@year}
  226. Page    : #{@album_page}
  227. Download: #{@potload_url}
  228.  
  229. "
  230.  puts @info
  231. end
  232.  
  233.  
  234. def get_downloads_list()
  235. @page = 0
  236. print "\n\n[+] Leeching pages "
  237. for i in 1..$max_pages do
  238. @page = @page+1
  239. @url  = "http://www.mp3crank.com/page/#{@page}"
  240. print "#{@page}/#{$max_pages}..."
  241. Net::HTTP.get_response(URI.parse(@url)).body.split('<!--/centercol -->').first.split('<div id="centercol">').last.each_line do |line|
  242.  
  243. if (line['class="release"']) then @downloadable = "yes" end
  244.  
  245. if line['class="year"'] then @year = line.split('</').first.split('>').last end
  246.  
  247. if line['class="genres"']
  248. for tag in line.split('rel="tag">').each do
  249. @album_tags = @album_tags, tag.split('<').first.gsub('&amp;','&')
  250. for excluded_tag in $excluded_tags.split(";").each do
  251. if not excluded_tag == "" and tag.split('<').first.to_s.chomp[/^#{Regexp.escape(excluded_tag)}$/i] then @downloadable = "no" end
  252. end
  253. end
  254. end
  255.  
  256. if line['class="album"']
  257. @album_title   = line.split('title="').last.split('">').first.gsub('Free MP3 download ','').gsub('&amp;','&')
  258. @album_page    = line.split('" rel=').first.split('"').last
  259. @download_page = Net::HTTP.get_response(URI.parse(@album_page)).body[/http:\/\/www.mp3crank.com\/download\/album\/[0-9]+/i]
  260. @potload_url   = Net::HTTP.get_response(URI.parse(@download_page)).body[/http:\/\/potload.com\/[a-z0-9]+/i]
  261. if @downloadable == "yes"
  262. filewrite()
  263. end
  264. @album_tags  = nil
  265. end
  266.  
  267. end
  268. end
  269. end
  270.  
  271.  
  272. def regread(keyname)
  273. Win32::Registry::HKEY_CURRENT_USER.open("SOFTWARE\\MP3Crank Leecher\\") do |reg| reg[keyname] end
  274. end
  275.  
  276.  
  277. def regwrite(keyname, value)
  278. Win32::Registry::HKEY_CURRENT_USER.create("SOFTWARE\\MP3Crank Leecher\\") do |reg| reg[keyname, Win32::Registry::REG_SZ] = value end
  279. end
  280.  
  281.  
  282. def filewrite()
  283. if not File.exist?($mp3crank_logfile) then File.open($mp3crank_logfile, "w") do |write| write.puts "MP3Crack leeched URLs\n\n(Remember, the password for the links is: \"mp3crank.com\")\n\n" end end
  284. if not File.open($mp3crank_logfile, "r").read[@album_page]
  285. show_info()
  286. File.open($mp3crank_logfile,     "a+") do |write| write.puts @album_page end
  287. File.open($mp3crank_leecherfile, "a+") do |write| write.puts @info end
  288. end
  289. end
  290.  
  291.  
  292. logo()
  293. get_settings()
  294. main()
  295.  
  296.  
  297.  
10223  Sistemas Operativos / Windows / Re: (Solucionado) ¿Como usar "Enviar a..." moviendo el archivo de origen? en: 17 Noviembre 2012, 10:48 am
Hola!!!
Estaba buscando una solución para ese mismo "problemilla" del "enviar a" y he dado con este hilo :D

El link del archivo compilado está caido, ¿te sabría mal subirlo de nuevo? (tb he buscado en inet por si aparecía)

Muchas gracias

Me van a regañar por contestarte, fíjate en la fecha del post!  :-\

Desde la última vez que publiqué una actualización de esta tool no he vuelto a tocar el code xD

Aquí tienes el executable:

http://exoshare.com/download.php?uid=BRBGOHYP


Y aquí más info: [RUBY] (APORTE) MoveIt (Complemento para el menú SendTo de Windows)

Saludos

10224  Programación / Scripting / Re: [RUBY] SoundCloud Leecher v0.5 (Manten al día tu colección de música!) en: 17 Noviembre 2012, 08:44 am
Excelente código gracias por compartirlo.  ;-)

Gracias me alegra que te haya gustado



Nueva versión 0.5

Bugs corregidos:
  • Las exclusiones por el máximo/mínimo duración de la pista no funcionaban correctamente

Mejoras:
  • He optimizado el peso del archivo "log" para que pese la mitad.
  • Nueva opción para excluir pistas por su tamaño.
  • Nueva opción para excluir pistas por su extensión de archivo.
  • Nueva opción para excluir pistas por "tags" en el nombre del archivo.
  • Nueva opción para activar el modo verbose, para mostrar más información.
  • Otras nuevas opciones algo más técnicas...
  • Todas las opciones antiguas y nuevas se han mejorado en general tanto para que séa un entorno de configuración más agradable como para intentar evitar bugs.
10225  Media / Multimedia / Re: Amplificar AVI en: 17 Noviembre 2012, 06:46 am
Upsss !! creo que respondí muy rapido la última vez, ya logre descargarlo y realice el proceso, muchas gracias **Resuelto** y quedó Excelente!!!!, lo escuchan hasta en el vecindario, jajajaja

Me alegra que te haya servido mi instalador, lo que no entiendo es como el paquete oficial del virtualdubmod no te ha funcionado :xD

Un saludo!
10226  Programación / Scripting / Re: [RUBY] SoundCloud Leecher v0.4 (Manten al día tu colección de música!) en: 16 Noviembre 2012, 13:30 pm
Nueva versión 0.4

He añadido una opción para configurar la mínima y máxima duracion aceptada para las pistas de audio, por ejemplo para los que no queremos cojer las urls de sesiones de dj's que duran horas, etc...

un saludo
10227  Media / Multimedia / Re: Amplificar AVI en: 16 Noviembre 2012, 09:07 am
Cita de: subefotos
Lo sentimos pero la foto a la que intentas acceder no se encuentra en nuestro servidor.

Puede que la URL sea incorrecta o que la foto ha caducado por falta de visitas.

que dll pone que falta en la imagen?

EDITO: Prueba suerte con mi instalador personalizado -> http://exoshare.com/download.php?uid=0ZKAJ05L
10228  Media / Multimedia / Re: Necesito los nombres.exe de Reproductores multimedia conocidos en: 15 Noviembre 2012, 22:13 pm
de que se trata tu aplicación?

En realidad es una tontería porque no tengo los suficientes conocimientos para hacer cosas grandes en VS,
Es un mini-programa que genera listas de reproducción de carpetas para reproducirlas, con opción apra randomizar la lista o no, y por el momento ya está, no se si se me ocurrirá añadirle algo más que parezca útil xD.

Esto ya lo hice en Batch, pero me gustaría ver "el cambio" visual que se puede conseguir.

Saludos
10229  Media / Multimedia / Necesito los nombres.exe de Reproductores multimedia conocidos en: 15 Noviembre 2012, 22:06 pm
Hola,

Busco el nombre de los ejecutables de reproductores de audio, es para una mini aplicación que estoy haciendo en VS.

De momento solo tengo estos:

mpc.exe
mpc-hc.exe
mpc-hc64.exe
vlc.exe
winamp.exe
wmp.exe


una ayudita?  :P
10230  Programación / Scripting / Re: [RUBY] SoundCloud Leecher v0.2 (Manten al día tu colección de música!) en: 15 Noviembre 2012, 19:39 pm
Nueva versión 0.3 !!

El script ya no es tán preconfigurado, es más personalizable y todo se lee desde el registro de Windows.

Un nuevo menú con varias opciones:

  • Añadir un grupo
  • Eliminar un grupo
  • Listar los grupos
  • Establecer la ruta del log
  • Establecer la ruta del archivo leecher
  • Eliminar el archivo log
  • Eliminar el el archivo leecher
  • Establecer el máximo número de páginas a parsear
  • Crear un backup de las opciones

PD: He añadido un executable en el comentario principal.

Un saludo!

Saludos
Páginas: 1 ... 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 [1023] 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 ... 1236
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines