Skip to content

Instantly share code, notes, and snippets.

@cwgreene
Created June 4, 2020 08:34
Show Gist options
  • Save cwgreene/539e280ef3ca24e01493b8af61d83b3c to your computer and use it in GitHub Desktop.
Save cwgreene/539e280ef3ca24e01493b8af61d83b3c to your computer and use it in GitHub Desktop.
-_DT_INIT - __gmon_start__()
-entry
- __libc_start_main(FUN_001013af,in_stack_00000000,&stack0x00000008,&LAB_00101530,&DAT_001015a0,param_3,auStack8)
-FUN_00100b80
-_FINI_0
- __cxa_finalize(PTR_LOOP_00302008)
- FUN_00100b80()
-_INIT_0
-FUN_00100c5a
- puts("Welcome to the command system")
- puts("=============================")
-FUN_00100c79
- memset(local_28,0,0x10)
- fgets(local_28,0x10,stdin)
- atoll(local_28)
- __stack_chk_fail()
-FUN_00100ce0
- memset(local_28,0,0x10)
- fgets(local_28,0x10,stdin)
- atoll(local_28)
- __stack_chk_fail()
-FUN_00100d47
- setvbuf(stdin,(char *)0x0,2,0)
- setvbuf(stderr,(char *)0x0,2,0)
- setvbuf(stdout,(char *)0x0,2,0)
- pcVar1 = getenv("DEBUG")
- alarm(0x3c)
-FUN_00100dc3
- puts("")
- puts("Choose an option:")
- puts("1. Include command")
- puts("2. Review command")
- puts("3. Delete command")
- puts("4. List commands")
- puts("5. Send commands")
- printf("> ")
- puts("[ERROR] Unexpected option!!!")
- puts("The system is shutting down")
- exit(1)
-FUN_00100e55
- puts("[INFO] The authorized limit has been reached!")
- pvVar2 = malloc(0x188)
- printf("Priority: ")
- iVar1 = FUN_00100ce0()
- printf("Command: ")
- sVar3 = read(0,(void *)(*(long *)(param_1 + (long)(int)local_24 * 8) + 8),0x170)
- printf("The command has been included at index %d\n",(ulong)local_24)
-FUN_00100fb8
- printf("Priority: %lld\n",*param_1)
- printf("Command: %s\n",param_1 + 1)
-FUN_00100ffe
- printf("Command index: ")
- iVar1 = FUN_00100c79()
- puts("")
- FUN_00100fb8(*(undefined8 *)(param_1 + (long)iVar1 * 8))
-FUN_00101085
- printf("Command index: ")
- iVar1 = FUN_00100c79()
- free(*(void **)(param_1 + (long)iVar1 * 8))
- puts("The command has been successfully deleted")
-FUN_00101127
- puts("")
- printf("Index %d\n",(ulong)local_c)
- FUN_00100fb8(*(undefined8 *)(param_1 + (long)(int)local_c * 8))
-FUN_001011a6
- FUN_00100dc3()
- uVar1 = FUN_00100c79()
- error()
- FUN_00100e55(param_1)
- FUN_00100ffe(param_1)
- FUN_00101085(param_1)
- FUN_00101127(param_1)
-FUN_0010123d
- memset(&local_28,0,0x14)
- memset(local_38,0,0x10)
- puts("Are you sending the commands to which rbs?")
- iVar1 = FUN_00100ce0()
- fprintf(*param_2,"Id: %lld\n",(long)iVar1)
- fprintf(*param_2,"%lld:%s\n",**(undefined8 **)(param_1 + (long)local_44 * 8),*(long *)(param_1 + (long)local_44 * 8) + 8)
- snprintf(local_38,0xc,&DAT_00302060)
- strcat((char *)&local_28,local_38)
- printf("You command %s!\n",&local_28)
- __stack_chk_fail()
-FUN_001013af
- FUN_00100d47()
- FUN_00100c5a()
- printf("Your name: ")
- local_70 = read(0,&DAT_00302060,0xc)
- printf("Welcome %s\n",&DAT_00302060)
- memset(local_68,0,0x50)
- FUN_001011a6(local_68)
- puts("")
- puts("Sending commands...")
- tVar1 = time((time_t *)0x0)
- snprintf(&DAT_00302080,0x2d,"/commands/%ld",tVar1)
- local_78 = fopen(&DAT_00302080,"w")
- printf("[ERROR] An error happened while opening the file")
- exit(2)
- FUN_0010123d(local_68,&local_78,&local_78)
- fclose(local_78)
- __stack_chk_fail()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment