/* * Localwebfaker - Web sites faker for LAN * Copyright (C) 2007-2009 Lucas J. González * * 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 AppName() ; winTitle.append(" - Running"); setWindowTitle(winTitle) ; attackStatusOutLbl = new QLabel("Attack Status:") ; webServOutLbl = new QLabel("Connections:") ; arpSpoofOutLbl = new QLabel("Arp Poisoning:") ; QVBoxLayout *cuerpo = new QVBoxLayout(this) ; QHBoxLayout *salidaL = new QHBoxLayout() ; QVBoxLayout *attackStatusOutL = new QVBoxLayout() ; QVBoxLayout *webServ_arpSpoof_L = new QVBoxLayout() ; QVBoxLayout *webServOutL = new QVBoxLayout() ; QVBoxLayout *arpSpoofOutL = new QVBoxLayout() ; QHBoxLayout *progresoL = new QHBoxLayout() ; attackStatusOutTE = new QTextEdit() ; attackStatusOutTE->setReadOnly (true) ; // attackStatusOutTE->setLineWrapMode(QTextEdit::NoWrap) ; attackStatusOutTE->setMinimumWidth ( 540 ) ; webServOutTE = new QTextEdit() ; webServOutTE->setReadOnly (true) ; webServOutTE->setLineWrapMode(QTextEdit::NoWrap) ; webServOutTE->setMinimumWidth ( 540 ) ; arpSpoofOutTE = new QTextEdit() ; arpSpoofOutTE->setReadOnly (true) ; arpSpoofOutTE->setLineWrapMode(QTextEdit::NoWrap) ; arpSpoofOutTE->setMinimumWidth ( 540 ) ; QPushButton *stopBtn = new QPushButton(tr("Stop"), this) ; barra = new QProgressBar() ; barra->setRange ( 0, 7 ) ; barra->setValue( 0 ) ; barra->setMinimumWidth ( 320 ) ; barra->setMaximumWidth ( 320 ) ; faseLbl = new QLabel() ; faseLbl->setMinimumWidth ( 210 ) ; faseLbl->setMaximumWidth ( 210 ) ; connect( stopBtn, SIGNAL(clicked()), this, SLOT(accept()) ) ; // connect( this, SIGNAL(accepted()), this, SLOT(parar()) ) ; // connect( this, SIGNAL(rejected()), this, SLOT(parar()) ) ; attackStatusOutL->addWidget(attackStatusOutLbl) ; attackStatusOutL->addWidget(attackStatusOutTE) ; webServOutL->addWidget(webServOutLbl) ; webServOutL->addWidget(webServOutTE) ; arpSpoofOutL->addWidget(arpSpoofOutLbl) ; arpSpoofOutL->addWidget(arpSpoofOutTE) ; cuerpo->addLayout(salidaL) ; cuerpo->addLayout(progresoL) ; salidaL->addLayout(attackStatusOutL) ; salidaL->addLayout(webServ_arpSpoof_L) ; webServ_arpSpoof_L->addLayout(webServOutL); webServ_arpSpoof_L->addLayout(arpSpoofOutL); progresoL->addSpacing( 10 ) ; progresoL->addWidget(barra) ; progresoL->addWidget(faseLbl) ; progresoL->addWidget(stopBtn) ; progresoL->addStretch ( 1000 ) ; salidaL->setSpacing(6); salidaL->setMargin(11); } void ventanaExec::toWOut(QString texto) { QString *tmp = new QString(webServOutTE->toPlainText()) ; tmp->append(texto) ; webServOutTE->setText(*tmp); } void ventanaExec::toAOut(QString texto) { QString *tmp = new QString( arpSpoofOutTE->toPlainText() ) ; tmp->append(texto) ; arpSpoofOutTE->setText(*tmp); } void ventanaExec::toAtOut(QString texto) { // QString *tmp = new QString( attackStatusOutTE->toPlainText() ) ; // tmp->append(texto) ; // attackStatusOutTE->setText(*tmp); attackStatusOutTE->append( texto ) ; } void ventanaExec::toFaseLabel(QString texto) { faseLbl->setText(texto) ; } void ventanaExec::faseCompleta() { barra->setValue((int)(barra->value())+(int)1) ; if( barra->value() == 7 ) { barra->setFormat ( QString("¡¡Completed!! ;)") ) ; /*barra->setTextVisible ( false ) ;*/ faseLbl->setText( "Attack started" ) ; } std::cout << "phase " << barra->value() <<" completed" << std::endl ; }