/* * Paglo Crawler * Copyright (C) 2006-2008 Paglo Labs Inc. All rights reserved. * www.paglo.com * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ //--------------------------------------------------------------------------- #ifndef CLISupportH #define CLISupportH #include "Thread.h" #include "PacketUtils.h" #include "NetworkDevice.h" #include using namespace std; /* * Thread that runs the command line interface. */ class TCLIThread : public TPThread { public: TCLIThread(void); ~TCLIThread(void); protected: /* * Runs the parser. */ void Run(void); void Init(void); void CompleteRun(void); private: }; //--------------------------------------------------------------------------- /* * Implementation of YY_INPUT. */ void CLIRead(char *Buf, int &Result, int MaxSize); /* * List all discovered network devices. */ void CLIListDevices(); /* * Show how many network devices we are tracking. */ void CLIDeviceListSize(void); /* * Show detailed information for a device. */ void CLIDeviceDetail(TIPAddress Addr); void CLIDeviceDetail(TMacAddress Addr); /* * Display the status of the scan threads. */ void CLIThreadStatus(); /* * List the events waiting in the scan queue. */ void CLIListScanQueue(); /* * Show the current size of the scan queue. */ void CLIScanQueueSize(); /* * Show the configuration of the agent. */ void CLIShowConfig(); /* * Dialogue with the user to classify a device. */ void CLIClassifyDevice(TIPAddress IPAddr); void CLIClassifyDevice(TMacAddress MacAddr); /* * Initiate a scan of a device. */ void CLIScanDevice(TIPAddress IPAddr); /* * Quit the application. */ void CLIQuit(); /* * Displays command help. */ void CLIHelp(); /* * Displays number of frames received/dropped by libpcap. */ void CLISnifferStatus(); /* * Displays the contents of the deferred scans list and how many it contains * respectively. */ void CLIListDeferred(); void CLIDeferredSize(); /* * Show how many packets are in the SniffThread/AnalysisManager's packet queue. */ void CLIPktQueueSize(); /* * Submit a device's evidence to the server. * Useful for debugging evidence submission problems. */ void CLISubmitDevice(TIPAddress IPAddr); void CLISubmitDevice(TMacAddress MacAddr); /* * Set the debug flag. */ void CLIDebug(int Value); #endif