Skip to content

Instantly share code, notes, and snippets.


Faraz Fallahi fffaraz

View GitHub Profile
fffaraz /
Last active Dec 3, 2021
Project Ideas List


Reverse a String Enter a string and the program will reverse it and print it out.

Pig Latin Pig Latin is a game of alterations played on the English language game. To create the Pig Latin form of an English word the initial consonant sound is transposed to the end of the word and an ay is affixed (Ex.: "banana" would yield anana-bay). Read Wikipedia for more information on rules.

fffaraz /
Created Jul 30, 2014
TCP syn flood in python using raw sockets
Syn flood program in python using raw sockets (Linux)
Silver Moon (
# some imports
import socket, sys
from struct import *
fffaraz / dns.c
Created May 29, 2016
DNS Query Code in C with linux sockets
View dns.c
//DNS Query Program on Linux
//Author : Silver Moon (
//Dated : 29/4/2009
//Header Files
#include<stdio.h> //printf
#include<string.h> //strlen
#include<stdlib.h> //malloc
#include<sys/socket.h> //you know what this is for
#include<arpa/inet.h> //inet_addr , inet_ntoa , ntohs etc
View lsniffer.c
Packet sniffer using libpcap library
#include<stdlib.h> // for exit()
#include<string.h> //for memset
#include<arpa/inet.h> // for inet_ntoa()
fffaraz /
Last active Nov 6, 2021
CS 306 - Linux/UNIX Programming
fffaraz /
Created Nov 25, 2016
Python YouTube Playlist Link Collector
from bs4 import BeautifulSoup
import requests
def getPlaylistLinks(url):
sourceCode = requests.get(url).text
soup = BeautifulSoup(sourceCode, 'html.parser')
domain = ''
for link in soup.find_all("a", {"dir": "ltr"}):
href = link.get('href')
if href.startswith('/watch?'):
fffaraz / portscanner.c
Last active Aug 15, 2021
Port scanner code in c
View portscanner.c
#include "stdio.h"
#include "sys/socket.h"
#include "errno.h"
#include "netdb.h"
#include "string.h"
#include "stdlib.h"
int main(int argc , char **argv)
struct hostent *host;
View gcd_prob.cpp
#include <iostream>
#include <random>
#include <bits/stdc++.h>
using namespace std;
int main()
std::random_device m_device{};
std::mt19937 m_generator{m_device()};
View telegram_emojis.cpp
#include <QCoreApplication>
#include <QFile>
#include <QDataStream>
#include <QDebug>
#include <iostream>
namespace Ui {
namespace Emoji {
constexpr auto kPostfix = 0xFE0FU;
class One {};