![]() |
2014-05-27
, 21:02
|
|
Posts: 132 |
Thanked: 225 times |
Joined on Dec 2013
|
#2
|
echo <your-devel-su-password> | devel-su -c "<command-here>"
echo rootme | devel-su -c "apt-get update"
![]() |
2014-05-27
, 21:09
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#3
|
Actually, you can use this command:
Code:echo <your-devel-su-password> | devel-su -c "<command-here>"
The Following User Says Thank You to peterleinchen For This Useful Post: | ||
![]() |
2014-05-27
, 22:02
|
|
Posts: 6,453 |
Thanked: 20,983 times |
Joined on Sep 2012
@ UK
|
#4
|
#include <stdio.h> void decode_password (const char *src, char *dst) { // Does not need to be terribly complex or safe: // the main goal is to hide the decoded password // from plain sight and that is achieved } int main (void) { static const char encoded[] = "!£$%^&*()_+@"; char decoded[256]; char buffer[512]; decode_password(encoded, decoded); sprintf(buffer, "echo \"%s\" | devel-su -c foo", decoded); return system(buffer); }
The Following User Says Thank You to pichlo For This Useful Post: | ||
![]() |
2014-05-28
, 00:04
|
|
Posts: 878 |
Thanked: 2,535 times |
Joined on Feb 2012
@ Germany
|
#5
|
The Following 2 Users Say Thank You to Halftux For This Useful Post: | ||
another little request from my side.
Could any kind soul try to compile SHC (a converter from shell script to C program) for Harmattan and also Fremantle.
Main purpose I want this to have is to have some shell scripts calling devel-su (hereby containing my root password as plain text). I found no other possibility to hide the text of a sh script to a user (which should have the right to execute).
Here are the sources.
TIA
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!
Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257
editsignature, http://talk.maemo.org/profile.php?do=editsignature