Skip to content

Commit

Permalink
Merge pull request #6 from sepehrdaddev/experimental
Browse files Browse the repository at this point in the history
Experimental
  • Loading branch information
sepehrdaddev authored Apr 4, 2018
2 parents cc7865d + 726657a commit 15c07fc
Show file tree
Hide file tree
Showing 31 changed files with 1,089 additions and 619 deletions.
14 changes: 14 additions & 0 deletions Attack_Vector.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "Attack_Vector.hpp"
#include <unistd.h>

Attack_Vector::Attack_Vector(const config *conf, Logger *logger) : conf{conf}, logger{logger}{

}

void Attack_Vector::run() {
for (int x = 0; x < conf->THREADS; x++) {
if(fork()){
attack(&x);
}
}
}
25 changes: 25 additions & 0 deletions Attack_Vector.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#ifndef XERXES_ATTACK_VECTOR_H
#define XERXES_ATTACK_VECTOR_H

#include "Configuration.hpp"
#include "Logger.hpp"

class Attack_Vector {
friend class Spoofed_Flood;
friend class Http_Flood;

public:
Attack_Vector() = default;
Attack_Vector(const config *conf, Logger *logger);
virtual void run();

protected:
const config *conf;
Logger *logger;

private:
virtual void attack(const int *id) = 0;
};


#endif //XERXES_ATTACK_VECTOR_H
11 changes: 11 additions & 0 deletions Attack_Vectors.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#ifndef XERXES_ATTACK_VECTORS_H
#define XERXES_ATTACK_VECTORS_H

#include "ICMP_Flood.hpp"
#include "Null_Flood.hpp"
#include "Slowloris.hpp"
#include "Http_Flood.hpp"
#include "Spoofed_TCP_Flood.hpp"
#include "Spoofed_UDP_Flood.hpp"

#endif //XERXES_ATTACK_VECTORS_H
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ if( OPENSSL_FOUND )
message(STATUS "Using OpenSSL ${OPENSSL_VERSION}")
endif()

add_executable(Xerxes main.cpp Configuration.h Doser.cpp Doser.h Validator.cpp Validator.h Parser.cpp Parser.h Logger.cpp Logger.h)
add_executable(Xerxes main.cpp Configuration.hpp Doser.cpp Doser.hpp Validator.cpp Validator.hpp Parser.cpp Parser.hpp Logger.cpp Logger.hpp ICMP_Flood.cpp ICMP_Flood.hpp Attack_Vectors.hpp Randomizer.hpp Null_Flood.cpp Null_Flood.hpp Slowloris.cpp Slowloris.hpp Http_Flood.cpp Http_Flood.hpp Spoofed_Flood.cpp Spoofed_Flood.hpp Spoofed_TCP_Flood.cpp Spoofed_TCP_Flood.hpp Spoofed_UDP_Flood.cpp Spoofed_UDP_Flood.hpp Attack_Vector.cpp Attack_Vector.hpp)
target_link_libraries(Xerxes ${OPENSSL_LIBRARIES})
add_custom_command(TARGET Xerxes POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/useragents ${CMAKE_CURRENT_BINARY_DIR}/useragents)
5 changes: 3 additions & 2 deletions Configuration.h → Configuration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ struct config{
std::string website{};
std::string port{};
std::vector<std::string> useragents{"Wget/1.16 (linux-gnu/Xerxes)"};
int THREADS = 0;
int CONNECTIONS = 0;
int THREADS{0};
int CONNECTIONS{0};
bool GetResponse{false};
bool RandomizeUserAgent{false};
bool RandomizeHeader{false};
bool UseSSL{false};
int delay{3000};

};

Expand Down
Loading

0 comments on commit 15c07fc

Please sign in to comment.