Publicar nuevo tema   Responder al tema
Ver tema anterior Versión imprimible Entre para ver sus mensajes privados Ver tema siguiente
Autor Mensaje
stalin2000
Asunto: Script mit kdialog hat einen fehler...  MensajePublicado: 26 Dic, 2008 - 05:49 PM



Registrado: 04 Ene, 2007
Mensajes: 1604
Ubicación: Hamburg
hallo, habe von kdelook.org folgendes Script heruntergeladen:

Steghide
http://www.kde-look.org/content/show.ph ... tent=45323

Also das einbinden von Dateien in eine jpg-datei klappt. Was leider nicht geht, ist das Entpacken via Menü. Wenn ich in die Konsole aber gehe und das Verzeichnis wähle und dort

steghide extract -sf "123.jpg"

Ich glabue, im Script ist folgender Text falsch, welcher genau das tun sollte wie

steghide extract -sf "123.jpg"


Cita:

else #for extracting file
current_path=$(echo ${1%/*}) #where is the file which should contain embedded file

pass=$(kdialog --password "Type password") then
steghide extract -sf "$1" -p "$pass"
fi
fi


Weiß jemand, wo der Fehler liegt?

Gruß Christopher

_________________
Es ist dem Untertanen untersagt, den Maßstab seiner beschränkten Einsicht an die Handlungen der Obrigkeit anzulegen - Kurfürst Friedrich Wilhelm von Brandenburg
www.projektidee.org | www.gesundheitstabelle.de | www.neoliberalyse.de


Ultima edición por stalin2000 el 28 Dic, 2008 - 04:39 PM, editado 1 vez
 
 Ver perfil de usuario Enviar mensaje privado Visitar sitio web del autor  
Responder citando Volver arriba
retabell
Asunto:   MensajePublicado: 29 Dic, 2008 - 04:47 PM



Registrado: 04 Sep, 2006
Mensajes: 287

moin
in dem Script sind verschiedene Dinge anzupassen.

hiermit funktioniert es so halbwegs

musst mal noch ein bischen anpassen

und Dateien mit Leerzeichen mag es auch nicht.

Código:
--- steghide_servicemenu.sh.org 2006-09-06 00:52:06.000000000 +0200
+++ steghide_servicemenu.sh     2008-12-29 17:30:51.000000000 +0100
@@ -8,7 +8,7 @@

                #comparing if passwords match
                pass=$(kdialog --password "Choose password")
-               pass2=$(kdialog --password "Retype password (for sure)")
+               pass2=$(kdialog --password "Retype password for sure ")
                if [ $pass = $pass2 ]; then
                        kdialog --yesno "Replace original file?"
                        if [ $? = 0 ]; then
@@ -28,16 +28,16 @@
        fi

 else #for extracting file
-       current_path=$(echo ${1%/*}) #where is the file which should contain embedded file
-
+       #current_path=$(echo ${1%/*}) #where is the file which should contain embedded file
+       current_path=$(pwd)
        pass=$(kdialog --password "Type password")

        #testing if the file realy contain another file and if so, getting its name
-       name=$(steghide info $1 -p "$pass" | grep "embedded file" | awk '{print $3}')
+       name=$(steghide info $1 -p "$pass" | grep "Eingebettete Datei" | awk '{print $3}' )
        name=$(echo ${name%'":'})
        name=$(echo ${name#'"'})
-
-       if [ ${#name} == 0 ]; then
+       echo "name ist $name"
+       if [ ${name} == '' ]; then
                kdialog --sorry "This file doesn't contain any embedded file or the password is wrong."
        else
                if [[ -f "$current_path/$name" ]]; then #if the name of the embedded file is allready used in this directory, user have to choose another name for saving this file


gruss retabell
 
 Ver perfil de usuario Enviar mensaje privado  
Responder citando Volver arriba
stalin2000
Asunto:   MensajePublicado: 29 Dic, 2008 - 06:55 PM



Registrado: 04 Ene, 2007
Mensajes: 1604
Ubicación: Hamburg
Hey.... Danke!

Was genau muß ich denn da anpassen? und was haben diese Dinger zu bedeuten und was bedeuten die ganzen plus und minus Zeichen?
Cita:

--- steghide_servicemenu.sh.org 2006-09-06 00:52:06.000000000 +0200
+++ steghide_servicemenu.sh 2008-12-29 17:30:51.000000000 +0100
@@ -8,7 +8,7 @@


ich hatte jetzt einfach mal das hier eingefügt und es ging noch nicht (die Paßworteingabe kam bevor man die zu versteckende Datei auswählen konnte... außerdem funktionierte der obere Teil des Scripts, der zum Einbetten in die Jpg Datei ja schon. Das Problem bestand ja ausschließlich beim wieder Auspacken der Datei...):

Cita:

#comparing if passwords match
pass=$(kdialog --password "Choose password")
- pass2=$(kdialog --password "Retype password (for sure)")
+ pass2=$(kdialog --password "Retype password for sure ")
if [ $pass = $pass2 ]; then
kdialog --yesno "Replace original file?"
if [ $? = 0 ]; then
fi

else #for extracting file
- current_path=$(echo ${1%/*}) #where is the file which should contain embedded file
-
+ #current_path=$(echo ${1%/*}) #where is the file which should contain embedded file
+ current_path=$(pwd)
pass=$(kdialog --password "Type password")

#testing if the file realy contain another file and if so, getting its name
- name=$(steghide info $1 -p "$pass" | grep "embedded file" | awk '{print $3}')
+ name=$(steghide info $1 -p "$pass" | grep "Eingebettete Datei" | awk '{print $3}' )
name=$(echo ${name%'":'})
name=$(echo ${name#'"'})
-
- if [ ${#name} == 0 ]; then
+ echo "name ist $name"
+ if [ ${name} == '' ]; then
kdialog --sorry "This file doesn't contain any embedded file or the password is wrong."
else
if [[ -f "$current_path/$name" ]]; then #if the name of the embedded file is allready used in this directory, user have to choose another name for saving this file

_________________
Es ist dem Untertanen untersagt, den Maßstab seiner beschränkten Einsicht an die Handlungen der Obrigkeit anzulegen - Kurfürst Friedrich Wilhelm von Brandenburg
www.projektidee.org | www.gesundheitstabelle.de | www.neoliberalyse.de
 
 Ver perfil de usuario Enviar mensaje privado Visitar sitio web del autor  
Responder citando Volver arriba
Kano
Asunto:   MensajePublicado: 29 Dic, 2008 - 07:41 PM



Registrado: 17 Dic, 2003
Mensajes: 16816

Das ist doch schwachsinn was ihr da ändert, seit wann parst man denn deutsche ausgaben von nem programm? Wenn dann macht man nen lang override wie

LANG= LC_ALL= programm

davor.
 
 Ver perfil de usuario Enviar mensaje privado  
Responder citando Volver arriba
stalin2000
Asunto:   MensajePublicado: 30 Dic, 2008 - 02:37 PM



Registrado: 04 Ene, 2007
Mensajes: 1604
Ubicación: Hamburg
Hallo Kano,

also ich hab keine Ahnung vom "scripten"... ich versuch das nur so anzupassen, daß es läuft....

weißt Du eventuell, wo in diesem Teil der Fehler liegen könnte ?

Cita:
else #for extracting file
current_path=$(echo ${1%/*}) #where is the file which should contain embedded file

pass=$(kdialog --password "Type password") then
steghide extract -sf "$1" -p "$pass"
fi
fi

_________________
Es ist dem Untertanen untersagt, den Maßstab seiner beschränkten Einsicht an die Handlungen der Obrigkeit anzulegen - Kurfürst Friedrich Wilhelm von Brandenburg
www.projektidee.org | www.gesundheitstabelle.de | www.neoliberalyse.de
 
 Ver perfil de usuario Enviar mensaje privado Visitar sitio web del autor  
Responder citando Volver arriba
stalin2000
Asunto:   MensajePublicado: 03 Ago, 2009 - 02:05 PM



Registrado: 04 Ene, 2007
Mensajes: 1604
Ubicación: Hamburg
also so funktioniert's zumindest:

/home/[user]/bin/steghide_servicemenu.sh



Cita:
#/bin/sh

if [ $2 = e ]; then #for embedding file

file_to_hide=$(kdialog --getopenfilename .) #choose which file to embed

if [ $? = 0 ]; then #if user does't press cancel

#comparing if passwords match
pass=$(kdialog --password "Choose password")
pass2=$(kdialog --password "Retype password for sure ")
if [ $pass = $pass2 ]; then
kdialog --yesno "Replace original file?"
if [ $? = 0 ]; then
steghide embed -cf "$1" -ef "$file_to_hide" -p "$pass"
else
file_to_save=$(kdialog --getsavefilename .)
if [ $? = 0 ]; then
wrong=$(steghide embed -cf "$1" -ef "$file_to_hide" -p "$pass" -sf "$file_to_save")
if [ $wrong = 1 ]; then
kdialog --error "Steghide ended with error"
fi
fi
fi
else
kdialog --sorry "Passwords don't match. Ending script."
fi
fi

else #for extracting file
#current_path=$(echo ${1%/*}) #where is the file which should contain embedded file
current_path=$(pwd)
pass=$(kdialog --password "Type password")

#testing if the file realy contain another file and if so, getting its name
name=$(steghide info $1 -p "$pass" | grep "Eingebettete Datei" | awk '{print $3}' )
name=$(echo ${name%'":'})
name=$(echo ${name#'"'})
echo "name ist $name"
if [ ${name} == '' ]; then
kdialog --sorry "This file doesn't contain any embedded file or the password is wrong."
else
if [[ -f "$current_path/$name" ]]; then #if the name of the embedded file is allready used in this directory, user have to choose another name for saving this file
kdialog --sorry "The embedded file would be saved as $current_path/$name but this file allready exists. Choose another place."
file_to_save=$(kdialog --getsavefilename .)
if [ $? = 0 ]; then
wrong=$(steghide extract -sf "$1" -xf "$file_to_save" -p "$pass")
if [ $wrong = 1 ]; then
kdialog --error "Steghide ended with error"
fi
fi
else #if the name is possible to use, script just inform the user where the file was saved
wrong=$(steghide extract -sf "$1" -p "$pass")
if [ $wrong = 1 ]; then
kdialog --error "Steghide ended with error"
else
kdialog --msgbox "The embedded file was saved as $current_path/$name."
fi
fi
fi
fi

_________________
Es ist dem Untertanen untersagt, den Maßstab seiner beschränkten Einsicht an die Handlungen der Obrigkeit anzulegen - Kurfürst Friedrich Wilhelm von Brandenburg
www.projektidee.org | www.gesundheitstabelle.de | www.neoliberalyse.de
 
 Ver perfil de usuario Enviar mensaje privado Visitar sitio web del autor  
Responder citando Volver arriba
Mostrar mensajes anteriores:     
Cambiar a:  
Todas las horas son GMT + 1 Hora
Publicar nuevo tema   Responder al tema
Ver tema anterior Versión imprimible Entre para ver sus mensajes privados Ver tema siguiente
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Créditos