Skip to content

Instantly share code, notes, and snippets.

View shivamg7's full-sized avatar
🏠
Working from home

Shivam Gupta shivamg7

🏠
Working from home
  • Bangalore
  • 17:36 (UTC +05:30)
View GitHub Profile
@shivamg7
shivamg7 / crack.c
Created May 31, 2017 10:15
Cracks a three character password which is encrytped usinf DES useed in linux systems. Uses a generate program which creates all the combinations possible for the three characer password.
#define _XOPEN_SOURCE
#include <stdio.h>
#include <cs50.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
//char name[7312000][5];
int generate(char hash[])
@shivamg7
shivamg7 / intials.c
Created May 31, 2017 10:14
Outputs the initials of the name as supplied in the input, as per the instructions
#include <stdio.h>
#include <cs50.h>
#include <string.h>
#include <ctype.h>
int main()
{
char store[10];
@shivamg7
shivamg7 / vigenere.c
Last active May 31, 2017 10:17
Encoded supplied input according to vigenere crytography, key is suppiled at command line.
#include <stdio.h>
#include <cs50.h>
#include <string.h>
#include <ctype.h>
int main(int argv,char *argc[])
{
if(argv!=2)
{
printf("Usage: ./vigenere k\n");
/**
* fifteen.c
*
*
*
* Implements Game of Fifteen (generalized to d x d).
*
* Usage: fifteen d
*
* whereby the board's dimensions are to be d x d,