
Ich versuche, mit dem folgenden Echo-Befehl einige Konfigurationen auf einen Unix-Endpunkt zu kopieren. Nach dem Kopieren sehe ich, dass einige Zeichen fehlen oder manchmal Präfixe vorhanden sind. Beispiel unten.
brauche hier Ihren Vorschlag.
set system login user b48368 authentication encrypted-password '$1$trz5zI9f$2jL1PHnXNxY/'
set system login user b48368 authentication plaintext-password ''
set system login user bb0k93 authentication encrypted-password '$1$/y8uENjM$C7WQQZDQRbRJOeh/'
set system login user bb0k93 authentication plaintext-password ''
set system login user bb0k93 level 'admin'
set system login user bb0r4w authentication encrypted-password '$1$2.i88iIa$ZkREPOKUNjaJflNJ4/'
set system login user bb0r4w authentication plaintext-password ''
set system login user 430140 authentication encrypted-password '$1$qs.a5lXh$zjsssrtmCjsaSIfAv1'
set system login user 430140 authentication plaintext-password ''
set system login user 430140 level 'admin'
set system login user pa3n authentication encrypted-password '$1$yffNZqPG$EpMR/2RxniVYq0'
set system login user pat3n authentication plaintext-password ''
set system login user pa4n authentication encrypted-password '$1$NKWjQnX8$ZExZcYAm7ECEyI2/'
set system login user pa4n authentication plaintext-password ''
set system login user pa5n authentication encrypted-password '$1$8Km21dzm$q2NlHcRlZX1Oc6M0'
set system login user pa5n authentication plaintext-password ''
set system login user pa6n authentication encrypted-password '$1$qjkBDXXU$vJn4o6gF7aK/i/'
set system login user patn authentication plaintext-password ''
set system login user root authentication encrypted-password '$1$T1PHVDEj$UXtfPX/yuGtm0'
set system login user root authentication plaintext-password ''
Kopierte Ausgabe, einige Zeichen fehlen
set system login user a48368 authentication encrypted-password 'jL1hU238TJXNxY/'
set system login user a48368 authentication plaintext-password ''
set system login user ab0k93 authentication encrypted-password '$/y8uENjM/'
set system login user ab0k93 authentication plaintext-password ''
set system login user ab0k93 level 'admin'
set system login user ab0r4w authentication encrypted-password '.i88iIa/'
set system login user ab0r4w authentication plaintext-password ''
set system login user 430140 authentication encrypted-password '.a5lXh'
set system login user 430140 authentication plaintext-password ''
set system login user 430140 level 'admin'
set system login user pt3n authentication encrypted-password '/2RxnpQU7CiVYq0'
set system login user pa3n authentication plaintext-password ''
set system login user pa4n authentication encrypted-password '/'
set system login user pa4n authentication plaintext-password ''
set system login user pa5n authentication encrypted-password 'Km21dzm'
set system login user pa5n authentication plaintext-password ''
set system login user pa6n authentication encrypted-password '/oAi/'
set system login user pa6n authentication plaintext-password ''
set system login user root authentication encrypted-password '/yuGtuKm0'
Antwort1
Wenn Sie den Echo-Befehl verwendet haben, haben Sie ihn höchstwahrscheinlich in Anführungszeichen gesetzt. Dies ermöglicht eine gewisse Interpretation des Textes - insbesondere wird $XXX als die Variable XXX erkannt und Verweise darauf werden durch den Inhalt dieser Variable ersetzt (normalerweise nichts).
Um dies zu umgehen, müssen Sie die Daten anders eingeben oder die Zeichenfolgen ordnungsgemäß maskieren. In Ihrem Fall können Sie dies höchstwahrscheinlich tun, indem Sie dem Symbol „$“ ein „\“ voranstellen, um sicherzustellen, dass es wörtlich interpretiert wird.
Sie haben nicht angegeben, wie Sie dies verwenden (z. B. die Quelle), aber eine andere Möglichkeit, damit umzugehen, könnte die Verwendung von „Hier Dokumente", wodurch Sie Eingaben aus einer Quelldatei als Rohtext behandeln und umleiten können