]>
Commit | Line | Data |
---|---|---|
bb1342d3 | 1 | Summary: Passive OS fingerprinting tool |
d95b757c | 2 | Summary(pl.UTF-8): Narzędzie do pasywnej daktyloskopii systemów operacyjnych |
13915ed9 | 3 | Name: p0f |
e4a355c9 | 4 | Version: 3.09b |
5f848913 | 5 | Release: 1 |
0d02d518 | 6 | License: LGPL v2.1 |
6d3d7ec4 | 7 | Group: Networking/Utilities |
3b8d371d | 8 | # Official releases: |
cdc459ab | 9 | Source0: http://lcamtuf.coredump.cx/p0f3/releases/%{name}-%{version}.tgz |
e4a355c9 | 10 | # Source0-md5: bc863233dc2b440cae6ef5665cae34bb |
3b8d371d | 11 | # Devel: |
ab7d9456 | 12 | #Source0: http://lcamtuf.coredump.cx/p0f/%{name}-devel.tgz |
85bfaec8 | 13 | Source1: %{name}.init |
a507a8c4 | 14 | Source2: %{name}.sysconfig |
e4285df8 | 15 | Source3: %{name}.logrotate |
cdc459ab | 16 | URL: http://lcamtuf.coredump.cx/p0f3/ |
bebde152 | 17 | BuildRequires: libpcap-devel |
b679663d | 18 | BuildRequires: rpmbuild(macros) >= 1.268 |
bf362039 | 19 | Requires(post): fileutils |
852bc717 | 20 | Requires(post,preun): /sbin/chkconfig |
95337ac4 ER |
21 | Requires(postun): /usr/sbin/groupdel |
22 | Requires(postun): /usr/sbin/userdel | |
23 | Requires(pre): /bin/id | |
24 | Requires(pre): /usr/bin/getgid | |
25 | Requires(pre): /usr/sbin/groupadd | |
26 | Requires(pre): /usr/sbin/useradd | |
852bc717 | 27 | Requires: rc-scripts |
95337ac4 ER |
28 | Provides: group(p0f) |
29 | Provides: user(p0f) | |
85bfaec8 | 30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
85bfaec8 | 32 | %description |
13915ed9 | 33 | p0f performs passive OS fingerprinting technique based on information |
85bfaec8 | 34 | coming from remote host when it establishes connection to our system. |
35 | Captured packets contains enough information to determine OS - and, | |
36 | unlike active scanners (nmap, queSO) - it is done without sending | |
37 | anything to this host. | |
38 | ||
5435d316 JR |
39 | %description -l pl.UTF-8 |
40 | p0f przeprowadza pasywną daktyloskopię systemu operacyjnego bazując na | |
41 | informacjach, które wysyła zdalny system kiedy ustanawia połączenie z | |
42 | naszym. Wyłapane pakiety zawierają wystarczająco dużo informacji by | |
43 | określić system operacyjny - i, w przeciwieństwie do aktywnych | |
44 | skanerów (nmap, queSO) - jest to robione bez wysyłania czegokolwiek do | |
13915ed9 GS |
45 | tego hosta. |
46 | ||
85bfaec8 | 47 | %prep |
cdc459ab | 48 | %setup -q |
85bfaec8 | 49 | |
85bfaec8 | 50 | %build |
cdc459ab | 51 | %{__make} \ |
bf362039 | 52 | CC="%{__cc}" \ |
cdc459ab AG |
53 | CFLAGS="%{rpmcflags} -DFP_FILE=\"/usr/share/p0f/p0f.fp\"" \ |
54 | LDFLAGS="%{rpmldflags}" | |
85bfaec8 | 55 | |
cdc459ab AG |
56 | %{__make} -C tools \ |
57 | CC="%{__cc}" \ | |
58 | CFLAGS="%{rpmcflags}" \ | |
59 | LDFLAGS="%{rpmldflags}" | |
67edaee3 | 60 | |
85bfaec8 | 61 | %install |
62 | rm -rf $RPM_BUILD_ROOT | |
cdc459ab | 63 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,/etc/logrotate.d,%{_sbindir},%{_datadir}/p0f} |
83531872 | 64 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/p0f |
a507a8c4 | 65 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/p0f |
e4285df8 | 66 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/p0f |
cdc459ab AG |
67 | install p0f tools/p0f-{client,sendsyn,sendsyn6} $RPM_BUILD_ROOT%{_sbindir} |
68 | install p0f.fp $RPM_BUILD_ROOT%{_datadir}/p0f | |
85bfaec8 | 69 | |
9b3d1057 JB |
70 | %clean |
71 | rm -rf $RPM_BUILD_ROOT | |
85bfaec8 | 72 | |
95337ac4 ER |
73 | %pre |
74 | %groupadd -g 164 p0f | |
75 | %useradd -u 164 -c "p0f user" -g p0f p0f | |
76 | ||
85bfaec8 | 77 | %post |
13915ed9 GS |
78 | if [ ! -f /var/log/p0f ]; then |
79 | touch /var/log/p0f | |
bf362039 | 80 | chown root:root /var/log/p0f |
13915ed9 | 81 | chmod 600 /var/log/p0f |
85bfaec8 | 82 | fi |
13915ed9 | 83 | /sbin/chkconfig --add p0f |
b679663d | 84 | %service p0f restart "p0f daemon" |
85bfaec8 | 85 | |
86 | %preun | |
9b3d1057 | 87 | if [ "$1" = "0" ]; then |
b679663d | 88 | %service p0f stop |
13915ed9 | 89 | /sbin/chkconfig --del p0f |
85bfaec8 | 90 | fi |
9b3d1057 | 91 | |
95337ac4 ER |
92 | %postun |
93 | if [ "$1" = "0" ]; then | |
94 | %userremove p0f | |
95 | %groupremove p0f | |
96 | fi | |
97 | ||
9b3d1057 JB |
98 | %files |
99 | %defattr(644,root,root,755) | |
cdc459ab | 100 | %doc docs/{ChangeLog,existential-notes.txt,extra-sigs.txt,README,TODO} tools/README-TOOLS |
83531872 | 101 | %attr(754,root,root) /etc/rc.d/init.d/p0f |
852bc717 ER |
102 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/p0f |
103 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/p0f | |
67edaee3 | 104 | %attr(755,root,root) %{_sbindir}/p0f* |
cdc459ab | 105 | %{_datadir}/p0f |