Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Focusing

Faraz Fallahi fffaraz

🚀
Focusing
View GitHub Profile
@fffaraz
fffaraz / projects.md
Last active Dec 3, 2021
Project Ideas List
View projects.md

http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/

Text

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
fffaraz / tcp_syn.py
Created Jul 30, 2014
TCP syn flood in python using raw sockets
View tcp_syn.py
'''
Syn flood program in python using raw sockets (Linux)
http://www.binarytides.com/python-syn-flood-program-raw-sockets-linux/
Silver Moon (m00n.silv3r@gmail.com)
'''
# some imports
import socket, sys
from struct import *
@fffaraz
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 (m00n.silv3r@gmail.com)
//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<pcap.h>
#include<stdio.h>
#include<stdlib.h> // for exit()
#include<string.h> //for memset
#include<sys/socket.h>
#include<arpa/inet.h> // for inet_ntoa()
@fffaraz
fffaraz / resources.md
Last active Nov 6, 2021
CS 306 - Linux/UNIX Programming
View resources.md
@fffaraz
fffaraz / bs4.py
Created Nov 25, 2016
Python YouTube Playlist Link Collector
View bs4.py
from bs4 import BeautifulSoup
import requests
def getPlaylistLinks(url):
sourceCode = requests.get(url).text
soup = BeautifulSoup(sourceCode, 'html.parser')
domain = 'https://www.youtube.com'
for link in soup.find_all("a", {"dir": "ltr"}):
href = link.get('href')
if href.startswith('/watch?'):
@fffaraz
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 {};