Sep 18, 2025 - 12:35 PMDeutsch | English
Hello unlogged user [ Register | Log in ]

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
stalin2000
Post subject: Script mit kdialog hat einen fehler...  PostPosted: Dec 26, 2008 - 05:49 PM



Joined: Jan 04, 2007
Posts: 1604
Location: 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"


Quote:

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


Last edited by stalin2000 on Dec 28, 2008 - 04:39 PM; edited 1 time in total
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
retabell
Post subject:   PostPosted: Dec 29, 2008 - 04:47 PM



Joined: Sep 04, 2006
Posts: 280

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.

Code:
--- 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
 
 View user's profile Send private message  
Reply with quote Back to top
stalin2000
Post subject:   PostPosted: Dec 29, 2008 - 06:55 PM



Joined: Jan 04, 2007
Posts: 1604
Location: 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?
Quote:

--- 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...):

Quote:

#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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Kano
Post subject:   PostPosted: Dec 29, 2008 - 07:41 PM



Joined: Dec 17, 2003
Posts: 16809

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.
 
 View user's profile Send private message  
Reply with quote Back to top
stalin2000
Post subject:   PostPosted: Dec 30, 2008 - 02:37 PM



Joined: Jan 04, 2007
Posts: 1604
Location: 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 ?

Quote:
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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
stalin2000
Post subject:   PostPosted: Aug 03, 2009 - 02:05 PM



Joined: Jan 04, 2007
Posts: 1604
Location: Hamburg
also so funktioniert's zumindest:

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



Quote:
#/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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.