Development Guide

PETEP Helper

PETEP Helper allows extensions to work with running PETEP core.

You can get instance of PetepHelper in proxies and interceptors and also in PetepListener.

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

PetepHelper interface

 * 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 <>.
/** PETEP helper. */
public interface PetepHelper {
  /** Returns PETEP state. */
  PetepState getState();

   * PDUS
  /** Processes PDU in PETEP. */
  void processPdu(PDU pdu);

  /** Processes PDU in PETEP starting in specified interceptor. */
  void processPdu(PDU pdu, int interceptorId);

  /** Sends PDU outside of the PETEP (to the Internet, ...). */
  void sendPdu(PDU pdu);

  /** Returns list of proxies. */
  List<Proxy> getProxies();

  /** Returns proxy by given code. */
  Proxy getProxy(String code);

  /** Returns list of interceptors in direction C2S. (Client -> Server) */
  List<Interceptor> getInterceptorsC2S();

  /** Returns list of interceptors in direction S2C. (Client <- Server) */
  List<Interceptor> getInterceptorsS2C();