View detect-macchanger.c
This file contains 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 <stdint.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <limits.h> | |
#ifdef _OPENMP | |
#include <omp.h> | |
#endif | |
/* | |
* macchanger --random uses the following code to generate random MAC addresses: |
View ppmp-bootstrap.c
This file contains 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
#define XXX_CM_UP_0(P,a,b,c,d,e,f,...) XXX_CM_PASS_UP_1 (XXX_CM_PASS_DN_0 (XXX__##f(,P##a,P##b,P##c,P##d,P##e,P##__VA_ARGS__))) | |
#define XXX_CM_UP_1(P,a,b,c,d,e,f,...) XXX_CM_PASS_UP_2 (XXX_CM_PASS_DN_1 (XXX__##f(,P##a,P##b,P##c,P##d,P##e,P##__VA_ARGS__))) | |
#define XXX_CM_UP_2(P,a,b,c,d,e,f,...) XXX_CM_PASS_UP_3 (XXX_CM_PASS_DN_2 (XXX__##f(,P##a,P##b,P##c,P##d,P##e,P##__VA_ARGS__))) | |
#define XXX_CM_UP_3(P,a,b,c,d,e,f,...) XXX_CM_PASS_UP_4 (XXX_CM_PASS_DN_3 (XXX__##f(,P##a,P##b,P##c,P##d,P##e,P##__VA_ARGS__))) | |
#define XXX_CM_UP_4(P,a,b,c,d,e,f,...) XXX_CM_PASS_UP_5 (XXX_CM_PASS_DN_4 (XXX__##f(,P##a,P##b,P##c,P##d,P##e,P##__VA_ARGS__))) | |
#define XXX_CM_UP_5(P,a,b,c,d,e,f,...) XXX_CM_PASS_UP_6 (XXX_CM_PASS_DN_5 (XXX__##f(,P##a,P##b,P##c,P##d,P##e,P##__VA_ARGS__))) | |
#define XXX_CM_UP_6(P,a,b,c,d,e,f,...) XXX_CM_PASS_UP_7 (XXX_CM_PASS_DN_6 (XXX__##f(,P##a,P##b,P##c,P##d,P##e,P##__VA_ARGS__))) | |
#define XXX_CM_UP_7(P,a,b,c,d,e,f,...) XXX_CM_PASS_UP_8 (XXX_CM_PASS_DN_7 (XXX__##f(,P##a,P##b,P##c,P##d,P##e,P##__VA_AR |
View gen.c
This file contains 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 <time.h> | |
static const char mon_name[12][3] = { | |
"Jan", "Feb", "Mar", "Apr", "May", "Jun", | |
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" | |
}; | |
int | |
main(void) |
View xor.c
This file contains 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> | |
#define E2(...) E1(E1(E1(E1(E1(E1(E1(E1(E1(E1(__VA_ARGS__)))))))))) | |
#define E1(...) __VA_ARGS__ | |
#define EMPTY() | |
#define DEFER1(m) m EMPTY() | |
#define APPLY3(F,a,m,k) F(a,0,m,k), F(a,1,m,k), F(a,2,m,k), \ | |
F(a,3,m,k), F(a,4,m,k), F(a,5,m,k), \ | |
F(a,6,m,k), F(a,7,m,k), F(a,8,m,k), \ |
View main.c
This file contains 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> | |
#define E2(...) E1(E1(E1(E1(E1(E1(E1(E1(E1(E1(__VA_ARGS__)))))))))) | |
#define E1(...) __VA_ARGS__ | |
#define EMPTY() | |
#define DEFER1(m) m EMPTY() | |
#define APPLY3(F,a,x,y,v) F(a,0,x,y,v), F(a,1,x,y,v), F(a,2,x,y,v), \ | |
F(a,3,x,y,v), F(a,4,x,y,v), F(a,5,x,y,v), \ | |
F(a,6,x,y,v), F(a,7,x,y,v), F(a,8,x,y,v), \ |
View torus.c
This file contains 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
i,j,k,L; | |
#include <time.h> | |
float X,Y,Z,l,t,x,y,z, | |
A,S,C;r(X,Y)float*X,*Y;{A | |
=*X,S=sin(l),C=cos(l);*X=A*C | |
-*Y*S,*Y=A*S+*Y *C;}main() | |
{char*p,s[L=( W+1)*H]; | |
printf("\x1b" "[2J");r | |
:p=s;for(i=0; i<H;++i, | |
*p++=10)for(j =0;j<W; |
View list.c
This file contains 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
struct list { struct list *list; }; | |
struct list * | |
list(struct list *list) | |
{ | |
list: | |
if (list->list && (list = list->list)) | |
goto list; | |
return list; | |
} |
View random.h
This file contains 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
/* | |
* 5.2 Uniform real distribution ----------------------------------------------- | |
* | |
* Generating uniform random floating-point numbers might seem easy at first | |
* glance, just cast the output of a PRNG to the desired float type and divide | |
* by the biggest possible output of the PRNG to obtain a random float between | |
* 0 and 1 that can now be scaled up. | |
* Though as before this straightforward approach is biased. | |
* | |
* For the next part, I assume you are already acquainted with the IEEE 754 |