view bin/rng @ 6882:3a1f3dc57df4

<shachaf> ` >bin/cmd echo -e \'#!/bin/bash\\ncut -d "" -f 3 < /proc/$1/cmdline\'; chmod +x /tmp/hmm
author HackBot
date Tue, 16 Feb 2016 02:04:07 +0000
parents c096bb536bb2
children
line wrap: on
line source

#!/usr/bin/env lua

math.randomseed(os.time())
W={}
for i,a in ipairs(arg) do
   for w in a:gmatch("[^%s]+") do
      table.insert(W, w)
   end
end
if #W>0 then
   print(W[math.random(#W)])
end