Für diejenigen, die Humor mögen, sudo
kann konfiguriert werden, um eine zufällige mehr oder weniger beleidigende oder lustige Phrase statt der neutralen zu drucken Sorry, try again.
indem Sie die folgende Zeile hinzufügen /etc/sudoers
(mit dem Befehl sudo visudo
, nicht manuell bearbeiten!):
Defaults insults
Hier sind einige Beispiele:
[sudo] password for bytecommander:
The more you drive -- the dumber you get.
[sudo] password for bytecommander:
I've seen penguins that can type better than that.
[sudo] password for bytecommander:
This mission is too important for me to allow you to jeopardize it.
[sudo] password for bytecommander:
He has fallen in the water!
[sudo] password for bytecommander:
Hold it up to the light --- not a brain in sight!
Jetzt nur zum Spaß möchte ich sie alle lesen, aber falsche Passwörter den ganzen Tag eingeben ist nicht wirklich die beste Methode (Verzögerung nach jedem Versuch, nur 2 Nachrichten pro 3 Versuche, Abbruch nach 3 Versuchen, ...).
Also ... wo sind diese Beleidigungen tatsächlich gespeichert? Irgendeine einfache Textdatei, die ich direkt lesen kann? Oder hartcodierte Strings im Quellcode?
Wie kann ich eine Liste aller verfügbaren erhalten? sudo
beleidigen Nachrichten?
Sie sind in der Binärdatei
/usr/lib/sudo/sudoers.so
(gefunden von: find /usr/lib/sudo -type f | xargs grep "fallen in the water"
)
Wenn Sie Source-Downloads aktivieren und tun
apt source sudo
Sie finden die Belts-Dateien im Quellverzeichnis unter
plugins/sudoers
Die Dateien sind
ins_2001.h
ins_classic.h
ins_csops.h
ins_goons.h
insults.h
Beispiel dafür, wie diese Dateien aussehen:
#ifndef SUDOERS_INS_GOONS_H
#define SUDOERS_INS_GOONS_H
/*
* Insults from the "Goon Show."
*/
"You silly, twisted boy you.",
"He has fallen in the water!",
"We'll all be murdered in our beds!",
"You can't come in. Our tiger has got flu",
und so weiter ... sie sind gut lesbar.
Mit
dpkg -L sudo | xargs grep dumber
Wir können die Dateien aus dem Paket suchen sudo
enthält das Wort dumber
.
Die einzige Übereinstimmung ist in Datei /usr/lib/sudo/sudoers.so
. Dies ist eine Binärdatei, also verwenden wir die strings
Befehl, nur Dinge zu erhalten, die wie menschenlesbar aussehen. Wie es viel ist, leiten wir das Ergebnis in less
:
strings /usr/lib/sudo/sudoers.so | less
Im less
wir können benutzen
/dumber
wieder nach dem Wort "dümmer" suchen. Das bringt uns direkt in die Beleidigungen. Scrollen Sie mit den Cursortasten auf und ab und beenden Sie mit q
Liste aller Beleidigungen
Wenn wir uns all die Beleidigungen ansehen, entdecken wir einen interessanten Leckerbissen: Broccoli zu sagen ist politisch korrekt, aber Burrito nicht zu sagen. Alle Beleidigungen sind unten aufgeführt.
ins_2001.h
(2001 Space Odyssey beleidigt):
.
/*
* HAL insults (paraphrased) from 2001.
*/
"Just what do you think you're doing Dave?",
"It can only be attributed to human error.",
"That's something I cannot allow to happen.",
"My mind is going. I can feel it.",
"Sorry about this, I know it's a bit silly.",
"Take a stress pill and think things over.",
"This mission is too important for me to allow you to jeopardize it.",
"I feel much better now.",
ins_classic.h
(Original Sudo 8 Beleidigungen):
/*
* Insults from the original sudo(8).
*/
"Wrong! You cheating scum!",
#ifdef PC_INSULTS
"And you call yourself a Rocket Scientist!",
#else
"No soap, honkie-lips.",
#endif
"Where did you learn to type?",
"Are you on drugs?",
"My pet ferret can type better than you!",
"You type like i drive.",
"Do you think like you type?",
"Your mind just hasn't been the same since the electro-shock, has it?",
ins_csops.h
(CSOps beleidigt):
/*
* CSOps insults (may be site dependent).
*/
"Maybe if you used more than just two fingers...",
"BOB says: You seem to have forgotten your passwd, enter another!",
"stty: unknown mode: doofus",
"I can't hear you -- I'm using the scrambler.",
"The more you drive -- the dumber you get.",
#ifdef PC_INSULTS
"Listen, broccoli brains, I don't have time to listen to this trash.",
#else
"Listen, burrito brains, I don't have time to listen to this trash.",
#endif
"I've seen penguins that can type better than that.",
"Have you considered trying to match wits with a rutabaga?",
"You speak an infinite deal of nothing",
ins_goons.h
(Goon Show Beleidigungen):
.
/*
* Insults from the "Goon Show."
*/
"You silly, twisted boy you.",
"He has fallen in the water!",
"We'll all be murdered in our beds!",
"You can't come in. Our tiger has got flu",
"I don't wish to know that.",
"What, what, what, what, what, what, what, what, what, what?",
"You can't get the wood, you know.",
"You'll starve!",
"... and it used to be so popular...",
"Pauses for audience applause, not a sausage",
"Hold it up to the light --- not a brain in sight!",
"Have a gorilla...",
"There must be cure for it!",
"There's a lot of it about, you know.",
"You do that again and see what happens...",
"Ying Tong Iddle I Po",
"Harm can come to a young lad like that!",
"And with that remarks folks, the case of the Crown vs yourself was proven.",
"Speak English you fool --- there are no subtitles in this scene.",
"You gotta go owwwww!",
"I have been called worse.",
"It's only your word against mine.",
"I think ... err ... I think ... I think I'll go home",
Die Datei insults.h
enthält Compiler-Anweisungen, welche der oben genannten Beleidigungen in den kompilierten Kernel aufzunehmen sind. In der Tat könnten Sie Ihre eigene Beleidigungsdatei erstellen, den Namen zu insults.h hinzufügen und neu kompilieren, um Nachrichten wie "Was sind Sie ein ArchLinux-Benutzer?" oder "Dies ist kein Windows, wo Fehler alltäglich sind!" usw.
Beachten Sie die #ifdef PC_INSULTS
in einigen der Beleidigungsdateien. Das bedeutet nicht "wenn Sie einen PC haben" bedeutet es "wenn Sie politisch korrekt sein wollen".
Die obigen Antworten eignen sich hervorragend für die Offline-Suche. Aber wir sind online. So offen Debian-Codesuche und versuche eine der Beleidigungen Hier . Es sagt dir sofort, dass es drin ist sudo_1.8.12-1/plugins/sudoers/ins_csops.h
. Dies hat den Vorteil, es zu finden überall sei es eine Konfigurationsdatei für die Bereitstellung /etc
oder Wasauchimmer. Und da es sich um eine .h-Datei handelt, ist sichtbar, dass sie sich in der Quelle befindet und nicht etwas, das Sie ändern können.
Um die anderen Antworten hinzuzufügen, scheinen die Beleidigungen in den .rodata
Abschnitt von sudoers.so. Sie können verwenden objcopy
die Ausgabe etwas einzuschränken, obwohl es immer noch viele falsche Positive geben wird:
$ objcopy /usr/lib/sudo/sudoers.so /dev/null --dump-section .rodata=/dev/stdout | strings | head
/build/sudo-g3ghsu/sudo-1.8.16/plugins/sudoers/auth/sudo_auth.c
invalid authentication methods
Invalid authentication methods compiled into sudo! You may not mix standalone and non-standalone authentication.
There are no authentication methods compiled into sudo! If you want to turn off authentication, use the --disable-authentication configure option.
Unable to initialize authentication methods.
Just what do you think you're doing Dave?
It can only be attributed to human error.
That's something I cannot allow to happen.
My mind is going. I can feel it.
Sorry about this, I know it's a bit silly.
$