1
/* $Id: targets_list.cc,v 1.2 2003/04/22 20:00:02 fygrave Exp $ */
3
** Copyright (C) 2001 Fyodor Yarochkin <fygrave@tigerteam.net>,
4
** Ofir Arkin <ofir@sys-security.com>
6
** This program is free software; you can redistribute it and/or modify
7
** it under the terms of the GNU General Public License as published by
8
** the Free Software Foundation; either version 2 of the License, or
9
** (at your option) any later version.
12
** This program is distributed in the hope that it will be useful,
13
** but WITHOUT ANY WARRANTY; without even the implied warranty of
14
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
** GNU General Public License for more details.
17
** You should have received a copy of the GNU General Public License
18
** along with this program; if not, write to the Free Software
19
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
#include "targets_list.h"
25
#include "interface.h"
29
int Targets_List::init(char *target_ascii) {
31
ui->msg("[+] Target is %s\n", target_ascii);
32
if (target_net.init(target_ascii) == FAIL) return FAIL;
37
void Targets_List::reset(void) {
42
Target *Targets_List::getnext() {
43
unsigned long na = getnext_ip();
44
if (na == 0xffffffff || na == 0) return NULL;
46
Target *tg = new Target(na);
47
targets.insert(pair <int, Target *>(target_counter++, tg));
51
unsigned long Targets_List::getnext_ip(void) {
52
return target_net.getnext();
55
Targets_List::Targets_List(void) {