void _DT_INIT(void)
{
__gmon_start__();
return;
}
void FUN_00101020(void)
{
// WARNING: Treating indirect jump as call
(*(code *)(undefined *)0x0)();
return;
}
// WARNING: Unknown calling convention -- yet parameter storage is locked
void free(void *__ptr)
{
free(__ptr);
return;
}
// WARNING: Unknown calling convention -- yet parameter storage is locked
int puts(char *__s)
{
int iVar1;
iVar1 = puts(__s);
return iVar1;
}
// WARNING: Unknown calling convention -- yet parameter storage is locked
size_t strlen(char *__s)
{
size_t sVar1;
sVar1 = strlen(__s);
return sVar1;
}
// WARNING: Unknown calling convention -- yet parameter storage is locked
int printf(char *__format,...)
{
int iVar1;
iVar1 = printf(__format);
return iVar1;
}
// WARNING: Unknown calling convention -- yet parameter storage is locked
void * malloc(size_t __size)
{
void *pvVar1;
pvVar1 = malloc(__size);
return pvVar1;
}
void __cxa_finalize(void)
{
__cxa_finalize();
return;
}
void processEntry entry(undefined8 param_1,undefined8 param_2)
{
undefined auStack_8 [8];
__libc_start_main(FUN_00101179,param_2,&stack0x00000008,0,0,param_1,auStack_8);
do {
// WARNING: Do nothing block with infinite loop
} while( true );
}
// WARNING: Removing unreachable block (ram,0x001010d3)
// WARNING: Removing unreachable block (ram,0x001010df)
void FUN_001010c0(void)
{
return;
}
// WARNING: Removing unreachable block (ram,0x00101114)
// WARNING: Removing unreachable block (ram,0x00101120)
void FUN_001010f0(void)
{
return;
}
void _FINI_0(void)
{
if (DAT_00104038 != '\0') {
return;
}
__cxa_finalize(PTR_LOOP_00104030);
FUN_001010c0();
DAT_00104038 = 1;
return;
}
void _INIT_0(void)
{
FUN_001010f0();
return;
}
undefined8 FUN_00101179(int param_1,undefined8 *param_2)
{
undefined8 uVar1;
size_t sVar2;
char *__ptr;
int local_1c;
if (param_1 == 2) {
sVar2 = strlen((char *)param_2[1]);
if (sVar2 == 0x20) {
sVar2 = strlen((char *)param_2[1]);
__ptr = (char *)malloc(sVar2 >> 1);
for (local_1c = 0; sVar2 = strlen((char *)param_2[1]), (ulong)(long)local_1c < sVar2 >> 1;
local_1c = local_1c + 1) {
__ptr[local_1c] = *(char *)((long)local_1c + param_2[1]);
}
if ((((((*__ptr == '8') && (__ptr[1] == '8')) && (__ptr[2] == '6')) &&
(((__ptr[3] == 'f' && (__ptr[4] == '4')) &&
((__ptr[5] == '0' && ((__ptr[6] == '9' && (__ptr[7] == 'a')))))))) &&
((__ptr[8] == '3' && (((__ptr[9] == '7' && (__ptr[10] == 'b')) && (__ptr[0xb] == '4'))))))
&& (((__ptr[0xc] == 'd' && (__ptr[0xd] == '1')) &&
((__ptr[0xe] == 'd' && (__ptr[0xf] == '6')))))) {
puts("[*] First Segment passed!!!");
if ((((*(char *)(param_2[1] + 0x10) == '9') && (*(char *)(param_2[1] + 0x11) == '1')) &&
((*(char *)(param_2[1] + 0x12) == 'f' &&
((((*(char *)(param_2[1] + 0x13) == '7' && (*(char *)(param_2[1] + 0x14) == '1')) &&
(*(char *)(param_2[1] + 0x15) == '0')) &&
((*(char *)(param_2[1] + 0x16) == '4' && (*(char *)(param_2[1] + 0x17) == '1'))))))))
&& (((*(char *)(param_2[1] + 0x18) == '7' &&
((*(char *)(param_2[1] + 0x19) == '8' && (*(char *)(param_2[1] + 0x1a) == '2')))) &&
(((*(char *)(param_2[1] + 0x1b) == '8' &&
(((*(char *)(param_2[1] + 0x1c) == '5' && (*(char *)(param_2[1] + 0x1d) == '1')) &&
(*(char *)(param_2[1] + 0x1e) == '6')))) && (*(char *)(param_2[1] + 0x1f) == '2'))
)))) {
puts("[*] Last Segment passwd!!!");
printf("FLAG: WSIR{%s}\n",param_2[1]);
free(__ptr);
uVar1 = 0;
}
else {
puts("[-] Last Segment not passed!!!");
uVar1 = 0xfffffffe;
}
}
else {
puts("[-] First Segment not passed!!!");
uVar1 = 0xffffffff;
}
}
else {
puts("Incorrect!!!");
uVar1 = 0xfffffffd;
}
}
else {
printf("Usage: %s PASSWORD",*param_2);
uVar1 = 0xffffffff;
}
return uVar1;
}
void _DT_FINI(void)
{
return;
}
Write, Run & Share C Language code online using OneCompiler's C online compiler for free. It's one of the robust, feature-rich online compilers for C language, running the latest C version which is C18. Getting started with the OneCompiler's C editor is really simple and pretty fast. The editor shows sample boilerplate code when you choose language as 'C' and start coding!
OneCompiler's C online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample C program which takes name as input and print your name with hello.
#include <stdio.h>
int main()
{
char name[50];
printf("Enter name:");
scanf("%s", name);
printf("Hello %s \n" , name );
return 0;
}
C language is one of the most popular general-purpose programming language developed by Dennis Ritchie at Bell laboratories for UNIX operating system. The initial release of C Language was in the year 1972. Most of the desktop operating systems are written in C Language.
When ever you want to perform a set of operations based on a condition if-else is used.
if(conditional-expression) {
// code
} else {
// code
}
You can also use if-else for nested Ifs and if-else-if ladder when multiple conditions are to be performed on a single variable.
Switch is an alternative to if-else-if ladder.
switch(conditional-expression) {
case value1:
// code
break; // optional
case value2:
// code
break; // optional
...
default:
// code to be executed when all the above cases are not matched;
}
For loop is used to iterate a set of statements based on a condition.
for(Initialization; Condition; Increment/decrement){
// code
}
While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.
while(condition) {
// code
}
Do-while is also used to iterate a set of statements based on a condition. It is mostly used when you need to execute the statements atleast once.
do {
// code
} while (condition);
Array is a collection of similar data which is stored in continuous memory addresses. Array values can be fetched using index. Index starts from 0 to size-1.
data-type array-name[size];
data-type array-name[size][size];
Function is a sub-routine which contains set of statements. Usually functions are written when multiple calls are required to same set of statements which increases re-usuability and modularity.
Two types of functions are present in C
Library functions are the in-built functions which are declared in header files like printf(),scanf(),puts(),gets() etc.,
User defined functions are the ones which are written by the programmer based on the requirement.
return_type function_name(parameters);
function_name (parameters)
return_type function_name(parameters) {
//code
}