This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
/* uncomment line below if need to see debug info */ | |
/* #define DEBUG */ | |
void selectionSort(int numbers[], int length); | |
int main(int argc, char *argv[]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#COPY BASH SCRIPT FROM END OF FILE TO MAKE THIS PYTHON SCRIPT WORK PROPERLY. | |
# Also update cokie and session Id in Header | |
import requests | |
import subprocess | |
import re | |
import base64 | |
from bs4 import BeautifulSoup | |
url = 'https://evilzone.org/challenges/fast_hasher/' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Dowload the archive file from : https://evilzone.org/index.php?page=challenges&sub=viewChallenge&id=21 | |
#Run ./unpacker.sh script from the location you downloaded file. | |
#!/usr/bin/env bash | |
FILE=$(pwd) | |
FILE+=/flag_999.tar.gz | |
if test -f "$FILE"; then | |
echo "File found and Procesing." | |
else | |
echo "File $FILE does not exist." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* full implimentationof Linked List : https://github.com/outlinepix/LinkedList */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
typedef struct Node | |
{ | |
int data; | |
struct Node *next; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int binarySearch(int[], int, int, int); | |
int main() | |
{ | |
/* Basic condition for binary search is list must be sorted or you have some kinda machanism to sort it */ | |
int array[] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100}; | |
int length = sizeof(array) / sizeof(array[0]); | |
int target = 30; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
typedef struct | |
{ | |
char **list; | |
int length; | |
} stringList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void *slice(void *, int); /*prototype*/ | |
void *slice(void __restricted *ptr, const int size) | |
{ | |
char* newPtr = (char*)malloc(size); | |
memcpy(newPtr, ptr, size); | |
return newPtr; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int indexOf(void *word, void *chars) | |
{ | |
char *result = strstr(word, chars); | |
if (result == NULL) | |
{ | |
printf("%s\n", "Not found"); | |
return -1; | |
} | |
char *p = word; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdbool.h> | |
#include <assert.h> | |
#define MAX_LEN 10 | |
size_t count = 0, i = 0; | |
void appendToArray(int *array, int len, int value); | |
int cmp(const void *a, const void *b); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* IF YOU WANT TO SORT IN DESCENDING ORDER */ | |
int cmp(const void *a, const void *b) | |
{ | |
const int *A = a, *B = b; | |
/* a>b => -1, a<b => 1, a==b => 0 */ | |
return (*A < *B) - (*A > *B); | |
} | |
/* FOR ASCENDING ORDER SORT*/ | |
int cmp(const void *a, const void *b) |
NewerOlder