DEV Community

Discussion on: Write a simple but impactful script

Collapse
 
philippeback profile image
Philippe Back • Edited

Pharo

(file :='leaked_pins.txt' asFileReference) writeStreamDo: [ :s |
(0 to: 9999) shuffled do: [ :n | s << (n printPaddedWith: $0 to: 4); cr ]].

SMTPClient 
deliverMailFrom: 'donotreply@somewhere.com' 
to: { 'poorcolleague@target.org' }
text: ('All the PIN numbers have been leaked, and you should be cautious and check, whether your PIN is contained in the file. ', file contents)
usingServer: 'somereplay.world.net'