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

 

 


Tema destacado: Guía rápida para descarga de herramientas gratuitas de seguridad y desinfección


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [RUBY] [WINDOWS] IShack v1.4 (ImagesHack Uploader) ...(24/10/2012)
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [RUBY] [WINDOWS] IShack v1.4 (ImagesHack Uploader) ...(24/10/2012)  (Leído 5,428 veces)
Eleкtro
Ex-Staff
*
Conectado Conectado

Mensajes: 9.819



Ver Perfil
[RUBY] [WINDOWS] IShack v1.4 (ImagesHack Uploader) ...(24/10/2012)
« en: 18 Octubre 2012, 04:32 am »

ISHACK v1.4
An Imageshack commandline uploader.

By Elektro H@cker.








Modo de empleo:
Código:
 IShack (Opciones) (Archivo)


Ejemplos:
Código:

IShack -d Imagen.jpg
(Devuelve el enlace directo de la imagen)

IShack -d "C:\Imagen1.bmp" "C:\Imagen2.jpg" "C:\Imagen3.png"
(Devuelve el enlace directo de varias imagenes)

IShack --private -b -h "C:\Imagen.jpg"
(Marca la imagen como privada, y devuelve el enlace BB y HTML de la imagen)

IShack --resize 640x480 -d Imagen1.jpg Imagen2.bmp
(Redimensiona las imagenes a XxY y devuelve el enlace directo)

IShack --config
(Muestra el menú de configuración de cuenta de acceso)
.


Opciones:
Código:
-d  --direct
    Devuelve el enlace directo de la imagen.

-t  --thumb
    Devuelve el enlace directo de la miniatura de la imagen.

-b  --bbcode
     Devuelve el enlace de la imagen en formato BB.

-bt --bbcodethumb
     Devuelve el enlace de la imagen con miniatura en formato BB.

-h  --html
     Devuelve el enlace de la imagen en formato HTML.

-ht --htmlthumb
     Devuelve el enlace de la imagen con miniatura en formato HTML.

-i --imageshack
     Devuelve el enlace web de la imagen en imageshack.

-y  --yfrog
     Devuelve el enlace web de la imagen en YFrog.

-yt  --yfrogthumb
     Devuelve el enlace de la miniatura de la imagen en YFrog.

-a  --all
     Devuelve el enlace de la imagen en todos los formatos.

-p  --private
     Marca la imagen como privada.

-r  --resize
     Redimensiona la imagen.

-c  --config
     Establece los datos de acceso a una cuenta de ImagesHack.

/?   Muestra esta ayuda.






Cambios en la versión 1.4
  • El script ahora comprueba si el usuario/pass existe en Imageshack.
  • Añadida una opción para redimensionar la imagen subida.
  • Eliminada la opción para marcar la imagen como "pública", pues era innecesaria.
  • Añadido un switch alternativo ("-p") para la opción "--private".

Cambios en la versión 1.3
 Corregido un error de última hora en los switches yes/no de la privacidad de la imagen, estaban al revés xD.

Cambios en la versión 1.2

  • Un cambio de nombre, ahora es ISHACK      ...xD
  • El programa ahora acepta más de una opción de formato al mismo tiempo
           (Antes solo se podía usar uno de los parámetros, ahora se pueden elegir los formatos deseados)

  • Se puede subir más de un archivo simultaneamente.
  • Opcion añadida para poder marcar la imagen como pública o privada
  • Más opciones de formato añadidas pudiendo obtener los siguientes enlaces:
           bb code thumbnail
            html thumbnail
            imageshack web
            yfrog web
            yfrog web thumbnail

  • Se genera automáticamente un código de miniaturas aunque Imageshack no cree la miniatura.
  • Los datos de acceso de la cuenta de ImagesHack se almacenan (cifrados) en el registro de Windows.
  • Pequeños cambios internos en el código, se ha simplificado y mejorado un poco dentro de lo que me ha sido posible. (No soy un PRO de Ruby :P)

 ERRORES CORREGIDOS:
  • Si la imagen es demasiado pequeña ImagesHack no devuelve una miniatura pero ya no da error.
  • Corregida la información de los formatos compatibles (ICO no es soportado por Imageshack)

Cambios en la versión 1.1

  • Se puede configurar para subir las imagenes anónimamente o a una cuenta
  • Se comprueba si la imagen se subió correctamente
  • La obtención de la imagen en BB code link se ha modificado quitandole el tag [ URL ]
  • El código del script se ha simplificado y mejorado un poco...



DESCARGAS:

SHACK.exe (El script compilado, nada más): http://exoshare.com/download.php?uid=RR0ZEMGX

SHACK.exe (Instalador personalizado para windows que añade opciones al menú contextual...): http://exoshare.com/download.php?uid=1PPR9PPT





ISHACK.rb (v 1.4):
Código
  1. # -*- coding: UTF-8 -*-
  2.  
  3.  
  4. require 'rest_client'
  5. require 'openssl'
  6. require 'win32/registry'
  7.  
  8.  
  9. exit if Object.const_defined?(:Ocra)
  10.  
  11.  
  12. $formats = ""
  13. $files   = ""
  14.  
  15.  
  16. def logo()
  17.  print "
  18.  @    @@                          
  19.      @  @  @    *             *    
  20.  @   @     @  *    @@@  * @@@   @   @ *
  21. *@    @  * @     *    @  @ * @  @  @
  22.  @   * @   @ @@       @  @      @ @
  23.  @*     @  @@ *@   @@@@  @  *   @@  *
  24.  @  @ * @  @   @  @ * @  @      @ @
  25. *@  @  @   @   @  @   @  @ * @  @* @
  26.  @   @@    @ * @   @@@@   @@@   @   @
  27.  
  28.                                v1.4
  29.                                By Elektro H@cker\n"
  30. end
  31.  
  32.  
  33. def help()
  34. print '
  35. [Modo de empleo]
  36.  
  37. IShack (Opciones) (Archivo)
  38.  
  39.  
  40.  
  41. [Ejemplos]
  42.  
  43. [+] IShack -d Imagen.jpg
  44.     Devuelve el enlace directo de la imagen.
  45.  
  46. [+] IShack -d "C:\Imagen1.bmp" "C:\Imagen2.jpg" "C:\Imagen3.png"
  47.     Devuelve el enlace directo de varias imagenes.
  48.  
  49. [+] IShack --private -b -h "C:\Imagen.jpg"
  50.     Marca la imagen como privada, y devuelve el enlace BB y HTML de la imagen.
  51.  
  52. [+] IShack --resize 640x480 -d Imagen1.jpg Imagen2.bmp
  53.     Redimensiona las imagenes a XxY y devuelve el enlace directo.
  54.  
  55. [+] IShack --config
  56.     Muestra el menú de configuración de cuenta de acceso.
  57.  
  58.  
  59.  
  60. [Opciones]
  61.  
  62.  -d  --direct
  63.      Devuelve el enlace directo de la imagen.
  64.  
  65.  -t  --thumb
  66.      Devuelve el enlace directo de la miniatura de la imagen.
  67.  
  68.  -b  --bbcode
  69.       Devuelve el enlace de la imagen en formato BB.
  70.  
  71.  -bt --bbcodethumb
  72.       Devuelve el enlace de la imagen con miniatura en formato BB.
  73.  
  74.  -h  --html
  75.       Devuelve el enlace de la imagen en formato HTML.
  76.  
  77.  -ht --htmlthumb
  78.       Devuelve el enlace de la imagen con miniatura en formato HTML.
  79.  
  80.  -i --imageshack
  81.       Devuelve el enlace web de la imagen en imageshack.
  82.  
  83.  -y  --yfrog
  84.       Devuelve el enlace web de la imagen en YFrog.
  85.  
  86.  -yt  --yfrogthumb
  87.       Devuelve el enlace de la miniatura de la imagen en YFrog.
  88.  
  89.  -a  --all
  90.       Devuelve el enlace de la imagen en todos los formatos.
  91.  
  92.  -p  --private
  93.       Marca la imagen como privada.
  94.  
  95.  -r  --resize
  96.       Redimensiona la imagen.
  97.  
  98.  -c  --config
  99.       Establece los datos de acceso a una cuenta de ImagesHack.
  100.  
  101.  /?   Muestra esta ayuda.
  102.  
  103. '
  104. Process.exit
  105. end
  106.  
  107.  
  108. def arguments()
  109.  
  110.  # empty arguments
  111.  if (ARGV.empty?) then help() end
  112.  
  113.  ARGV.each do |arg|
  114.  
  115.  # /?
  116.    if arg == "/?" then help() end
  117.  
  118.  # -c --config
  119.    if arg =~ /-c\z/i or arg =~ /--config\z/i then configure() end
  120.  
  121.  # private
  122.    if arg =~ /-p\z/i or arg =~ /--private\z/i then $privacity = "no" end
  123.  
  124.  # -d --direct
  125.    if arg =~ /-d\z/i or arg =~ /--direct\z/i then $formats=$formats + "\n-d" end
  126.  
  127.  # -t --thumb
  128.    if arg =~ /-t\z/i or arg =~ /--thumb\z/i  then $formats=$formats + "\n-t" end
  129.  
  130.  # -b --bbcode
  131.    if arg =~ /-b\z/i or arg =~ /--bbcode\z/i then $formats=$formats + "\n-b" end
  132.  
  133.  # -bt --bbcodethumb
  134.    if arg =~ /-bt\z/i or arg =~ /--bbcodethumb\z/i then $formats=$formats + "\n-bt" end
  135.  
  136.  # -h --html
  137.    if arg =~ /-h\z/i or arg =~ /--html\z/i then $formats=$formats + "\n-h" end
  138.  
  139.  # -ht --htmlthumb
  140.    if arg =~ /-ht\z/i or arg =~ /--htmlthumb\z/i then $formats=$formats + "\n-ht" end
  141.  
  142.  # -i --imageshack
  143.    if arg =~ /-i\z/i or arg =~ /--imageshack\z/i then $formats=$formats + "\n-i" end
  144.  
  145.  # -y --yfrog
  146.    if arg =~ /-y\z/i or arg =~ /--yfrog\z/i then $formats=$formats + "\n-y" end
  147.  
  148.  # -yt --yfrogthumb
  149.    if arg =~ /-yt\z/i or arg =~ /--yfrogthumb\z/i then $formats=$formats + "\n-yt" end
  150.  
  151.  # -a --all
  152.    if arg =~ /-a\z/i or arg =~ /--all\z/i then $formats="\n-d"+"\n-t"+"\n-b"+"\n-bt"+"\n-h"+"\n-ht"+"\n-i"+"\n-y"+"\n-yt" end
  153.  
  154.  # -r --resize
  155. if arg =~ /-r\z/i or arg =~ /--resize\z/i
  156. $resize_switch = "1"
  157. $resize_size   = ARGV.to_s.split('"'+arg+'", "').last.split('"').first
  158. if not $resize_size[/^[0-9]{1,5}[x][0-9]{1,5}$/i]
  159. print "  [+] ERROR\n\n      La resolución \"#{$resize_size}\" no es correcta...\n"
  160. Process.exit
  161. end
  162. elsif arg =~ /-r\z/i or arg =~ /--resize\z/i
  163. $resize_switch = "0"
  164.    print "hola"
  165.    sleep 3
  166. end
  167.  
  168.  # files to upload
  169.    if arg[/.bmp\z/i] or arg[/.gif\z/i] or arg[/.jpg\z/i] or arg[/.jpeg\z/i] or arg[/.png\z/i] or arg[/.tif\z/i] or arg[/.tiff\z/i]
  170.      if File.exist?(arg)
  171.        $files=$files + arg + "\n"
  172.      elsif
  173.        print "  [+] ERROR\n\n      La imagen #{arg} no existe...\n"
  174.        Process.exit
  175.      end
  176.    end
  177.  end # ARGV.each
  178.  
  179.  # empty options
  180.  if $formats == ""
  181.    print "  [+] ERROR\n\n      Opción incorrecta...\n"
  182.    Process.exit
  183.  end
  184.  
  185. end
  186.  
  187.  
  188. def configure()
  189. $profile = "error id"
  190.    print "\n Puede configurar su cuenta de acceso de ImagesHack para subir las imagenes...\n\n"
  191.  
  192.   until not $profile["error id"]
  193.     print " [+] Escriba su nombre de usuario: "
  194.   $user=STDIN.gets
  195.   if $user == "\n" then $user="guest\n" end
  196.  
  197.   print " [+] Escriba su password: "
  198.   $pass=STDIN.gets
  199.   if $pass == "\n" then $pass="guest\n" end
  200.  
  201.   $profile = RestClient.post('http://imageshack.us/auth.php',
  202.   :username => $user.gsub("\n",""),
  203.   :password => $pass.gsub("\n",""),
  204.   :format => "xml"
  205.   )
  206.  
  207.   if $profile["error id"] and not $user+$pass=="guest\nguest\n"
  208.   print "\n [+] ERROR\n\n     El nombre de usuario o contraseña son incorrectos.\n\n"
  209.   elsif $user=="guest\n" and $pass=="guest\n"
  210.   $profile="guest"
  211.   end
  212.   end # until
  213.   userencrypted=cifrar($user, "DES-EDE3-CBC")
  214.   passencrypted=cifrar($pass, "DES-EDE3-CBC")
  215.   regwrite("USER", userencrypted)
  216.   regwrite("PASS", passencrypted)
  217.   puts "\n Datos configurados, vuelva a ejecutar el programa..."
  218.   Process.exit
  219. end
  220.  
  221.  
  222. def cifrar(datos, cifrado)
  223.  encrypt = OpenSSL::Cipher::Cipher.new(cifrado)
  224.  encrypt.encrypt
  225.  encrypt.update(datos) + encrypt.final      
  226. end
  227.  
  228.  
  229. def descifrar(datos, cifrado)
  230.  decrypt = OpenSSL::Cipher::Cipher.new(cifrado)
  231.  decrypt.decrypt
  232.  decrypt.update(datos) + decrypt.final
  233. end
  234.  
  235.  
  236. def regwrite(keyname, value)
  237.  Win32::Registry::HKEY_CURRENT_USER.create("SOFTWARE\\IShack\\") do |reg|
  238.    reg[keyname, Win32::Registry::REG_SZ] = value
  239.  end
  240. end
  241.  
  242.  
  243. def regread(keyname)
  244.  Win32::Registry::HKEY_CURRENT_USER.open("SOFTWARE\\IShack\\") do |reg|
  245.    reg[keyname]
  246.  end
  247. end
  248.  
  249.  
  250. def subir(file)
  251.  print "\n [ Subiendo la imagen #{file}... ]\n\n"
  252.  
  253.  begin
  254.    $Imagen = RestClient.post('http://www.imageshack.us/upload_api.php',
  255.    :a_username => $user,
  256.    :a_password => $pass,
  257.    :key        => "268BEKSV9465b858a45cd1b4d2b32d1195ee6f27",
  258.    :public     => $privacity,
  259.    :fileupload => File.new(file),
  260.    :optimage   => $resize_switch,
  261.    :optsize    => $resize_size)
  262.  rescue
  263.    print ' [+] ERROR
  264.  
  265.     El error puede ser debido a uno de los siguientes motivos:
  266.  
  267.     - La página esté offline.
  268.     - El tamaño de la imagen supere los 10 MB.
  269.     - Haya superado el límite de 500 imagenes hospedadas en su cuenta.
  270.    '
  271.  Process.exit
  272.  end # exception
  273. end
  274.  
  275.  
  276. def show()
  277.  if $Imagen["http://www.imageshack.us/thumbnail."] then $thumbs="no" end
  278.  $nothumb = ' ImagesHack no creó ninguna miniatura. (La imagen es demasiado pequeña)' + "\n"
  279.  
  280.  direct = $Imagen.split("<image_link>").last.split("</image_link>").first.to_s
  281.  thumb  = $Imagen.split("<thumb_link>").last.split("</thumb_link>").first
  282.  b      = "[IMG]"+$Imagen.split("<image_bb>").last.split("</image_bb>").first.split("[IMG]").last.split("[/IMG]").first+"[/IMG]"
  283.  bt     = $Imagen.split("<thumb_bb>").last.split("</thumb_bb>").first
  284.  h      = $Imagen.split("<image_html>").last.split("</image_html>").first.gsub("&gt;", ">").gsub("&lt;", "<").gsub("&quot;", "\"")
  285.  ht     = $Imagen.split("<thumb_html>").last.split("</thumb_html>").first.gsub("&gt;", ">").gsub("&lt;", "<").gsub("&quot;", "\"")
  286.  i      = $Imagen.split("<is_link>").last.split("</is_link>").first
  287.  y      = $Imagen.split("<yfrog_link>").last.split("</yfrog_link>").first
  288.  yt     = $Imagen.split("<yfrog_thumb>").last.split("</yfrog_thumb>").first
  289.  
  290.  $formats.each_line do |link|
  291.    if link.gsub("\n","") == "-d" then print " [+] DIRECTO:\n\n" + direct + "\n\n" end
  292.  
  293.    if link.gsub("\n","") == "-t"
  294.      print " [+] MINIATURA:\n\n"
  295.      if $thumbs=="no"
  296.        print $nothumb + "\n" + direct + "\n\n"
  297.      elsif
  298.        print thumb + "\n\n"
  299.      end
  300.    end # thumbail
  301.  
  302.    if link.gsub("\n","") == "-b"  then print " [+] BB CODE:\n\n" + b + "\n\n" end
  303.  
  304.    if link.gsub("\n","") == "-bt"
  305.      print " [+] BB CODE MINIATURA:\n\n"
  306.      if $thumbs=="no"
  307.        print $nothumb + "\n" + "[URL="+direct+"][IMG]"+direct+"[/IMG][/URL]"+"\n\n"
  308.      elsif
  309.        print bt + "\n\n"
  310.      end
  311.    end # bb thumbnail
  312.  
  313.    if link.gsub("\n","") == "-h"  then print " [+] HTML:\n\n" + h + "\n\n" end
  314.  
  315.    if link.gsub("\n","") == "-ht"
  316.      print " [+] HTML MINIATURA:\n\n"
  317.      if $thumbs=="no"
  318.        print $nothumb + "\n" + '<a href="' + direct + '" target="_blank"><img src="' + direct + '" alt="Imagen subida con IShack v1.4 (By Elektro H@cker)" border="0"/></a>'+"\n\n"
  319.      elsif
  320.        print ht + "\n\n"
  321.      end
  322.    end # ht thumbnail
  323.  
  324.    if link.gsub("\n","") == "-i"  then print " [+] IMAGESHACK:\n\n" + i + "\n\n" end
  325.    if link.gsub("\n","") == "-y"  then print " [+] YFROG:\n\n" + y + "\n\n" end
  326.    if link.gsub("\n","") == "-yt" then print " [+] YFROG MINIATURA:\n\n" + yt + "\n\n" end
  327.  end # |link|
  328. end
  329.  
  330.  
  331.  
  332. logo()
  333. arguments()
  334.  
  335. begin
  336.  $user=regread("USER")
  337.  $pass=regread("PASS")
  338.  $user=descifrar($user, "DES-EDE3-CBC").gsub("\n","")
  339.  $pass=descifrar($pass, "DES-EDE3-CBC").gsub("\n","")
  340. rescue
  341.  $user="guest"
  342.  $pass="guest"
  343. end
  344. $files.each_line do |file|
  345.  subir(file.gsub("\n",""))
  346.  show()
  347. end
  348.  
  349.  
  350. __END__
  351.  
  352.  


« Última modificación: 24 Octubre 2012, 11:37 am por EleKtro H@cker » En línea

HdM


Desconectado Desconectado

Mensajes: 1.674



Ver Perfil
Re: [RUBY] Shack v1.1 (ImagesHack Uploader)
« Respuesta #1 en: 18 Octubre 2012, 18:50 pm »

Excelente!!!, jajaja (como suele ser habitual  ;D )


En línea

- Nice to see you again -
Garcad

Desconectado Desconectado

Mensajes: 137


Ver Perfil
Re: [RUBY] Shack v1.1 (ImagesHack Uploader)
« Respuesta #2 en: 18 Octubre 2012, 21:56 pm »

Gracias lo he intentado instalar en un sistema de 32 bits y me dio error.

Al final cree un nuevo instalador para la ocasion, que en 32 bits me trabaja correctamente.

Código:
;InnoSetupVersion=5.5.0

[Setup]
AppName=SHACK (ImagesHack Uploader)
AppVerName=SHACK (ImagesHack Uploader) 1.1
AppVersion=1.1
DefaultDirName={pf}\Elektro H@cker Software\Shack
DefaultGroupName=SHACK (ImagesHack Uploader)
OutputBaseFilename=Shack
Compression=lzma/Max
PrivilegesRequired=poweruser
DisableDirPage=yes
DisableProgramGroupPage=yes
InfoBeforeFile=embedded\InfoBefore.txt
WizardImageFile=embedded\WizardImage.bmp
WizardSmallImageFile=embedded\WizardSmallImage.bmp

[Files]
Source: "{sys}\Shack.exe"; DestDir: "{sys}"; Flags: 32bit; MinVersion: 0.0,5.0
Source: "{pf32}\Elektro H@cker Software\Shack\Shack.ico"; DestDir: "{pf32}\Elektro H@cker Software\Shack"; Flags: 32bit; MinVersion: 0.0,5.0; Tasks: cm
Source: "{userstartmenu}\CommandLine\Shack.bat"; DestDir: "{userstartmenu}\CommandLine"; MinVersion: 0.0,5.0

[Dirs]
Name: "{pf32}\Elektro H@cker Software\Shack"

[Registry]
Root: HKCR; Subkey: "SystemFileAssociations\.BMP\shell\SubiraImagesHack"; ValueType: String; ValueData: "Subir a ImagesHack"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.BMP\shell\SubiraImagesHack"; ValueName: "icon"; ValueType: String; ValueData: "{app}\Shack.ico"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.BMP\shell\SubiraImagesHack"; ValueName: "position"; ValueType: String; ValueData: "top"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.BMP\shell\SubiraImagesHack\command"; ValueType: String; ValueData: "CMD.exe /k title Subiendo: ""%1"" & Mode con cols=80 lines=4 & For /f ""tokens=* skip=15"" %%a in ('Shack.exe -d ""%1""') do (CLS & Echo ""%1"" | More & Echo %%a & title ""%1"" & Pause>nul)"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.GIF\shell\SubiraImagesHack"; ValueType: String; ValueData: "Subir a ImagesHack"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.GIF\shell\SubiraImagesHack"; ValueName: "icon"; ValueType: String; ValueData: "{app}\Shack.ico"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.GIF\shell\SubiraImagesHack"; ValueName: "position"; ValueType: String; ValueData: "top"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.GIF\shell\SubiraImagesHack\command"; ValueType: String; ValueData: "CMD.exe /k title Subiendo: ""%1"" & Mode con cols=80 lines=4 & For /f ""tokens=* skip=15"" %%a in ('Shack.exe -d ""%1""') do (CLS & Echo ""%1"" | More & Echo %%a & title ""%1"" & Pause>nul)"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.JPG\shell\SubiraImagesHack"; ValueType: String; ValueData: "Subir a ImagesHack"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.JPG\shell\SubiraImagesHack"; ValueName: "icon"; ValueType: String; ValueData: "{app}\Shack.ico"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.JPG\shell\SubiraImagesHack"; ValueName: "position"; ValueType: String; ValueData: "top"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.JPG\shell\SubiraImagesHack\command"; ValueType: String; ValueData: "CMD.exe /k title Subiendo: ""%1"" & Mode con cols=80 lines=4 & For /f ""tokens=* skip=15"" %%a in ('Shack.exe -d ""%1""') do (CLS & Echo ""%1"" | More & Echo %%a & title ""%1"" & Pause>nul)"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.JPEG\shell\SubiraImagesHack"; ValueType: String; ValueData: "Subir a ImagesHack"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.JPEG\shell\SubiraImagesHack"; ValueName: "icon"; ValueType: String; ValueData: "{app}\Shack.ico"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.JPEG\shell\SubiraImagesHack"; ValueName: "position"; ValueType: String; ValueData: "top"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.JPEG\shell\SubiraImagesHack\command"; ValueType: String; ValueData: "CMD.exe /k title Subiendo: ""%1"" & Mode con cols=80 lines=4 & For /f ""tokens=* skip=15"" %%a in ('Shack.exe -d ""%1""') do (CLS & Echo ""%1"" | More & Echo %%a & title ""%1"" & Pause>nul)"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.PNG\shell\SubiraImagesHack"; ValueType: String; ValueData: "Subir a ImagesHack"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.PNG\shell\SubiraImagesHack"; ValueName: "icon"; ValueType: String; ValueData: "{app}\Shack.ico"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.PNG\shell\SubiraImagesHack"; ValueName: "position"; ValueType: String; ValueData: "top"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.PNG\shell\SubiraImagesHack\command"; ValueType: String; ValueData: "CMD.exe /k title Subiendo: ""%1"" & Mode con cols=80 lines=4 & For /f ""tokens=* skip=15"" %%a in ('Shack.exe -d ""%1""') do (CLS & Echo ""%1"" | More & Echo %%a & title ""%1"" & Pause>nul)"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.TIF\shell\SubiraImagesHack"; ValueType: String; ValueData: "Subir a ImagesHack"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.TIF\shell\SubiraImagesHack"; ValueName: "icon"; ValueType: String; ValueData: "{app}\Shack.ico"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.TIF\shell\SubiraImagesHack"; ValueName: "position"; ValueType: String; ValueData: "top"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.TIF\shell\SubiraImagesHack\command"; ValueType: String; ValueData: "CMD.exe /k title Subiendo: ""%1"" & Mode con cols=80 lines=4 & For /f ""tokens=* skip=15"" %%a in ('Shack.exe -d ""%1""') do (CLS & Echo ""%1"" | More & Echo %%a & title ""%1"" & Pause>nul)"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.TIFF\shell\SubiraImagesHack"; ValueType: String; ValueData: "Subir a ImagesHack"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.TIFF\shell\SubiraImagesHack"; ValueName: "icon"; ValueType: String; ValueData: "{app}\Shack.ico"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.TIFF\shell\SubiraImagesHack"; ValueName: "position"; ValueType: String; ValueData: "top"; MinVersion: 0.0,5.0;
Root: HKCR; Subkey: "SystemFileAssociations\.TIFF\shell\SubiraImagesHack\command"; ValueType: String; ValueData: "CMD.exe /k title Subiendo: ""%1"" & Mode con cols=80 lines=4 & For /f ""tokens=* skip=15"" %%a in ('Shack.exe -d ""%1""') do (CLS & Echo ""%1"" | More & Echo %%a & title ""%1"" & Pause>nul)"; MinVersion: 0.0,5.0;

[Run]
Filename: {userstartmenu}\CommandLine\Shack.bat; Description: "{cm:LaunchProgram,SHACK (ImagesHack Uploader)}"; MinVersion: 0.0,5.0; Flags: NoWait PostInstall;
Filename: shack.exe; Parameters: -c; Description: "Configurar SHACK"; MinVersion: 0.0,5.0; Flags: PostInstall NoWait;

[Tasks]
Name: "cm"; Description: "Agregar ""Subir a ImagesHack"" al menú contextual"; MinVersion: 0.0,5.0;

[CustomMessages]
default.NameAndVersion=%1 version %2
default.AdditionalIcons=Additional icons:
default.CreateDesktopIcon=Create a &desktop icon
default.CreateQuickLaunchIcon=Create a &Quick Launch icon
default.ProgramOnTheWeb=%1 on the Web
default.UninstallProgram=Uninstall %1
default.LaunchProgram=Launch %1
default.AssocFileExtension=&Associate %1 with the %2 file extension
default.AssocingFileExtension=Associating %1 with the %2 file extension...
default.AutoStartProgramGroupDescription=Startup:
default.AutoStartProgram=Automatically start %1
default.AddonHostProgramNotFound=%1 could not be located in the folder you selected.%n%nDo you want to continue anyway?

[Languages]
; These files are stubs
; To achieve better results after recompilation, use the real language files
Name: "default"; MessagesFile: "embedded\default.isl";

¿Se podria poner en el instalador la opcion de borrar el archivo de configuracion y ocultar un poco el nombre y el usuario, usando un cifrado seguro con un poco de salt?

Salu2
« Última modificación: 18 Octubre 2012, 22:00 pm por Garcad » En línea

Eleкtro
Ex-Staff
*
Conectado Conectado

Mensajes: 9.819



Ver Perfil
Re: [RUBY] Shack v1.1 (ImagesHack Uploader)
« Respuesta #3 en: 19 Octubre 2012, 16:33 pm »

NUEVA VERSIÓN 1.2 DISPONIBLE PARA DESCARGAR





Gracias lo he intentado instalar en un sistema de 32 bits y me dio error.

Al final cree un nuevo instalador para la ocasion, que en 32 bits me trabaja correctamente.
Tienes razón, no lo testeé en win x86, pero puedes usar este script que ya funciona bien:

PD: el InnoUnp omite muchos flags importantes y muchos valores al desempaquetar, pero veo que te has manejado bien con eso.

Código:
;ISHACK v1.2 By Elektro H@cker

[Setup]
AppName=ISHACK (ImagesHack Uploader)
AppVerName=ISHACK (ImagesHack Uploader) v1.2
AppVersion=v1.2
DefaultDirName={pf}\Elektro H@cker Software\ISHACK
DefaultGroupName=ISHACK (ImagesHack Uploader)
OutputBaseFilename=ISHACK
AlwaysShowComponentsList=false
DisableDirPage=true
DisableProgramGroupPage=true
DisableReadyPage=true
DisableStartupPrompt=true
FlatComponentsList=false
PrivilegesRequired=none
RestartIfNeededByRun=false
ShowLanguageDialog=no
Compression=lzma/ultra
InternalCompressLevel=ultra
SolidCompression=true
InfoBeforeFile=embedded\InfoBefore.txt
WizardImageFile=embedded\WizardImage.bmp
WizardSmallImageFile=embedded\WizardSmallImage.bmp
ArchitecturesInstallIn64BitMode=x64
SetupIconFile=icono.ico
[Dirs]
Name: {pf}\Elektro H@cker Software\ISHACK

[Files]
Source: {sys}\ISHACK.exe; DestDir: {sys}
Source: {sys}\ISHACK.exe; DestDir: {syswow64}; Flags: noregerror
Source: {pf}\Elektro H@cker Software\ISHACK\ISHACK.ico; DestDir: {pf}\Elektro H@cker Software\ISHACK
Source: {userstartmenu}\CommandLine\ISHACK.bat; DestDir: {userstartmenu}\CommandLine

[Registry]
Root: HKCR; Subkey: SystemFileAssociations\.BMP\shell\SubiraImagesHack; ValueType: String; ValueData: Subir a ImagesHack; tasks: BMP; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.BMP\shell\SubiraImagesHack; ValueName: icon; ValueType: String; ValueData: {app}\ISHACK.ico; tasks: BMP; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.BMP\shell\SubiraImagesHack; ValueName: position; ValueType: String; ValueData: top; tasks: BMP; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.BMP\shell\SubiraImagesHack\command; ValueType: String; ValueData: "CMD /Q /k ""Title ISHACK: ""%1"" & Mode con cols=80 lines=6 & Echo+ & Echo: ""%1"" | MORE & (For /f ""tokens=* skip=15"" %%a in ('ISHACK.exe -d ""%1""') do (Echo %%a & title ""%1"")) & (Pause>NUL)"""; tasks: BMP; flags: uninsdeletekey

Root: HKCR; Subkey: SystemFileAssociations\.GIF\shell\SubiraImagesHack; ValueType: String; ValueData: Subir a ImagesHack; tasks: GIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.GIF\shell\SubiraImagesHack; ValueName: icon; ValueType: String; ValueData: {app}\ISHACK.ico; tasks: GIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.GIF\shell\SubiraImagesHack; ValueName: position; ValueType: String; ValueData: top; tasks: GIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.GIF\shell\SubiraImagesHack\command; ValueType: String; ValueData: "CMD /Q /k ""Title ISHACK: ""%1"" & Mode con cols=80 lines=6 & Echo+ & Echo: ""%1"" | MORE & (For /f ""tokens=* skip=15"" %%a in ('ISHACK.exe -d ""%1""') do (Echo %%a & title ""%1"")) & (Pause>NUL)"""; tasks: GIF; flags: uninsdeletekey

Root: HKCR; Subkey: SystemFileAssociations\.JPEG\shell\SubiraImagesHack; ValueType: String; ValueData: Subir a ImagesHack; tasks: JPG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.JPEG\shell\SubiraImagesHack; ValueName: icon; ValueType: String; ValueData: {app}\ISHACK.ico; tasks: JPG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.JPEG\shell\SubiraImagesHack; ValueName: position; ValueType: String; ValueData: top; tasks: JPG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.JPEG\shell\SubiraImagesHack\command; ValueType: String; ValueData: "CMD /Q /k ""Title ISHACK: ""%1"" & Mode con cols=80 lines=6 & Echo+ & Echo: ""%1"" | MORE & (For /f ""tokens=* skip=15"" %%a in ('ISHACK.exe -d ""%1""') do (Echo %%a & title ""%1"")) & (Pause>NUL)"""; tasks: JPG; flags: uninsdeletekey

Root: HKCR; Subkey: SystemFileAssociations\.JPG\shell\SubiraImagesHack; ValueType: String; ValueData: Subir a ImagesHack; tasks: JPG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.JPG\shell\SubiraImagesHack; ValueName: icon; ValueType: String; ValueData: {app}\ISHACK.ico; tasks: JPG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.JPG\shell\SubiraImagesHack; ValueName: position; ValueType: String; ValueData: top; tasks: JPG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.JPG\shell\SubiraImagesHack\command; ValueType: String; ValueData: "CMD /Q /k ""Title ISHACK: ""%1"" & Mode con cols=80 lines=6 & Echo+ & Echo: ""%1"" | MORE & (For /f ""tokens=* skip=15"" %%a in ('ISHACK.exe -d ""%1""') do (Echo %%a & title ""%1"")) & (Pause>NUL)"""; tasks: JPG; flags: uninsdeletekey

Root: HKCR; Subkey: SystemFileAssociations\.PNG\shell\SubiraImagesHack; ValueType: String; ValueData: Subir a ImagesHack; tasks: PNG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.PNG\shell\SubiraImagesHack; ValueName: icon; ValueType: String; ValueData: {app}\ISHACK.ico; tasks: PNG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.PNG\shell\SubiraImagesHack; ValueName: position; ValueType: String; ValueData: top; tasks: PNG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.PNG\shell\SubiraImagesHack\command; ValueType: String; ValueData: "CMD /Q /k ""Title ISHACK: ""%1"" & Mode con cols=80 lines=6 & Echo+ & Echo: ""%1"" | MORE & (For /f ""tokens=* skip=15"" %%a in ('ISHACK.exe -d ""%1""') do (Echo %%a & title ""%1"")) & (Pause>NUL)"""; tasks: PNG; flags: uninsdeletekey

Root: HKCR; Subkey: SystemFileAssociations\.TIF\shell\SubiraImagesHack; ValueType: String; ValueData: Subir a ImagesHack; tasks: TIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.TIF\shell\SubiraImagesHack; ValueName: icon; ValueType: String; ValueData: {app}\ISHACK.ico; tasks: TIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.TIF\shell\SubiraImagesHack; ValueName: position; ValueType: String; ValueData: top; tasks: TIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.TIF\shell\SubiraImagesHack\command; ValueType: String; ValueData: "CMD /Q /k ""Title ISHACK: ""%1"" & Mode con cols=80 lines=6 & Echo+ & Echo: ""%1"" | MORE & (For /f ""tokens=* skip=15"" %%a in ('ISHACK.exe -d ""%1""') do (Echo %%a & title ""%1"")) & (Pause>NUL)"""; tasks: TIF; flags: uninsdeletekey

Root: HKCR; Subkey: SystemFileAssociations\.TIFF\shell\SubiraImagesHack; ValueType: String; ValueData: Subir a ImagesHack; tasks: TIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.TIFF\shell\SubiraImagesHack; ValueName: icon; ValueType: String; ValueData: {app}\ISHACK.ico; tasks: TIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.TIFF\shell\SubiraImagesHack; ValueName: position; ValueType: String; ValueData: top; tasks: TIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.TIFF\shell\SubiraImagesHack\command; ValueType: String; ValueData: "CMD /Q /k ""Title ISHACK: ""%1"" & Mode con cols=80 lines=6 & Echo+ & Echo: ""%1"" | MORE & (For /f ""tokens=* skip=15"" %%a in ('ISHACK.exe -d ""%1""') do (Echo %%a & title ""%1"")) & (Pause>NUL)"""; tasks: TIF; flags: uninsdeletekey

[Run]
Filename: {userstartmenu}\CommandLine\ISHACK.bat; Description: Ejecutar ISHACK; Flags: nowait postinstall skipifsilent shellexec unchecked
Filename: ISHACK.exe; Parameters: -c; Description: Configurar ISHACK; Flags: nowait postinstall skipifsilent shellexec

[Tasks]
Name: BMP; Description: .BMP; Groupdescription: "Opción en el menú contextual: ""Subir a ImagesHack"""
Name: GIF; Description: .GIF; Groupdescription: "Opción en el menú contextual: ""Subir a ImagesHack"""
Name: JPG; Description: .JPEG/JPG; Groupdescription: "Opción en el menú contextual: ""Subir a ImagesHack"""
Name: PNG; Description: .PNG; Groupdescription: "Opción en el menú contextual: ""Subir a ImagesHack"""
Name: TIF; Description: .TIF/TIFF; Groupdescription: "Opción en el menú contextual: ""Subir a ImagesHack"""


¿Se podria poner en el instalador la opcion de borrar el archivo de configuracion y ocultar un poco el nombre y el usuario, usando un cifrado seguro con un poco de salt?
Las dos peticiones me parecen innecesarias, ni que fuese un programa de seguridad, o algo xD

Pero he tomado bastante en cuenta tu segunda petición. Eso sí, no me he esmerado mucho con la cifrado, este tipo de programa no necesita más...

PD: En el post principal tienes la nueva versión, y nuevo instalador.
PD2: Gracias por las sugerencias

Saludos
« Última modificación: 19 Octubre 2012, 16:51 pm por EleKtro H@cker » En línea

0x5d

Desconectado Desconectado

Mensajes: 241



Ver Perfil WWW
Re: [RUBY] [WIN] IShack v1.3 (ImagesHack Uploader) ...(19/10/2012)
« Respuesta #4 en: 20 Octubre 2012, 18:22 pm »

Sensual código ! n_n
En línea

Eleкtro
Ex-Staff
*
Conectado Conectado

Mensajes: 9.819



Ver Perfil
Re: [RUBY] [WIN] IShack v1.3 (ImagesHack Uploader) ...(19/10/2012)
« Respuesta #5 en: 24 Octubre 2012, 11:20 am »

Sensual código ! n_n

No te burles del mod!  :xD



NUEVA VERSIÓN 1.4 DISPONIBLE PARA DESCARGAR

PD: En el comentario principal
En línea

Garcad

Desconectado Desconectado

Mensajes: 137


Ver Perfil
Re: [RUBY] [WINDOWS] IShack v1.4 (ImagesHack Uploader) ...(24/10/2012)
« Respuesta #6 en: 27 Octubre 2012, 00:33 am »

Gracias, magnifico trabajo.

Salu2
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[APORTE] [RUBY] Shack (Imageshack Uploader)
Scripting
Eleкtro 0 1,682 Último mensaje 19 Marzo 2012, 15:18 pm
por Eleкtro
[APORTE] [BATCH] Shack (Imageshack Uploader)
Scripting
Eleкtro 5 3,974 Último mensaje 18 Octubre 2012, 04:34 am
por Eleкtro
[RUBY] [WINDOWS] Pastebin Uploader
Scripting
Eleкtro 0 2,250 Último mensaje 10 Diciembre 2012, 21:02 pm
por Eleкtro
[Perl] Imageshack Uploader 0.1
Scripting
BigBear 0 1,569 Último mensaje 14 Mayo 2013, 20:11 pm
por BigBear
[Delphi] ImageShack Uploader 0.1
Programación General
BigBear 2 1,838 Último mensaje 12 Octubre 2013, 01:43 am
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines