# %% Imports
from __future__ import annotations
from collections.abc import Iterable
import datetime as dt
from functools import partial
import lzma
import pickle| /* | |
| Check SSE/AVX support. | |
| This application can detect the instruction support of | |
| SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, SSE4a, SSE5, and AVX. | |
| */ | |
| #include <iostream> | |
| #include <string.h> | |
| #include <stdint.h> | |
| #ifdef _MSC_VER |
| #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) | |
| #define NETWORK_WINDOWS | |
| #define _CRT_RAND_S | |
| typedef int ssize_t; | |
| #define WIN32_LEAN_AND_MEAN | |
| #include <windows.h> | |
| #include <winsock2.h> | |
| #include <ws2tcpip.h> |
| #include <stdio.h> | |
| #define clear() printf("\033[H\033[J") | |
| #define gotoxy(x,y) printf("\033[%d;%dH", (y), (x)) | |
| int main(void) | |
| { | |
| int number; | |
| clear(); |
OpenSSL Certificate Parsing
Zakir Durumeric | October 13, 2013
While OpenSSL has become one of the defacto libraries for performing SSL and TLS operations, the library is surprisingly opaque and its documentation is, at times, abysmal. As part of our recent research, we have been performing Internet-wide scans of HTTPS hosts in order to better understand the HTTPS ecosystem (Analysis of the HTTPS Certificate Ecosystem, ZMap: Fast Internet-Wide Scanning and its Security Applications). We use OpenSSL for many of these operations including parsing X.509 certificates. However, in order to parse and validate certificates, our team had to dig through parts of the OpenSSL code base and multiple sources of documention to find the correct functions to parse each piece of data. This post is intended to document many o
| #!/bin/bash | |
| # This Works is placed under the terms of the Copyright Less License, | |
| # see file COPYRIGHT.CLL. USE AT OWN RISK, ABSOLUTELY NO WARRANTY. | |
| # | |
| # COPYRIGHT.CLL can be found at http://permalink.de/tino/cll | |
| # (CLL is CC0 as long as not covered by any Copyright) | |
| OOPS() { echo "OOPS: $*" >&2; exit 23; } | |
| [ -z "`pidof openssl`" ] || OOPS "openssl running, consider: killall openssl" |
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
FILE *pp = popen("wget -q -O- http://celestrak.com/NORAD/elements/stations.txt",
"r");- Install
qemu-user-static(one time) - Copy
qemu-arm-staticto/path/to/chroot/binto execute ARM binaries on x86_64 (any time a new chroot environment is set up) - Mount
proc,devandsys:for i in proc sys dev; do sudo mount -o bind /$i /path/to/chroot/$i; done - Chroot into the directory:
sudo chroot /path/to/chroot qemu-arm-static /bin/bash - Do stuff,
Ctrl+Dto exit. - Unmount
proc,devandsys:for i in proc sys dev; do sudo umount /path/to/chroot/$i; done syncany changes you made.
The basic flow of the process of compiling the linux kernel for the ADRV with customized pin layout and device configuration is as follows:
- Cloning the HDL repo, switching to a stable release (and obtaining the relevant release of Vivado HLx Design Suite).
- Executing
makein the relevant (ADRV9364Z7020) project directory to make the Vivado project for the SOM. - Patching the
system_top.vfiles andcommon/*.xdcfiles for the project as required, then synthesize, implement and generate the bitstream for the design. Go to File &rarr Export &rarr Export Hardware to export the.hdffile. - Follow the procedure here to build the device tree blob, which exposes the devices enabled in the HDL design phase to the Linux kernel. ~~Note that, you may need to edit the
.dtsor.dtsifiles generated during this process to enablesysfsdrivers for some de