Skip to content

Commit

Permalink
Merge pull request #21 from bmorcelli/main
Browse files Browse the repository at this point in the history
Beacon SPAM, desprited images and fixes
  • Loading branch information
pr3y authored May 21, 2024
2 parents 7b3cb7c + 5749e19 commit 820864b
Show file tree
Hide file tree
Showing 9 changed files with 342 additions and 83 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ For more information on each function supported by Bruce, [read our wiki here](h
- [x] WiFi AP (New)
- [x] Disconnect WiFi (New)
- [X] WiFi Atks
- [x] Information
- [X] Target Deauth
- [ ] Deauth Flood
- [X] EvilPortal + Deauth
- [x] Beacon Spam
- [x] Target Atk
- [x] Information
- [X] Target Deauth
- [X] EvilPortal + Deauth
- [ ] Deauth Flood (More than one target)
- [X] TelNet
- [X] SSH
- [x] RAW Sniffer
Expand Down
103 changes: 50 additions & 53 deletions src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,38 +258,35 @@ void drawMainMenu(int index) {

const char* texts[6] = { "WiFi", "BLE", "RF", "RFID", "Others", "Config" };

draw.deleteSprite();
draw.createSprite(80,80);
drawMainBorder();
tft.setTextSize(FG);

switch(index) {
case 0:
drawWifi();
drawWifi(80,27);
break;
case 1:
drawBLE();
drawBLE(80,27);
break;
case 2:
drawRf();
drawRf(80,27);
break;
case 3:
drawRfid();
drawRfid(80,27);
break;
case 4:
drawOther();
drawOther(80,27);
break;
case 5:
drawCfg();
drawCfg(80,27);
break;
}
tft.setTextSize(FM);
tft.drawCentreString(texts[index],tft.width()/2, tft.height()-(LH*FM+10), SMOOTH_FONT);
tft.setTextSize(FG);
tft.drawChar('<',10,tft.height()/2+10);
tft.drawChar('>',tft.width()-(LW*FG+10),tft.height()/2+10);
draw.pushSprite(80,27);
draw.deleteSprite();


}

Expand Down Expand Up @@ -418,11 +415,11 @@ void drawWifiSmall(int x, int y) {
draw.deleteSprite();
}

void drawWifi() {
draw.fillSprite(BGCOLOR);
draw.fillCircle(40,60,6,FGCOLOR);
draw.drawSmoothArc(40,60,26,20,130,230,FGCOLOR, BGCOLOR,true);
draw.drawSmoothArc(40,60,46,40,130,230,FGCOLOR, BGCOLOR,true);
void drawWifi(int x, int y) {
tft.fillRect(x,y,80,80,BGCOLOR);
tft.fillCircle(40+x,60+y,6,FGCOLOR);
tft.drawSmoothArc(40+x,60+y,26,20,130,230,FGCOLOR, BGCOLOR,true);
tft.drawSmoothArc(40+x,60+y,46,40,130,230,FGCOLOR, BGCOLOR,true);
}

void drawBLESmall(int x, int y) {
Expand All @@ -439,54 +436,54 @@ void drawBLESmall(int x, int y) {
draw.deleteSprite();
}

void drawBLE() {
draw.fillSprite(BGCOLOR);
draw.drawWideLine(40,53,2,26,5,FGCOLOR,BGCOLOR);
draw.drawWideLine(40,26,2,53,5,FGCOLOR,BGCOLOR);
draw.fillTriangle(40,26,20,40,20,12,FGCOLOR);
draw.fillTriangle(40,53,20,40,20,68,FGCOLOR);
draw.drawArc(40,40,10,12,210,330,FGCOLOR,BGCOLOR);
draw.drawArc(40,40,23,25,210,330,FGCOLOR,BGCOLOR);
draw.drawArc(40,40,36,38,210,330,FGCOLOR,BGCOLOR);
void drawBLE(int x, int y) {
tft.fillRect(x,y,80,80,BGCOLOR);
tft.drawWideLine(40+x,53+y,2+x,26+y,5,FGCOLOR,BGCOLOR);
tft.drawWideLine(40+x,26+y,2+x,53+y,5,FGCOLOR,BGCOLOR);
tft.fillTriangle(40+x,26+y,20+x,40+y,20+x,12+y,FGCOLOR);
tft.fillTriangle(40+x,53+y,20+x,40+y,20+x,68+y,FGCOLOR);
tft.drawArc(40+x,40+y,10,12,210,330,FGCOLOR,BGCOLOR);
tft.drawArc(40+x,40+y,23,25,210,330,FGCOLOR,BGCOLOR);
tft.drawArc(40+x,40+y,36,38,210,330,FGCOLOR,BGCOLOR);
}

void drawCfg() {
draw.fillSprite(BGCOLOR);
void drawCfg(int x, int y) {
tft.fillRect(x,y,80,80,BGCOLOR);
int i=0;
for(i=0;i<6;i++) {
draw.drawArc(40,40,30,20,15+60*i,45+60*i,FGCOLOR,BGCOLOR,true);
tft.drawArc(40+x,40+y,30,20,15+60*i,45+60*i,FGCOLOR,BGCOLOR,true);
}
draw.drawArc(40,40,22,8,0,360,FGCOLOR,BGCOLOR,false);
tft.drawArc(40+x,40+y,22,8,0,360,FGCOLOR,BGCOLOR,false);
}

void drawRf() {
draw.fillSprite(BGCOLOR);
draw.fillCircle(40,30,7,FGCOLOR);
draw.fillTriangle(40,40,25,70,55,70,FGCOLOR);
draw.drawArc(40,30,18,15,40,140,FGCOLOR,BGCOLOR);
draw.drawArc(40,30,28,25,40,140,FGCOLOR,BGCOLOR);
draw.drawArc(40,30,38,35,40,140,FGCOLOR,BGCOLOR);
draw.drawArc(40,30,18,15,220,320,FGCOLOR,BGCOLOR);
draw.drawArc(40,30,28,25,220,320,FGCOLOR,BGCOLOR);
draw.drawArc(40,30,38,35,220,320,FGCOLOR,BGCOLOR);
void drawRf(int x, int y) {
tft.fillRect(x,y,80,80,BGCOLOR);
tft.fillCircle(40+x,30+y,7,FGCOLOR);
tft.fillTriangle(40+x,40+y,25+x,70+y,55+x,70+y,FGCOLOR);
tft.drawArc(40+x,30+y,18,15,40,140,FGCOLOR,BGCOLOR);
tft.drawArc(40+x,30+y,28,25,40,140,FGCOLOR,BGCOLOR);
tft.drawArc(40+x,30+y,38,35,40,140,FGCOLOR,BGCOLOR);
tft.drawArc(40+x,30+y,18,15,220,320,FGCOLOR,BGCOLOR);
tft.drawArc(40+x,30+y,28,25,220,320,FGCOLOR,BGCOLOR);
tft.drawArc(40+x,30+y,38,35,220,320,FGCOLOR,BGCOLOR);
}

void drawRfid() {
draw.fillSprite(BGCOLOR);
draw.drawRoundRect(5,5,70,70,10,FGCOLOR);
draw.fillRect(0,40,40,40,BGCOLOR);
draw.drawCircle(15,65,7,FGCOLOR);
draw.drawArc(15,65,18,15,180,270,FGCOLOR,BGCOLOR);
draw.drawArc(15,65,28,25,180,270,FGCOLOR,BGCOLOR);
draw.drawArc(15,65,38,35,180,270,FGCOLOR,BGCOLOR);
void drawRfid(int x, int y) {
tft.fillRect(x,y,80,80,BGCOLOR);
tft.drawRoundRect(5+x,5+y,70,70,10,FGCOLOR);
tft.fillRect(0+x,40+y,40,40,BGCOLOR);
tft.drawCircle(15+x,65+y,7,FGCOLOR);
tft.drawArc(15+x,65+y,18,15,180,270,FGCOLOR,BGCOLOR);
tft.drawArc(15+x,65+y,28,25,180,270,FGCOLOR,BGCOLOR);
tft.drawArc(15+x,65+y,38,35,180,270,FGCOLOR,BGCOLOR);
}

void drawOther() {
draw.fillSprite(BGCOLOR);
draw.fillCircle(40,40,7,FGCOLOR);
draw.drawArc(40,40,18,15,0,340,FGCOLOR,BGCOLOR);
draw.drawArc(40,40,25,22,20,360,FGCOLOR,BGCOLOR);
draw.drawArc(40,40,32,29,0,200,FGCOLOR,BGCOLOR);
draw.drawArc(40,40,32,29,240,360,FGCOLOR,BGCOLOR);
void drawOther(int x, int y) {
tft.fillRect(x,y,80,80,BGCOLOR);
tft.fillCircle(40+x,40+y,7,FGCOLOR);
tft.drawArc(40+x,40+y,18,15,0,340,FGCOLOR,BGCOLOR);
tft.drawArc(40+x,40+y,25,22,20,360,FGCOLOR,BGCOLOR);
tft.drawArc(40+x,40+y,32,29,0,200,FGCOLOR,BGCOLOR);
tft.drawArc(40+x,40+y,32,29,240,360,FGCOLOR,BGCOLOR);
}

12 changes: 6 additions & 6 deletions src/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ void drawBatteryStatus();

void drawWifiSmall(int x, int y);

void drawWifi();
void drawWifi(int x, int y);

void drawBLESmall(int x, int y);

void drawBLE();
void drawBLE(int x, int y);

void drawRf();
void drawRf(int x, int y);

void drawRfid();
void drawRfid(int x, int y);

void drawOther();
void drawOther(int x, int y);

void drawCfg();
void drawCfg(int x, int y);



Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void loop() {
options.push_back({"Raw Sniffer", [=]() { sniffer_setup(); }});
options.push_back({"DPWO-ESP32", [=]() { dpwo_setup(); }});
options.push_back({"Evil Portal", [=]() { startEvilPortal(); }});
options.push_back({"Scan Hosts", [=]() { local_scan_setup(); }});
options.push_back({"Scan Hosts", [=]() { local_net_scan_setup(); }});
options.push_back({"Wireguard", [=]() { wg_setup(); }});
options.push_back({"Main Menu", [=]() { backToMenu(); }});
delay(200);
Expand Down
2 changes: 1 addition & 1 deletion src/mykeyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ String keyboard(String mytext, int maxSize, String msg) {
/* When Select a key in keyboard */
#if defined (CARDPUTER)
Keyboard.update();
if (Keyboard.isChange()) {
if (Keyboard.isPressed()) {
Keyboard_Class::KeysState status = Keyboard.keysState();
for (auto i : status.word) {
mytext += i;
Expand Down
2 changes: 1 addition & 1 deletion src/scan_hosts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

std::vector<std::string> successful_hosts;

void local_scan_setup() {
void local_net_scan_setup() {

if (WiFi.status() != WL_CONNECTED) {
delay(500);
Expand Down
2 changes: 1 addition & 1 deletion src/scan_hosts.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ bool ping(IPAddress target);

int etharp_get_entry(size_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret);

void local_scan_setup();
void local_net_scan_setup();

void print_arp_table();
Loading

0 comments on commit 820864b

Please sign in to comment.