On Sun, Mar 6, 2022 at 5:44 PM Marios Zindilis <mar...@zindilis.com> wrote:

> Αντώνη,
>
> Κατ' αρχήν το script έχει ένα εμφανές πρόβλημα, ότι τυπώνει πέντε φορές τον
> ίδιο κωδικό, το οποίο δεν μοιάζει να γίνεται από πρόθεση.
>
> "Θεωρητικά" το sleep 1, φροντίζει να μην συμβαίνει αυτό.


> Δεύτερον, και σημαντικότερο, αυτοί δεν είναι ισχυροί κωδικοί, γιατί είναι
> checksum μιας προβλέψιμης παραμέτρου, της ημερομηνίας. Το εύρος των πιθανών
> κωδικών είναι πάρα πολύ μικρό, και είναι απλούστατο το brute forcing ενός
> λογαριασμού. Αν όντως παράγεις κωδικούς στο τερματικό, θα πρότεινα να
> χρησιμοποιήσεις κάποιο εργαλείο το οποίο γράφτηκε γι' αυτό το σκοπό, παρά
> να γράψεις το δικό σου. Το άρθρο "7 Methods to Generate a Strong Password
> in Ubuntu" [1] έχει μερικές μεθόδους, και υπάρχουν και άλλες στο διαδίκτυο.
>
> [1]: https://vitux.com/7-methods-to-generate-a-strong-password-in-ubuntu/
>

Full +1 για openssl ή gpg. Επίσης μια βόλτα απο εδώ
https://en.wikipedia.org/wiki//dev/random ελπίζω να μην ανοίξει τους ασκούς
του Αιόλου.

--
> Μάριος
>
> On Sun, Mar 6, 2022 at 3:30 PM Αντώνης Αντωνούλας <aanto...@otenet.gr>
> wrote:
>
> > Σωστά Στέφανε, έχεις δίκαιο!
> >
> > Στις 6/3/22 16:29, ο/η Stefanos I. Tsaklidis έγραψε:
> > > Λογικά τυπώνεται μόνο ο τελευταίος?
> > > Πρέπει να γίνει append στο password_file.txt
> > >
> > > Για δες με >> αντί για >
> > >
> > > #!/usr/bin/env sh
> > > for apotelesma in `seq 1 5`
> > > do
> > >   echo $(date | sha512sum | head -c 20) >> $1
> > >   sleep 1
> > > done
> > >
> > >
> > > On 6/3/22 15:52, Αντώνης Αντωνούλας wrote:
> > >> Το δοκίμασα αλλά στο password_file.txt τυπώνεται μόνο ένας κωδικός.
> > >>
> > >> Στις 6/3/22 15:31, ο/η Christos Choutouridis έγραψε:
> > >>> Μπορείς να κάνεις redirect την έξοδο σε κάποιο αρχείο, το οποίο
> > >>> μπορείς και να περνάς στο script ως όρισμα. Απλά χρειάζεται μια
> > >>> μικρή αλλαγή όλο κι όλο.
> > >>>
> > >>> #!/usr/bin/env sh
> > >>> for apotelesma in `seq 1 5`
> > >>> do
> > >>>   echo $(date | sha512sum | head -c 20) > $1
> > >>>   sleep 1
> > >>> done
> > >>>
> > >>> Τώρα αν για παράδειγμα το script λέγεται myscript μπορείς να το
> > >>> καλέσεις ώς εξής:./myscript password_file.txt
> > >>>
> > >>> και νά πάρεις στο password_file.txt τους κωδικούς
> > >>>
> > >>>
> > >>> On Sun, Mar 6, 2022 at 3:23 PM Αντώνης Αντωνούλας
> > >>> <aanto...@otenet.gr> wrote:
> > >>>
> > >>>     Έχω ένα shell script για την παραγωγή ισχυρών κωδικών. Ο κώδικάς
> > >>> του
> > >>>     είναι διαμορφωμένος ως εξής:
> > >>>
> > >>>     #!/usr/bin/env sh
> > >>>     for apotelesma in `seq 1 5`
> > >>>     do
> > >>>     date | sha512sum | head -c 20
> > >>>     echo ""
> > >>>     sleep 1
> > >>>     done
> > >>>
> > >>>     Υπάρχει τρόπος να διαμορφωθεί έτσι ώστε οι παραγόμενοι κωδικοί να
> > >>>     εμφανίζονται σε ένα αρχείο text μόλις εκτελεστεί το script; Ακόμη
> > >>>     υπάρχει τρόπος ώστε οι δημιουργούμενοι κωδικοί να εμπεριέχουν και
> > >>>     ελληνικούς, εκτός από λατινικούς χαρακτήρες;
> > >>>
> > >>>     Σας ευχαριστώ όλους για την οποιαδήποτε απάντηση!
> > >>>
> > >>>
> > >>>     --     Ubuntu-gr mailing list
> > >>> Ubuntu-gr@lists.ubuntu.com
> > >>>
> > >>>     If you do not want to receive any more messages from the
> ubuntu-gr
> > >>>     mailing list, please follow this link and choose unsubscribe:
> > >>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr
> > >>>
> > >> -------------- next part --------------
> > >> An HTML attachment was scrubbed...
> > >> URL:
> > >> <
> >
> https://lists.ubuntu.com/archives/ubuntu-gr/attachments/20220306/f3b4a3d1/attachment.html
> > >
> > >
> >
> > --
> > Ubuntu-gr mailing list
> > Ubuntu-gr@lists.ubuntu.com
> >
> > If you do not want to receive any more messages from the ubuntu-gr
> mailing
> > list, please follow this link and choose unsubscribe:
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr
> >
>
>
> --
> Marios Zindilis
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://lists.ubuntu.com/archives/ubuntu-gr/attachments/20220306/47c0d61c/attachment.html
> >
> --
> Ubuntu-gr mailing list
> Ubuntu-gr@lists.ubuntu.com
>
> If you do not want to receive any more messages from the ubuntu-gr mailing
> list, please follow this link and choose unsubscribe:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://lists.ubuntu.com/archives/ubuntu-gr/attachments/20220306/2c2c5600/attachment.html>
-- 
Ubuntu-gr mailing list
Ubuntu-gr@lists.ubuntu.com

If you do not want to receive any more messages from the ubuntu-gr mailing 
list, please follow this link and choose unsubscribe:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr

Απαντηση