Development Guide

PETEP Listener

PETEP Listener allows you to take action when PETEP loads, starts and stops. It also provides PetepHelper instance, so you can work with the PETEP core.

You can register your own PETEP Listener using ExtensionHelper.

Warning: If you get the PetepHelper instance from PetepListener, you have to get rid of it after PETEP core stops! (Otherwise the memory will not be released.)

PetepListener interface

com.warxim.petep.core.listener.PetepListener
/*
 * PEnetration TEsting Proxy (PETEP)
 * 
 * Copyright (C) 2020 Michal Válka
 *
 * This program is free software: you can redistribute it and/or modify it under the terms of the
 * GNU General Public License as published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * 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, see <https://www.gnu.org/licenses/>.
 */
/**
 * PETEP listener interface. Allows extensions to listen for PETEP events and also allows them to
 * obtain PetepHelper.
 *
 * <p>
 * <b>ATTENTION</b>: Extensions should remove PetepHelper from their memory after PETEP stops, so
 * that GC can collect resources. (This, of course, applies to all other resources that are
 * connected to PETEP instance.)
 */
@PetepAPI
public interface PetepListener {
  /** Event before prepare step is processed. */
  default void beforePrepare(PetepHelper helper) {}

  /** Event after prepare step is processed. */
  default void afterPrepare(PetepHelper helper) {}

  /** Event before start step is processed. */
  default void beforeStart(PetepHelper helper) {}

  /** Event after start step is processed. */
  default void afterStart(PetepHelper helper) {}

  /** Event before stop step is processed. */
  default void beforeStop(PetepHelper helper) {}

  /** Event after stop step is processed. */
  default void afterStop(PetepHelper helper) {}
}
Získejte registraci domén s tld .online, .space, .store, .tech zdarma!
Stačí si k jedné z těchto domén vybrat hosting Plus nebo Mega a registraci domény od nás dostanete za 0 Kč!
Objednat