My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# ----------------------------------------------------------------------------
# http://... - vários
# Busca as últimas notícias em sites especializados em segurança.
# Obs.: Cada site tem uma letra identificadora que pode ser passada como
# parâmetro, para informar quais sites você quer pesquisar:
#
# Linux Security B)rasil Linux T)oday - Security
# Linux S)ecurity Security F)ocus
# C)ERT/CC
#
# Uso: zznoticiassec [sites]
# Ex.: zznoticiassec
# zznoticiassec bcf
#
# Autor: Thobias Salazar Trevisan, www.thobias.org
# Desde: 2003-07-13
# Licença: GPL
# ----------------------------------------------------------------------------
zznoticiassec ()
{
zzzz -h noticiassec "$1" && return

local url limite
local n=5
local sites='bsctf'

limite="sed ${n}q"

[ "$1" ] && sites="$1"

# LinuxSecurity Brasil
if zztool grep_var b "$sites"
then
url='http://www.linuxsecurity.com.br/share.php'
echo
zztool eco "* LinuxSecurity Brasil ($url):"
$ZZWWWHTML "$url" |
sed -n '/item/,$ s@.*<title>\(.*\)</title>@\1@p' |
zztool texto_em_iso |
$limite
fi

# Linux Security
if zztool grep_var s "$sites"
then
url='http://www.linuxsecurity.com/linuxsecurity_advisories.rdf'
echo
zztool eco "* Linux Security ($url):"
$ZZWWWHTML "$url" |
sed -n '/item/,$ s@.*<title>\(.*\)</title>@\1@p' |
$limite
fi

# CERT/CC
if zztool grep_var c "$sites"
then
url='http://www.us-cert.gov/channels/techalerts.rdf'
echo
zztool eco "* CERT/CC ($url):"
$ZZWWWHTML "$url" |
sed -n '/item/,$ s@.*<title>\(.*\)</title>@\1@p' |
$limite
fi

# Linux Today - Security
if zztool grep_var t "$sites"
then
url='http://linuxtoday.com/security/index.html'
echo
zztool eco "* Linux Today - Security ($url):"
$ZZWWWHTML "$url" |
sed -n '/class="nav"><B>/s/<[^>]*>//gp' |
$limite
fi

# Security Focus
if zztool grep_var f "$sites"
then
url='http://www.securityfocus.com/bid'
echo
zztool eco "* SecurityFocus Vulns Archive ($url):"
$ZZWWWDUMP "$url" |
sed -n '
/^ *\([0-9]\{4\}-[0-9][0-9]-[0-9][0-9]\)/ {
G
s/^ *//
s/\n//p
}
h' |
$limite
fi
}

Change log

r710 by aureliojargas on Mar 29, 2012   Diff
SEGURANÇA: $1 colocado entre aspas na
chamada padrão zzzz -h de todas as
funções.
Go to: 
Sign in to write a code review

Older revisions

r260 by aureliojargas on Dec 21, 2010   Diff
COMBO: mudança em todas as funções
para trocar a ordem das linhas no
cabeçalho. Agora é:

- Descrição de uma linha
...
r259 by aureliojargas on Dec 21, 2010   Diff
Adicionado o campo "Desde:" em todas
as funções que faltavam. Agora temos o
registro completo do nascimento de
todas.
r250 by aureliojargas on Dec 21, 2010   Diff
Colocada a licença GPL (a licença
padrão do projeto Funções ZZ) em todas
as funções que estavam sem o campo
Licença:.
All revisions of this file

File info

Size: 2167 bytes, 92 lines
Powered by Google Project Hosting