Scripts

Version 4 (Laurent Defert, 05/10/2010 10:47 am)

1 2 Laurent Defert
To get the source:
2 2 Laurent Defert
<pre>
3 2 Laurent Defert
git clone git://piggledy.org/scripts
4 2 Laurent Defert
</pre>
5 2 Laurent Defert
6 1
h1. Vsc2pal.py
7 1
8 3 Laurent Defert
VCalendar (http://en.wikipedia.org/wiki/VCalendar) to pal calendar (http://palcal.sourceforge.net/) file converter.
9 2 Laurent Defert
10 2 Laurent Defert
How to use it:
11 2 Laurent Defert
<pre>
12 2 Laurent Defert
$ vcs2pal.py <vcs file> <pal file>
13 2 Laurent Defert
</pre>
14 2 Laurent Defert
15 2 Laurent Defert
h1. Censor.py
16 2 Laurent Defert
17 2 Laurent Defert
Most services that ask for a username and a password will record the login in log files. This way, when a user type his password in the login field, it gets recorded in cleartext in the logfile, creating a big security threat to the system.
18 2 Laurent Defert
This script finds cleartext password (by trying them against the /etc/shadow file) in logfiles and erase them.
19 2 Laurent Defert
20 2 Laurent Defert
<pre>
21 2 Laurent Defert
Usage: censor [-hdsrbwn] <file>
22 2 Laurent Defert
Options:
23 2 Laurent Defert
  -h		Show this help
24 2 Laurent Defert
  -d		Display found passwords
25 2 Laurent Defert
  -s		Perform silently (overrides -d)
26 2 Laurent Defert
  -r		Replace found passwords in the file by junk
27 2 Laurent Defert
  -b		Search password byte by byte (really slow)
28 2 Laurent Defert
  -w		Search password word by word (slow)
29 2 Laurent Defert
  -n		Search password word by word considering passwords don't contain spaces(usable/default)
30 2 Laurent Defert
</pre>
31 2 Laurent Defert
32 2 Laurent Defert
It is advised to use it from logfiles rotations scripts.
33 4 Laurent Defert
34 4 Laurent Defert
h1. Cp.py
35 4 Laurent Defert
36 4 Laurent Defert
Enhanced cp command:
37 4 Laurent Defert
38 4 Laurent Defert
 * Displays a progress bar.
39 4 Laurent Defert
 * Allow speed limitation (through the -k flag).
40 4 Laurent Defert
 * Allow resuming a copy (through the -c flag).