| //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 |
| // g++ -O3 -std=c++17 benchmark.cpp -o benchmark | |
| #include <iostream> | |
| #include <vector> | |
| #include <chrono> | |
| #include <iomanip> | |
| #include <cstdint> | |
| #include <string> | |
| #include <sstream> | |
| #include <random> |
| 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?'): |
- Tim Jones homepage (author of primary textbook, note that book code is only on cdrom with book)
- GNU/Linux Application Programming (1st ed.) by Tim Jones (much of first edition of Jones text on Google Books)
- Beginning Linux Programming (4th ed.) by Matthew and Stones (alternative text, can download code from this site)
- free download of Beginning Linux Programming (4th ed.)
| // https://leetcode.com/problems/fizz-buzz/ | |
| class Solution { | |
| public: | |
| const char* fizzbuzz[4] = { nullptr, "Fizz", "Buzz", "FizzBuzz" }; | |
| const uint8_t pattern[15] = { 3, 0, 0, 1, 0, 2, 1, 0, 0, 1, 2, 0, 1, 0, 0 }; | |
| vector<string> fizzBuzz(int n) | |
| { | |
| vector<string> result(n); | |
| for (int i = 1, m = 1; i <= n; ++i, ++m) { |
| <?php | |
| // https://blog.haschek.at/2017/how-to-defend-your-website-with-zip-bombs.html | |
| // dd if=/dev/zero bs=1M count=10240 | gzip > 10G.gzip | |
| $agent = lower($_SERVER['HTTP_USER_AGENT']); | |
| //check for nikto, sql map or "bad" subfolders which only exist on wordpress | |
| if (strpos($agent, 'nikto') !== false || strpos($agent, 'sqlmap') !== false || startswith($url,'wp-') || startswith($url,'wordpress') || startswith($url,'wp/')) | |
| { | |
| sendBomb(); |
| #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; |
This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.
Let’s begin.
First of all, there are some concepts that one must unlearn from ipv4:
Concept 1
http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-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.