root/branch/PacketManipulator/PM/Backend/__init__.py @ 5120

Revision 5120, 1.7 kB (checked in by nopper, 4 years ago)

2009-07-23 Francesco Piccinno <stack.box@…>

  • PM/Gui/Tabs/MainTab.py:
    • Fixing the background color of gtk.EventBox? to avoid wrong colors on dark color gtk themes.
  • attacks/offline/http/sources/main.py:
    • Fixed a bug related to username cfield not correctly exposed.
  • attacks/offline/profiler/sources/main.py:
    • Moved out Account, Port, Profile interfaces to Providers.py file to have a clear way to communicate with PM GUI.
    • Implemented various functions like info_cb and populate_cb used to communicate with the new HostListTab?.
    • Fixed various bugs.
  • attacks/offline/tcp/sources/main.py:
    • Preparing TCPDecoder plugin for injection purpose.
    • Dropped out unused code.
    • Added a new paramater to the listener callback (used to pass the receiving HalfStream? if there's data to add).
    • Avoid to mantain unused data if it's not collected.
  • PM/Core/NetConst.py:
    • Add specific constants used to implement injection on decoders.
  • attacks/attacktester.py:
    • Now it works also with online directory.
  • PM/Gui/Dialogs/Routes.py PM/Backend/Scapy/Context/init.py:
    • Indentation and column wraps fixes.
  • PM/Gui/Core/MainWindow.py:
    • Add a specific menu for the attacks.
    • Add a menu entry to create an AttackContext?.
    • Add the HostListTab? to the MainWindow? interface.
    • Tooltips of the various menuitem are now showed in the statusbar.
    • Implemented register_attack_item and deregister_attack_item to add and remove attack menu entries.
  • PM/Manager/PreferenceManager.py:
    • Add a new element to the preferences to manage the HostListTab? visibility.
  • PM/Gui/Tabs/HostListTab.py:
    • This is a tab to collect a list of active hosts in a sniffing session.
      • The hosts are grouped by interfaces.
      • There are 3 buttons: a scan button to send probe packets to a specific interface and collect active hosts, a refresh button to refresh the list, and a information button to see additional information related to the selected hosts like active services, account collected, remote OS, MAC vendor, distance in hop, etc.
  • PM/Core/Providers.py:
    • Simple module that holds interfaces used by attack plugins to communicate with PM GUI and viceversa.
  • PM/Manager/AttackManager.py:
    • Add a simple Forwarder class to manage reinjection of frames on a target interface (Not used now. It's only a draft).
    • Now we use inputs to deal with GUI inputs for online attacks. The input dialog is created on demand by looking at inputs, in order to simplify the development phase.
    • The developer now has remove_menu_entry(), add_menu_entry() to place menu entries in the PM GUI.
    • The interaction with the GUI is documented in the docstring and the start point to launch the attack is execute_attack().
  • PM/Gui/Plugins/Containers.py:
    • Now we produce also offline attacks Manifest.xml.
  • PM/Gui/Dialogs/NewAttack.py:
    • Add a new dialog to create a new AttackContext?, letting the user chose the interfaces where the attack will take place.
  • PM/Gui/Widgets/StatusBar.py:
    • Fixed a bug and implemented the missing pop() method.
  • PM/Gui/Widgets/Interfaces.py:
    • Now the 'Auto' entry could be inserted at discretion by using add_auto bool parameter.
  • PM/Backend/init.py PM/Backend/Abstract/Context/init.py PM/Backend/Abstract/BaseContext/Attack.py:
  • PM/Core/AttackUtils.py:
    • Add new string utilities functions like is_ip() and is_mac() that could be used by various plugins.


  • Various bug fixes.
  • Introducing HostListTab?.
  • Preparing the environment for the online attacks.
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3# Copyright (C) 2008 Adriano Monteiro Marques
4#
5# Author: Francesco Piccinno <stack.box@gmail.com>
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
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.
16#
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
20
21class VirtualIFace(object):
22    def __init__(self, name, desc, ip):
23        self.name = name
24        self.description = desc
25        self.ip = ip
26
27class SequencePacket(object):
28    def __init__(self, packet, filter='', inter=0):
29        self.packet = packet
30        self.filter = None
31        self.inter = inter
32
33# Contexts
34from Abstract.BaseContext.Static import StaticContext
35from Abstract.BaseContext.Timed import TimedContext
36from Abstract.BaseContext.Send import SendContext
37from Abstract.BaseContext.SendReceive import SendReceiveContext
38from Abstract.BaseContext.Sniff import SniffContext
39from Abstract.BaseContext.Sequence import SequenceContext
40from Abstract.BaseContext.Attack import AttackContext
41
42from PM.Manager.PreferenceManager import Prefs
43
44if Prefs()['backend.system'].value.lower() == 'umpa':
45    from UMPA import *
46else:
47    from Scapy import *
Note: See TracBrowser for help on using the browser.