text:
# systemd

#### Table of Contents

1. [Overview](#overview)
2. [Module Description - What the module does and why it is useful](#module-description)
3. [Setup - The basics of getting started with systemd](#setup)
4. [Usage - Configuration options and additional functionality](#usage)
5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
5. [Limitations - OS compatibility, etc.](#limitations)

## Overview

Puppet interface to systemctl.

This module was creatd to manage systemd services under RHEL/CentOS 7+. In this
version you can do simple things like enable, disable and status services. The
plan is to extend this module to include most of the commonly used options and
capabilities of SystemD.

## Module Description

"The systemd system and service manager is responsible for controlling how services are started, stopped and otherwise managed on Red Hat Enterprise Linux 7 systems. By offering on-demand service start-up and better transactional dependency controls, systemd dramatically reduces start up times. As a systemd user, you can prioritize critical services over less important services.

Although the systemd process replaces the init process (quite literally, /sbin/init is now a symbolic link to /usr/lib/systemd/systemd) for starting services at boot time and changing runlevels, systemd provides much more control than the init process does while still supporting existing init scripts. Here are some examples of the features of systemd:

* **Logging:** From the moment that the initial RAM disk is mounted to start the Linux kernel to final shutdown of the system, all log messages are stored by the new systemd journal. Before the systemd journal existed, initial boot messages were lost, requiring that you try to watch the screen as messages scrolled by to debug boot problems.
Now, all system messages come in on a single stream and are stored in the /run directory. Messages can then be consumed by the rsyslog facility (and redirected to traditional log files in the /var/log directory or to remote log servers) or displayed using the journalctl command across a variety of attributes.

* **Dependencies:** With systemd, an explicit set of dependencies can be defined for each service, instead of being implied by boot order. This allows a service to start at any point that its dependencies are met. In this way, many services can start at the same time, making the boot process faster. Likewise, complex sets of dependencies can be set up, so the exact requirements of a service (such as storage availability or file system checking) can be met before a service starts.

* **Cgroups:** Services are identified by Cgroups, which allow every component of a service to be managed. For example, the older System V init scripts would start a service by launching a process which itself might start other child processes. When the service was killed, it was hoped that the parent process would do the right thing and kill its children. By using Cgroups, all components of a service have a tag that can be used to make sure that all of those components are properly started or stopped.

* **Activating services:** Services don't just have to be always running or not running based on runlevel, as they were previous to systemd. Services can now be activated based on path, socket, bus, timer, or hardware activation. Likewise, because systemd can set up sockets, if a process handling communications goes away, the process that starts up in its place can pick up the next message from the socket. To the clients using the service, it can look as though the service continued without interruption.

* **More than services:** Instead of just managing services, systemd can manage several different unit types. These unit types include:

 * **Devices:** Create and use devices.
 * **Mounts and automounts:** Mount file systems upon request or automount a file system based on a request for a file or directory within that file system.
 * **Paths:** Check the existence of files or directories or create them as needed.
 * **Services:** Start a service, which often means launching a service daemon and related components.
 * **Slices:** Divide up computer resources (such as CPU and memory) and apply them to selected units.
 * **Snapshots:** Take snapshots of the current state of the system.
 * **Sockets:** Set up sockets to allow communication paths to processes that can remain in place, even if the underlying process needs to restart.
 * **Swaps:** Create and use swap files or swap partitions.
 * **Targets:** Manage a set of services under a single unit, represented by a target name rather than a runlevel number.
 * **Timers:** Trigger actions based on a timer.

* **Resource management**

 * The fact that each systemd unit is always associated with its own cgroup lets you control the amount of resources each service can use. For example, you can set a percent of CPU usage by service which can put a cap on the total amount of CPU that service can use -- in other words, spinning off more processes won't allow more resources to be consumed by the service. Prior to systemd, nice levels were often used to prevent processes from hogging precious CPU time. With systemd's use of cgroups, precise limits can be set on CPU and memory usage, as well as other resources.
 * A feature called slices lets you slice up many different types of system resources and assign them to users, services, virtual machines, and other units. Accounting is also done on these resources, which can allow you to charge customers for their resource usage."

**(https://access.redhat.com/articles/754933)**

## Setup

## Usage

Simple exampole to disable mysqld from starting at boot:

    systemctl{'mysql':
      command =>  'disable',
    }

Or you can use hiera like:
```
---
systemd::systemctl:
  'ntpd':
    command: 'mask'
  'multi-user.target':
    command: 'disable'
```

## Reference

## Limitations

Only tested with RedHat/CentOS 7.

## Contributing

You are most welcome to extend this module. Please do submit your chaqnges so
everyone can benefit. Be sure to write tests! :)

repository: NexusIS/puppet-systemd

repo_name: NexusIS/puppet-systemd


text:
### [CVE-2022-0847](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0847)
![](https://img.shields.io/static/v1?label=Product&message=kernel&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-665-%3ECWE-281&color=brighgreen)

### Description

A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe and push_pipe functions in the Linux kernel and could thus contain stale values. An unprivileged local user could use this flaw to write to pages in the page cache backed by read only files and as such escalate their privileges on the system.

### POC

#### Reference
- http://packetstormsecurity.com/files/166229/Dirty-Pipe-Linux-Privilege-Escalation.html
- http://packetstormsecurity.com/files/166230/Dirty-Pipe-SUID-Binary-Hijack-Privilege-Escalation.html
- http://packetstormsecurity.com/files/166258/Dirty-Pipe-Local-Privilege-Escalation.html
- https://dirtypipe.cm4all.com/

#### Github
- https://github.com/0xIronGoat/dirty-pipe
- https://github.com/0xStrygwyr/OSCP-Guide
- https://github.com/0xTen/pwn-gym
- https://github.com/0xeremus/dirty-pipe-poc
- https://github.com/0xr1l3s/CVE-2022-0847
- https://github.com/0xsyr0/OSCP
- https://github.com/2xYuan/CVE-2022-0847
- https://github.com/4O4errorrr/TP_be_root
- https://github.com/4bhishek0/CVE-2022-0847-Poc
- https://github.com/4luc4rdr5290/CVE-2022-0847
- https://github.com/ARPSyndicate/cvemon
- https://github.com/Al1ex/CVE-2022-0847
- https://github.com/Al1ex/LinuxEelvation
- https://github.com/AlexisAhmed/CVE-2022-0847-DirtyPipe-Exploits
- https://github.com/AnastasiaLomova/PR1
- https://github.com/AnastasiaLomova/PR1.1
- https://github.com/Arinerron/CVE-2022-0847-DirtyPipe-Exploit
- https://github.com/ArrestX/--POC
- https://github.com/Awrrays/Pentest-Tips
- https://github.com/AyoubNajim/cve-2022-0847dirtypipe-exploit
- https://github.com/BlizzardEternity/CVE-2022-0847
- https://github.com/BlizzardEternity/DirtyPipe-Android
- https://github.com/BlizzardEternity/dirtypipez-exploit
- https://github.com/CVEDB/PoC-List
- https://github.com/CVEDB/awesome-cve-repo
- https://github.com/CVEDB/top
- https://github.com/CYB3RK1D/CVE-2022-0847-POC
- https://github.com/Ch4nc3n/PublicExploitation
- https://github.com/DanaEpp/pwncat_dirtypipe
- https://github.com/DataDog/dirtypipe-container-breakout-poc
- https://github.com/DataFox/CVE-2022-0847
- https://github.com/DevataDev/PiracyTools
- https://github.com/DylanBarbe/dirty-pipe-clone-4-root
- https://github.com/DylanBarbe/hj
- https://github.com/EGI-Federation/SVG-advisories
- https://github.com/EagleTube/CVE-2022-0847
- https://github.com/FeFi7/attacking_embedded_linux
- https://github.com/FedericoGaribay/Tarea-exploit
- https://github.com/Getshell/LinuxTQ
- https://github.com/GibzB/THM-Captured-Rooms
- https://github.com/Greetdawn/CVE-2022-0847-DirtyPipe
- https://github.com/Greetdawn/CVE-2022-0847-DirtyPipe-
- https://github.com/Gustavo-Nogueira/Dirty-Pipe-Exploits
- https://github.com/Ha0-Y/kernel-exploit-cve
- https://github.com/HadessCS/Awesome-Privilege-Escalation
- https://github.com/IHenakaarachchi/debian11-dirty_pipe-patcher
- https://github.com/ITMarcin2211/CVE-2022-0847-DirtyPipe-Exploit
- https://github.com/Ignitetechnologies/Linux-Privilege-Escalation
- https://github.com/JERRY123S/all-poc
- https://github.com/Jean-Francois-C/Boot2root-CTFs-Writeups
- https://github.com/JlSakuya/CVE-2022-0847-container-escape
- https://github.com/JlSakuya/Linux-Privilege-Escalation-Exploits
- https://github.com/KayCHENvip/vulnerability-poc
- https://github.com/LP-H4cmilo/CVE-2022-0847_DirtyPipe_Exploits
- https://github.com/LudovicPatho/CVE-2022-0847
- https://github.com/LudovicPatho/CVE-2022-0847_dirty-pipe
- https://github.com/Ly0nt4r/OSCP
- https://github.com/MCANMCAN/TheDirtyPipeExploit
- https://github.com/ManciSee/M6__Insecure_Authorization
- https://github.com/Meowmycks/OSCPprep-Cute
- https://github.com/Meowmycks/OSCPprep-Sar
- https://github.com/Meowmycks/OSCPprep-hackme1
- https://github.com/Metarget/metarget
- https://github.com/Miraitowa70/POC-Notes
- https://github.com/Mr-xn/Penetration_Testing_POC
- https://github.com/MrP1xel/CVE-2022-0847-dirty-pipe-kernel-checker
- https://github.com/Mustafa1986/CVE-2022-0847-DirtyPipe-Exploit
- https://github.com/Nekoox/dirty-pipe
- https://github.com/NetKingJ/awesome-android-security
- https://github.com/NxPnch/Linux-Privesc
- https://github.com/Patocoh/Research-Dirty-Pipe
- https://github.com/PenTestical/linpwn
- https://github.com/Qwertozavr/PR1_3
- https://github.com/Qwertozavr/PR1_3.2
- https://github.com/Qwertozavr/PR1_TRPP
- https://github.com/RACHO-PRG/Linux_Escalada_Privilegios
- https://github.com/SYRTI/POC_to_review
- https://github.com/Shadowven/Vulnerability_Reproduction
- https://github.com/Shotokhan/cve_2022_0847_shellcode
- https://github.com/SnailDev/github-hot-hub
- https://github.com/Snoopy-Sec/Localroot-ALL-CVE
- https://github.com/T4t4ru/CVE-2022-0847
- https://github.com/Tanq16/link-hub
- https://github.com/Threekiii/Awesome-POC
- https://github.com/Turzum/ps-lab-cve-2022-0847
- https://github.com/Udyz/CVE-2022-0847
- https://github.com/UgoDasseleer/write-up-Intermediate-Nmap
- https://github.com/V0WKeep3r/CVE-2022-0847-DirtyPipe-Exploit
- https://github.com/VinuKalana/DirtyPipe-CVE-2022-0847
- https://github.com/WhooAmii/POC_to_review
- https://github.com/XmasSnowISBACK/CVE-2022-0847-DirtyPipe-Exploits
- https://github.com/ZWDeJun/ZWDeJun
- https://github.com/adavarski/HomeLab-Proxmox-k8s-DevSecOps-playground
- https://github.com/adavarski/HomeLab-k8s-DevSecOps-playground
- https://github.com/ahrixia/CVE_2022_0847
- https://github.com/airbus-cert/dirtypipe-ebpf_detection
- https://github.com/ajith737/Dirty-Pipe-CVE-2022-0847-POCs
- https://github.com/al4xs/CVE-2022-0847-Dirty-Pipe
- https://github.com/antx-code/CVE-2022-0847
- https://github.com/arttnba3/CVE-2022-0847
- https://github.com/aruncs31s/Ethical-h4ckers.github.io
- https://github.com/aruncs31s/ethical-hacking
- https://github.com/atksh/Dirty-Pipe-sudo-poc
- https://github.com/b4dboy17/Dirty-Pipe-Oneshot
- https://github.com/babyshen/CVE-2022-0847
- https://github.com/badboy-sft/Dirty-Pipe-Oneshot
- https://github.com/badboycxcc/script
- https://github.com/basharkey/CVE-2022-0847-dirty-pipe-checker
- https://github.com/bbaranoff/CVE-2022-0847
- https://github.com/beruangsalju/LocalPrivelegeEscalation
- https://github.com/beruangsalju/LocalPrivilegeEscalation
- https://github.com/binganao/vulns-2022
- https://github.com/bohr777/cve-2022-0847dirtypipe-exploit
- https://github.com/boy-hack/zsxq
- https://github.com/brant-ruan/poc-demo
- https://github.com/breachnix/dirty-pipe-poc
- https://github.com/bsauce/kernel-exploit-factory
- https://github.com/bsauce/kernel-security-learning
- https://github.com/c0ntempt/CVE-2022-0847
- https://github.com/carlosevieira/Dirty-Pipe
- https://github.com/chenaotian/CVE-2022-0185
- https://github.com/chenaotian/CVE-2022-0847
- https://github.com/crac-learning/CVE-analysis-reports
- https://github.com/crowsec-edtech/Dirty-Pipe
- https://github.com/crusoe112/DirtyPipePython
- https://github.com/cspshivam/CVE-2022-0847-dirty-pipe-exploit
- https://github.com/cyberanand1337x/bug-bounty-2022
- https://github.com/d-rn/vulBox
- https://github.com/dadhee/CVE-2022-0847_DirtyPipeExploit
- https://github.com/decrypthing/CVE_2022_0847
- https://github.com/drapl0n/dirtypipe
- https://github.com/e-hakson/OSCP
- https://github.com/edr1412/Dirty-Pipe
- https://github.com/edsonjt81/CVE-2022-0847-DirtyPipe-
- https://github.com/edsonjt81/CVE-2022-0847-Linux
- https://github.com/edsonjt81/Linux-Privilege-Escalation
- https://github.com/eduquintanilha/CVE-2022-0847-DirtyPipe-Exploits
- https://github.com/eljosep/OSCP-Guide
- https://github.com/emmaneugene/CS443-project
- https://github.com/eremus-dev/Dirty-Pipe-sudo-poc
- https://github.com/eric-glb/dirtypipe
- https://github.com/febinrev/dirtypipez-exploit
- https://github.com/felixfu59/kernel-hack
- https://github.com/flux10n/CVE-2022-0847-DirtyPipe-Exploits
- https://github.com/githublihaha/DirtyPIPE-CVE-2022-0847
- https://github.com/greenhandatsjtu/CVE-2022-0847-Container-Escape
- https://github.com/gyaansastra/CVE-2022-0847
- https://github.com/hheeyywweellccoommee/CVE-2022-0847-gfobj
- https://github.com/hktalent/TOP
- https://github.com/hoanbi1812000/hoanbi1812000
- https://github.com/hugefiver/mystars
- https://github.com/hugs42/infosec
- https://github.com/icontempt/CVE-2022-0847
- https://github.com/ih3na/debian11-dirty_pipe-patcher
- https://github.com/imfiver/CVE-2022-0847
- https://github.com/iohubos/iohubos
- https://github.com/irwx777/CVE-2022-0847
- https://github.com/isaiahsimeone/COMP3320-VAPT
- https://github.com/jamesbrunet/dirtypipe-writeup
- https://github.com/joeymeech/CVE-2022-0847-Exploit-Implementation
- https://github.com/jonathanbest7/cve-2022-0847
- https://github.com/jpts/CVE-2022-0847-DirtyPipe-Container-Breakout
- https://github.com/kaosagnt/ansible-everyday
- https://github.com/karimhabush/cyberowl
- https://github.com/kdn111/linux-kernel-exploitation
- https://github.com/khanhdn111/linux-kernel-exploitation
- https://github.com/khanhdz-06/linux-kernel-exploitation
- https://github.com/khanhdz191/linux-kernel-exploitation
- https://github.com/khanhhdz/linux-kernel-exploitation
- https://github.com/khanhhdz06/linux-kernel-exploitation
- https://github.com/khanhnd123/linux-kernel-exploitation
- https://github.com/knqyf263/CVE-2022-0847
- https://github.com/kun-g/Scraping-Github-trending
- https://github.com/kwxk/Rutgers_Cyber_Range
- https://github.com/lewiswu1209/sif
- https://github.com/liamg/liamg
- https://github.com/liamg/traitor
- https://github.com/logit507/logit507
- https://github.com/logm1lo/CVE-2022-0847_DirtyPipe_Exploits
- https://github.com/lonnyzhang423/github-hot-hub
- https://github.com/lucksec/CVE-2022-0847
- https://github.com/makoto56/penetration-suite-toolkit
- https://github.com/manas3c/CVE-POC
- https://github.com/marksowell/my-stars
- https://github.com/marksowell/starred
- https://github.com/marksowell/stars
- https://github.com/merlinepedra/TRAITOR
- https://github.com/merlinepedra25/TRAITOR
- https://github.com/mhanief/dirtypipe
- https://github.com/michaelklaan/CVE-2022-0847-Dirty-Pipe
- https://github.com/mrchucu1/CVE-2022-0847-Docker
- https://github.com/murchie85/twitterCyberMonitor
- https://github.com/mutur4/CVE-2022-0847
- https://github.com/nanaao/Dirtypipe-exploit
- https://github.com/nanaao/dirtyPipe-automaticRoot
- https://github.com/nitishbadole/oscp-note-3
- https://github.com/nomi-sec/PoC-in-GitHub
- https://github.com/notl0cal/dpipe
- https://github.com/notmariekondo/notmariekondo
- https://github.com/orsuprasad/CVE-2022-0847-DirtyPipe-Exploits
- https://github.com/parkjunmin/CTI-Search-Criminalip-Search-Tool
- https://github.com/pen4uin/awesome-cloud-native-security
- https://github.com/pen4uin/cloud-native-security
- https://github.com/pentestblogin/pentestblog-CVE-2022-0847
- https://github.com/peterspbr/dirty-pipe-otw
- https://github.com/phuonguno98/CVE-2022-0847-DirtyPipe-Exploits
- https://github.com/pipiscrew/timeline
- https://github.com/pmihsan/Dirty-Pipe-CVE-2022-0847
- https://github.com/polygraphene/DirtyPipe-Android
- https://github.com/puckiestyle/CVE-2022-0847
- https://github.com/qwert419/linux-
- https://github.com/r1is/CVE-2022-0847
- https://github.com/rahul1406/cve-2022-0847dirtypipe-exploit
- https://github.com/realbatuhan/dirtypipetester
- https://github.com/rexpository/linux-privilege-escalation
- https://github.com/s3mPr1linux/CVE_2022_0847
- https://github.com/sa-infinity8888/Dirty-Pipe-CVE-2022-0847
- https://github.com/sarutobi12/sarutobi12
- https://github.com/scopion/dirty-pipe
- https://github.com/si1ent-le/CVE-2022-0847
- https://github.com/siberiah0h/CVE-CNVD-HUB
- https://github.com/siegfrkn/CSCI5403_CVE20220847_Detection
- https://github.com/soosmile/POC
- https://github.com/source-xu/docker-vuls
- https://github.com/ssr-111/linux-kernel-exploitation
- https://github.com/stefanoleggio/dirty-pipe-cola
- https://github.com/stfnw/Debugging_Dirty_Pipe_CVE-2022-0847
- https://github.com/taielab/awesome-hacking-lists
- https://github.com/teamssix/container-escape-check
- https://github.com/terabitSec/dirtyPipe-automaticRoot
- https://github.com/theo-goetzinger/TP_be_root
- https://github.com/tiann/DirtyPipeRoot
- https://github.com/tmoneypenny/CVE-2022-0847
- https://github.com/trhacknon/CVE-2022-0847-DirtyPipe-Exploit
- https://github.com/trhacknon/Pocingit
- https://github.com/trhacknon/dirtypipez-exploit
- https://github.com/tstromberg/ioc-bench
- https://github.com/tufanturhan/CVE-2022-0847-L-nux-PrivEsc
- https://github.com/uhub/awesome-c
- https://github.com/ukmihiran/Rubber_Ducky_Payloads
- https://github.com/veritas501/pipe-primitive
- https://github.com/versatilexec/CVE_2022_0847
- https://github.com/vknc/vknc.github.io
- https://github.com/weeka10/-hktalent-TOP
- https://github.com/wpressly/exploitations
- https://github.com/x90hack/vulnerabilty_lab
- https://github.com/xairy/linux-kernel-exploitation
- https://github.com/xnderLAN/CVE-2022-0847
- https://github.com/xndpxs/CVE-2022-0847
- https://github.com/xsudoxx/OSCP
- https://github.com/xuetusummer/Penetration_Testing_POC
- https://github.com/yoeelingBin/CVE-2022-0847-Container-Escape
- https://github.com/z3dc0ps/awesome-linux-exploits

license: MIT

repository: trickest/cve

branch_name: refs/heads/main

extension: md

gha_language: HTML

gha_license_id: MIT

license_type: permissive

repo_name: trickest/cve


text:
# Tools

Martin has a few additional tools that can be used to interact with the data.

## MBTiles tool
A small utility that allows users to interact with the `*.mbtiles` files from the command line. Use `mbtiles --help` to see a list of available commands, and `mbtiles <command> --help` to see help for a specific command.

This tool can be installed by compiling the latest released version with `cargo install martin-mbtiles`, or by downloading a pre-built binary from the [releases page](https://github.com/maplibre/martin/releases/latest).

### meta-get
Retrieve raw metadata value by its name. The value is printed to stdout without any modifications.  For example, to get the `description` value from an mbtiles file:

```shell
mbtiles meta-get my_file.mbtiles description
```

### copy
Copy an mbtiles file, optionally filtering its content by zoom levels. Can also flatten mbtiles file from de-duplicated tiles to a simple table structure.

```shell
mbtiles copy src_file.mbtiles dst_file.mbtiles \
        --min-zoom 0 --max-zoom 10 --force-simple
```

Copy command can also be used to compare two mbtiles files and generate a diff.
```shell
mbtiles copy src_file.mbtiles diff_file.mbtiles \
        --force-simple --diff-with-file modified_file.mbtiles
```

### apply-diff
Apply the diff file generated from `copy` command above to an mbtiles file. The diff file can be applied to the `src_file.mbtiles` elsewhere, to avoid copying/transmitting the entire modified dataset.
```shell
mbtiles apply_diff src_file.mbtiles diff_file.mbtiles
```

Another way to apply the diff is to use the `sqlite3` command line tool directly. This SQL will delete all tiles from `src_file.mbtiles` that are set to `NULL` in `diff_file.mbtiles`, and then insert or update all new tiles from `diff_file.mbtiles` into `src_file.mbtiles`. The name of the diff file is passed as a query parameter to the sqlite3 command line tool, and then used in the SQL statements.
```shell
sqlite3 src_file.mbtiles \
  -bail \
  -cmd ".parameter set @diffDbFilename diff_file.mbtiles" \
  "ATTACH DATABASE @diffDbFilename AS diffDb;" \
  "DELETE FROM tiles WHERE (zoom_level, tile_column, tile_row) IN (SELECT zoom_level, tile_column, tile_row FROM diffDb.tiles WHERE tile_data ISNULL);" \
  "INSERT OR REPLACE INTO tiles (zoom_level, tile_column, tile_row, tile_data) SELECT * FROM diffDb.tiles WHERE tile_data NOTNULL;"
```

**_NOTE:_** Both of these methods for applying a diff _only_ work for mbtiles files in the simple tables format; they do _not_ work for mbtiles files in deduplicated format.

repository: sunbinkeke/martin

branch_name: refs/heads/master

repo_name: sunbinkeke/martin


text:
# CONTRIBUTING

We are using [GitHub Actions](https://github.com/features/actions) as a continuous integration system.

For details, take a look at the following workflow configuration files:

- [`workflows/integrate.yaml`](workflows/integrate.yaml)
- [`workflows/merge.yaml`](workflows/merge.yaml)
- [`workflows/release.yaml`](workflows/release.yaml)
- [`workflows/renew.yaml`](workflows/renew.yaml)
- [`workflows/triage.yaml`](workflows/triage.yaml)
- [`workflows/update.yaml`](workflows/update.yaml)

## Coding Standards

We are using [`ergebnis/composer-normalize`](https://github.com/ergebnis/composer-normalize) to normalize `composer.json`.

We are using [`yamllint`](https://github.com/adrienverge/yamllint) to enforce coding standards in YAML files.

If you do not have `yamllint` installed yet, run

```sh
brew install yamllint
```

to install `yamllint`.

We are using [`friendsofphp/php-cs-fixer`](https://github.com/FriendsOfPHP/PHP-CS-Fixer) to enforce coding standards in PHP files.

Run

```sh
make coding-standards
```

to automatically fix coding standard violations.

## Dependency Analysis

We are using [`maglnet/composer-require-checker`](https://github.com/maglnet/ComposerRequireChecker) to prevent the use of unknown symbols in production code.

Run

```sh
make dependency-analysis
```

to run a dependency analysis.

## Mutation Tests

We are using [`infection/infection`](https://github.com/infection/infection) to ensure a minimum quality of the tests.

Enable `Xdebug` and run

```sh
make mutation-tests
```

to run mutation tests.

## Refactoring

We are using [`rector/rector`](https://github.com/rectorphp/rector) to automatically refactor code.

Run

```sh
make refactoring
```

to automatically refactor code.

## Security Analysis

We are using [`composer`](https://github.com/composer/composer) to run a security analysis.

Run

```sh
make security-analysis
```

to run a security analysis.

## Static Code Analysis

We are using [`vimeo/psalm`](https://github.com/vimeo/psalm) to statically analyze the code.

Run

```sh
make static-code-analysis
```

to run a static code analysis.

We are also using the baseline feature of [`vimeo/psalm`](https://psalm.dev/docs/running_psalm/dealing_with_code_issues/#using-a-baseline-file).

Run

```sh
make static-code-analysis-baseline
```

to regenerate the baseline in [`../psalm-baseline.xml`](../psalm-baseline.xml).

:exclamation: Ideally, the baseline should shrink over time.

## Tests

We are using [`phpunit/phpunit`](https://github.com/sebastianbergmann/phpunit) to drive the development.

Run

```sh
make tests
```

to run all the tests.

## Extra lazy?

Run

```sh
make
```

to automatically refactor code, enforce coding standards, run a static code analysis, and run tests!

## Help

:bulb: Run

```sh
make help
```

to display a list of available targets with corresponding descriptions.

repository: ergebnis/composer-normalize

gha_language: PHP

repo_name: ergebnis/composer-normalize


text:
# docker-letsencrypt-dns-digitalocean

This is a simple container to get certificates from [letsencrypt](https://letsencrypt.org/) by using dns-auth with [digitalocean](https://www.digitalocean.com/)

## Changes/Additions
    None

## How to use
    Environment variables:
        - DOMAINS (What domains to get certs for, base domain needs to be first in the list)
            - foo.com test.foo.com test2.foo.com
        - TOKEN (API Token from [digitalocean](https://cloud.digitalocean.com/settings/api/tokens)
        - ODIR (Output directory for certificates, defaults to /srv/letsencrypt/certs/)
        - SLEEP (Time to sleep between runs, defaults to 300 seconds)
        - DEBUG (Enable debug output, defaults to no)
        - STAGING (To use the staging CA url, defaults to yes)
    Mounts:
        - Recommend mounting /srv/letsencrypt/certs/ or some other directory and specifying ODIR to make sure you save your certificates
        - You can also specify /srv/letsencrypt/do_deploy.sh script that will do some actions after creating/re-newing certificates

## Staging run example
    docker run \
    -e "DOMAINS=foo.com test.foo.com" \
    -e "TOKEN=xxxxx" \
    -v ${HOME}/letsencrypt-dns:/mnt \
    -e "ODIR=/mnt/certs" \
    gibby/letsencrypt-dns-digitalocean

## Live run example
    docker run \
    -e "DOMAINS=foo.com test.foo.com" \
    -e "TOKEN=xxxxx" \
    -v ${HOME}/letsencrypt-dns:/mnt \
    -e "ODIR=/mnt/certs" \
    -e "STAGING=no" \
    gibby/letsencrypt-dns-digitalocean

## Changelog

Please refer to: [CHANGELOG.md](CHANGELOG.md)

gha_language: Shell


text:
# Responsive Layouts & Design

Welcome to Responsive Layouts & Design Workshop, a project with beginners and aspiring developers in mind. Utilizing HTML, CSS Grid, and Flexbox to achieve a simplistic yet elegant website for the greatest start up of all time; Keiko Corp.

## Project Brief

Incredibly, Bruno the CEO of Keiko Corp has built the fastest growing tech start up in Silicon Valley, without ever having launched a website. Bruno's marketing team is insisting that they need a website in order to gain the confidence of the potential clients to reach this quarters sales targets.

## Getting Started

1. First up you need to fork (make a copy) this repo to your Github account.
2. Clone (download) your fork to your computer.
3. There are two branches start and finish in the project. We will be working from the start branch to get to where the finish branch is.

## Workshop Resources

- [Codepen Profile](https://codepen.io/bdesignedwebdev)
- [GitHub repo start](https://github.com/brittneypostma/workshop-keiko-corp/tree/start)
- [GitHub repo finish](https://github.com/brittneypostma/workshop-keiko-corp)

## Additional Resources

- [Mobile Friendly Test](https://search.google.com/test/mobile-friendly)
- [Web and Mobile Design: Zero to Mastery](https://academy.zerotomastery.io/p/academy?utm_source=github&utm_campaign=keiko-corp-hf20&affcode=441520_gjue7n-1)
- [Complete Web Developer: Zero to Mastery - Advanced CSS Lectures](https://academy.zerotomastery.io/courses/697434/lectures/12738267?affcode=441520_gjue7n-1)
- [Grid Cheat Sheet](https://yoksel.github.io/grid-cheatsheet/)
- [CSS Remedy](https://github.com/jensimmons/cssremedy)
- [The Complete Guide to Grid - CSS Tricks](https://css-tricks.com/snippets/css/complete-guide-grid/)
- [CSS Layout Patterns](https://csslayout.io/patterns/)
- [One Line Layouts - Una Kravets](https://web.dev/one-line-layouts/)
- [Free CSS Grid Course - Wes Bos](https://cssgrid.io/)
- [Learn CSS Grid](https://learncssgrid.com/)
- [Article vs Section](https://www.smashingmagazine.com/2020/01/html5-article-section/)
- [MDN Section Elements](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_HTML_sections_and_outlines#Section_Elements_in_HTML5)

## Disclaimer

Keiko Corp is a fictitious company, initially fabricated back in 2018 to enrich the learning process for the students of the Junior to Senior course. Keiko Corp, Bruno & his impeccable hair have since featured in several [Zero To Mastery](https://academy.zerotomastery.io/p/academy?utm_source=github&utm_campaign=keiko-corp-hf20&affcode=441520_gjue7n-1) courses becoming the favorite topic of conversation amongst students.

repository: Macrichie/workshop-keiko-corp

repo_name: Macrichie/workshop-keiko-corp


text:
# ScreenToGif

This is the current project of ScreenToGif.

_VS 2017 and .Net 4.6.1 or newer required._

## What's new? (Version 2.17)

• You can now use different themes! Light, medium, dark and very dark are now available.
• New automated task: You can now create a task that alters the delay of each frame.
• Progress indicator: Now you can add the exact timestamp of each frame (based on the start date of the recording).
• When you start the app without any settings, the default folder where the frames are stored (Location folder) is now set to %temp% instead of a hardcoded path.
• Now you can use your arrow keys to move and resize the selection rectangles from the new recorder and from the Crop feature. Just use the three combinations of commands with Ctrl, Shift and arrow keys.
• Updated the Japanese translation.

### Fixed:

♦ When removing duplicated frames, there was no indication that the process was still going on.
♦ When applying the KeyStrokes with a margin, it would result in a wrongly sized panel.
♦ If you cancelled the video import, the progress bar would not be hidden away and the app could crash.
♦ When creating a new blank project and trying to apply the Obfuscation feature, the app would crash, because of the image depth.

### Known Bugs:

♠ Using an automated task to add the key strokes will still use the color and font settings from the main settings.
♠ When importing multiple images with different sizes at the same time, the app does not ask to resize all images to the same size.
♠ When exporting with FFmpeg, the last frame may be out of sync with the timmings of the project.
♠ With the new recorder UI: The Accept/Retry/Cancel commands are overflowing to the left when the selection is too small and to the left.

license: MS-PL

repository: Visual-Studio-projects/ScreenToGif

gha_language: C#

gha_license_id: MS-PL

repo_name: Visual-Studio-projects/ScreenToGif


text:
# Tetra

[![GoDoc](https://godoc.org/github.com/Xe/Tetra?status.svg)](https://godoc.org/github.com/Xe/Tetra)

Tetra is an extended services package for TS6 IRC daemons with Lua and
Moonscript support.

## Features

- JSON API
- Lua / Moonscript script loading
- Hooking on protocol events
- Hooking on arbitrary events
- Client/Channel/Server link tracking
- Statistics via influxdb
- Persistent data via etcd
- Atheme integration

### Things still in progress

- Feature parity with Cod
- Documentation on migration from Cod to Tetra
- Scripts being able to define webpages

Building a script for Tetra is as easy as:

```moonscript
Command "PING", ->
  "PONG"
```

## Installation

### From git

You need the following buildtime dependencies:

- `liblua5.1-dev`
- `golang`
- `libsqlite3-dev`

Example commands to set up the global environment needed for Tetra are in the
included `Dockerfile`.

```console
$ go get github.com/Xe/Tetra
$ cd $GOPATH/github.com/Xe/Tetra
```

Continue with configuration.

### From a tarball

Install `liblua5.1-dev` then extract the tarball and continue with
configuration.

## Configuration

Look at the example config, copy it to `etc/config.yaml` or set
`TETRA_CONFIG_PATH` to a file on the disk. Edit the config to your needs.

## Running

You need to set up `etcd` for runtime key->value support for Tetra. You also
need to set up InfluxxDB if you want to have Tetra track channel and server
statistics. An instance of Atheme with the XMLRPC module loaded is required.

You need the following lua rocks:

- `luasocket`
- `moonscript`
- `yaml`
- `json4lua`
- `lsqlite3`

All are available in [moonrocks](http://rocks.moonscript.org).

license: Zlib


text:
---
title: "How software engineer should invest in career growth"
author: "Wojciech Adam Koszek"
klayout: post
description: >
  How to invest money in yourself, your education and a career growth as a
  software engineer.
maillist: >
  where I show the best ways to invest money into your software
  engineering education
address: "Menlo Park, CA"
tags:
- "software engineering"
published: true
image: https://www.koszek.com/img/2017-03-31-how-software-engineer-should-invest-in-career-growth/oscar-nilsson-1860_25p.jpg
ads:
-
spellcheck-allow:
-
---

This post is for people who look for ways to spend money on personal growth,
as a software engineer.
Previously I covered [how much one should spend to growth](https://www.koszek.com/blog/2017/02/06/how-much-software-engineer-should-invest-in-career-growth/).
Here let's talk about the best resources you can invest in.

You should seek for ways of saving your money and after-tax earnings.
Before you apply any of the suggestions, remember to ask your school or
employer about them.
They have a way to bring resources to you, because funds for training and
growth are specially allocated in big institutions. Let's start from the
cheapest to the most expensive.

![alt_text_2](/img/2017-03-31-how-software-engineer-should-invest-in-career-growth/oscar-nilsson-1860_25p.jpg "Image_text_2")

## Books

**Price:** `$1`--`$100`

**Risk:** `low`

**Benefit:** `high`

Books are pretty cheap, assuming you understand what you're
getting for the price. Lets take the $40 book, for example.
If you live in the US, you have the natural perspective on what's worth $40;
of what this money can give you. Forty dollars is several coffees and couple
of beagles. Maybe one visit to the cinema with your second half.
Or maybe three lunches, if you eat out.

Yes, I do know forty dollars is a lot of money in most parts of the world.
I'm from Poland originally, and the currency ratio makes $40 be
approximately four times as much.
But by buying books you buy yourself a leverage against all the people who
you meet, interviews you take and all the business opportunities.

Let me give you an example here.  I remember paying $70 for a fourth edition
of the [Computer Organization and
Design](http://amzn.to/2nTRxik). It was around 320PLN (Polish Zloty), amount
equal to my monthly stipend from my school's dean. When I told my friends I got a book for 320PLN,
they couldn't believe it.
They didn't know you can buy a book for this much.

This book let me ace an interview for a [Xilinx](https://www.xilinx.com) internship couple of years
later. I'm highly confident I wouldn't have had enough computer
architecture/Verilog/C fu to pass it without studying from this book.

My intern's salary made the return on investment
for this book alone be somewhere between 100x and 500x.

Taken into perspective, is $40--$70 book still expensive?

If you want to learn how to make good book picks, you can take a look at my
[Reading 101 for software engineers](https://www.koszek.com/blog/2017/01/17/reading-for-software-engineers/)
[Previously](https://www.koszek.com/blog/2017/02/06/how-much-software-engineer-should-invest-in-career-growth/)
I talked about looking at your learning as a business, and
it's inevitable to make mistakes on your R&D budget.

## Library membership

**Price:** `$0`--`$500`

**Risk:** `low`

**Benefit:** `high`

Libraries are great.
You should use the library to read, study and proof-read books and do work.

In the US libraries come with several perks. One of them is [Safari Books Online](https://www.safaribooksonline.com)
available at no cost.  Others are programs for
audio-books like [OneDigital](https://www.onedigital.com) and [OverDrive](https://www.overdrive.com).  You can "borrow" an
audio-book for two weeks, listen to it, and then "return" it.  It simply
disappears from your device after these two weeks.  Cost is similar: zero.

Libraries are probably the cheapest co-working spaces out there.
 Everybody is studying and working there. So will you.

Many books aren't great and library helps with those. No need to buy them, if
you only like one chapter.  Three week lease term is fine because it brings
focus and motivation ("I need to finish this book first to be able to get the
next one")

University libraries prioritize students. For an unaffiliated person it's $80 for 3
months or $200 for a year to be able to just enter the library, sit and read. It
can be as much as $500 for a year to be able to borrow books.

Kindle isn't great for technical stuff, but you can also borrow Kindle books.
Graphics and diagrams looks bad on Kindle.
No more comment here: I have yet to see a decent computer title to look
decent on a Kindle.

## Magazines, journals

**Price:** `$10`--`$40`

**Risk:** `low`

**Benefit:** `medium`

Magazines and journals have a function of keeping you in touch with science
and the industry. It's less of a solid block of knowledge, and more about
juicy pieces you may have not heard about yet, but should.

There are good "popular" tech magazines nowadays, I'm sure, but I just don't
know any. I saw several issues of [Code](http://www.codemag.com/Magazine)
and it was decent. I may subscribe to it.

Around twelve years ago I used to spend quite a bit on ["Software
2.0"](http://sdjournal.pl) magazine (now: Software Developer's Journal) and
[Linux Plus](http://www.linux-magazine.pl) (now: Linux Magazine). They cost
30PLN in Poland (around $10). They were "extremely expensive newspapers" as
my parents referred to them. One special edition of SDJ titled "BSD systems"
introduced me to FreeBSD, which changed my life. I still have this edition
of a magazine. One day, I'll frame it.
So yes, magazines can have an impact on your career. Don't feel bad if you buy them.

If you have scientific interests, there are plenty of good journals.
Just visit [ACM](http://www.acm.org) and [IEEE](https://www.ieee.org).
You'll have to become a member to get them, and I think it might be worth it, if that's
your thing.

ACM is $99/year, which isn't bad.  I'm an ACM member. I like their [ACM
Queue](http://queue.acm.org).  It sums up to $8.25/month for a printed version of the
magazine, which isn't bad.  You get free Safari Books Online access, and
some additional perks.  In fact I joined an ACM because of the conference
discounts they offer to members.

IEEE has [Computing Edge](https://www.computer.org/web/computingedge) magazine, but I never fell in love with it.
IEEE is also expensive: $200/year.
Future of my IEEE is unclear, since the benefits are actually duplicated
with ACM. Being a member of both doesn't give you much.
Let me know what's your IEEE membership reasoning.

[USENIX](https://www.usenix.org) looks great.  I'm thinking of becoming a member of USENIX.
UNIX systems and software systems are my major interests though.
If that's not your cup of tea, maybe evaluate this before.
Their [USENIX ;login](https://www.usenix.org/publications/login) magazine looks great.
I'd subscribe just to get it in a printed version.

## Online classes

**Price:** `$1`--`$200`

**Risk:** `medium`

**Benefit:** `high`

Online learning is really appealing. Having an expert in the field introduce
you to difficult topics is very convenient. What I like is an ability to
stop, rewind, watch the same difficult piece several times. To me it's very
valuable and the real live lecture doesn't offer that. What online class
doesn't provide is the ability to interact with other students and having a
discussion, but I believe online learning is getting there.

Online classes are probably the second cheapest after books to benefit
from. They cost anything from $0.99 (for 3-month [Skillshare](https://www.skillshare.com) account)
through $29/month for [Code School](https://www.codeschool.com) and [Treehouse](https://teamtreehouse.com) up to $200/month for
[Udacity](https://www.udacity.com).
Authors and companies try to compete to make their name in the
education industry. That's how you get a great content for little money.

To people who wonder why it's worth to buy a training instead of watching
YouTube videos I need to answer: "you get what you pay for".
At least that's my experience, and while I think there are some great
resources ([iOS class from Stanford](http://web.stanford.edu/class/cs193p/cgi-bin/drupal/)), you shouldn't
feel bad about spending on online education. It pays of.

## Boot camps

**Price:** `$2000`--`$20000`

**Risk:** `medium`

**Benefit:** `medium`

I never participated in a boot camp.
The idea you can start from zero, go to a twelve week boot-camp and get some
knowledge to get you jump started sounds fine.
The idea of getting a job afterwards sounds a little bit unrealistic.

Then do it. Afterwards try to do as many projects on your own as
possible.

## Meetups

**Price:** `$0`--`$80`

**Risk:** `low`

**Benefit:** `low`

[Meetup](https://www.meetup.com) is where interest groups are organized. **Example:** People who program in C++
will have a monthly or bi-weekly meeting scheduled. You can come, interact
with people, talk C++ and learn.

My first contact with Meetup was a [Silicon Valley Forth Interest Group](http://www.forth.org/svfig/). It was great.
Organized every month at Stanford, was very well prepared, with speakers
every time, group discussion. Everybody was a Forth expert with many years
of experience. I loved it.

Most meetings aren't well organized. People come to eat and drink for free.
 Then they sit. Speaker, who is
there just to be able to list his/her presence on the meet-up flashes slides
quickly. And then there's the end.
This is a mistake in my opinion, and you should refrain from those. It's a
waste of your time. Go to the library and read a book for two hours. You'll
benefit more.

There's a little quirk here: pick a Meetup with $10--$20 fee, and it'll be
fine. Or better: $60. Those are mostly financial/entrepreneurial meet-ups.
Only people who really care go to those. It's a great crowd. I went to maybe
three of those Meetups, but investment was worth it. Advice I've gotten
there I still remember till this day.

# Conferences

**Price:** `$0`--`$5000`

**Risk:** `medium`

**Benefit:** `medium`

Conferences are good, if you know what you get out of them.
To me, it's more about networking with people; talking to others from the
same field and learning what they use to solve problems which you have as well.
It's less of a solid knowledge transfer. Think of a conference as a source
of hints.

Scientific conferences are where the real fun is. You have academics
competing with each other for attention from professors and PhDs. Everything
is peer reviewed, and after the presentations you're the judge. Audience
and reviewers will often vote for the best paper and presentation. This makes scientific
conferences to be great. You go there and see that people actually *work*
and *learn*. Unfortunately these aren't common, and you have to be a part of
the circle: do a PhD, be a student or a professor. Focus is narrow, so you
may end up not understanding anything otherwise.

Technical conferences are good if you want to understand what the top
of your field is doing, and what direction you should take for your career.
You meet with other people who paid their own money for the conference
(typically several hundred dollars), paid for the flight and a hotel. It's
good in the sense it's, in theory, all people who do the same. You can
brainstorm.

Picking a good conference is hard.  Unless you want to waste your time.

It gets worse for commercial conferences. People will try to recruit you. To
sell you something. To get your e-mail and subscribe you to their mailing
list. Once you get your badge scanned, and your e-mail stolen, you'll be
unable to unsubscribe from all the lists you'll become a part of. If you
reveal your mailing address, they'll be sending you offers and invited for
expensive classes.

On those, you get employees of the companies are participants.
They didn't pay anything--they were sent there, sometimes against their
will, by their companies.
Or they volunteered to have a day free of work.
They're there to have fun, not to learn.
You will talk to some people from the industry.
You'll get some LinkedIn contacts.
But that's it.
It's a waste of time.

## College classes

**Price:** `$300`--`$100,000`

**Risk:** `high`

**Benefit:** `high`

College is good if you like structured study program.
If you're a student already, and can afford it, don't resign from college.
Pick good, difficult classes about topics which are hard to learn.
Examples: operating systems, networking, compilers.
Do complex projects whenever possible.

Some countries make colleges accessible and free.
In Poland you could drop in to the class, sit and listen.
No need to be a registered student.
If there are enough sits, you wouldn't get kicked out.
Some, like the US, have colleges that are very expensive.
I don't know if you can drop-in for a class here.

One unit of class in the US can be $1300 dollars, so three-unit class is around $4k.
Being able to say you've graduated from a Stanford or Berkeley class has
some charm. This is one of the things which are hard to quantify.
It's possible that your future employer will scan your resume, Stanford name
will stand out, so you'll get the call.

Practically, it's hard to say if this happens. For sure you can get the same
amount of knowledge cheaper. It's likely it'll take longer to assimilate the
knowledge, but you'll get there.

## Summary

My attempt was to help you understand where the biggest benefit is.
With books and online classes, you'll get the biggest bang for the buck.
In terms of the rest of the ways to learn, it all depends on your
conditions.
Let me know if I missed anything. I'd like to pick up some of your ideas for
learning.

repository: wkoszek/me

repo_name: wkoszek/me


text:
# qne API v1

## Overview

The qne service uses a RESTful JSON API for all communication. This publicly available endpoint is located at [origin]/api.

NOTE: [origin] in the following addresses needs to be replaced by the qne server address, for example in development use http://localhost:3000

## Security

There are four types of endpoint security in the API:

1. email/password authentication
2. JWT token authentication
3. random number authentication
4. no authentication

### 1. Email/password authentication

This method is used for in security related endpoints, such as [origin]/api/v1/authenticate. Authentication is provided using [HTTP Basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).

### 2. JWT token authenticaton

Token authentication is the most common authentication method that is built using [JSON Web Tokens](https://jwt.io). The token is obtained from the [origin]/api/v1/authenticate POST endpoint and passed to the methods using token authentication in the HTTP Header `Authorization: Bearer <token>`.

### 3. Random number authenticaton

Random number authentication is used in individualized questionnaire endpoints, and is passed in the url or in the payload. For example some questionnaire URL:s might need additional security, and some respondent links might be unique, which would result in an endpoint [origin]/api/v1/questions/[questionnaire path]/questionnaire/[questionnaire_random_number]/respondent/[respondent_random_number]

### 4. No authentication

qne also hosts a public methods, which use no authentication. These are e.g. methods that receive publicly available questionnaires, such as GET [origin]/api/v1/questions/[questionnaire_path].

## Security endpoints

### Authenticate

| Description    |  Value|
| ------------- | :-----|
| Endpoint       | /api/v1/authenticate |
| Method         | POST |
| Security       | 1    |
| Description    | Authenticates the user and returns a JWT token.|

## Administration endpoints

### Create New Questionnaire

| Description    |  Value|
| ------------- | :-----|
| Endpoint       | /api/v1/questionnaires |
| Method         | PUT |
| Security       | 2   |
| Description    | Creates a new questionnaire, payload is the full questionnaire.|

### Update Questionnaire

| Description    |  Value|
| ------------- | :-----|
| Endpoint       | /api/v1/questionnaires/[questionnaire_uuid] |
| Method         | PUT |
| Security       | 2   |
| Description    | Updates an existing questionnaire, payload has the full questionnaire.|

### Delete Questionnaire

| Description    |  Value|
| ------------- | :-----|
| Endpoint       | /api/v1/questionnaires/[questionnaire_uuid] |
| Method         | DELETE |
| Security       | 2      |
| Description    | Deletes an existing questionnaire, which is not deployed.|

### Get Single Questionnaire

| Endpoint       | /api/v1/questionnaires/[questionnaire_uuid] |
| Method         | GET |
| Security       | 2   |
| Description    | Gets an existing questionnaire.|

### Get All Questionnaires

| Description    |  Value|
| ------------- | :-----|
| Endpoint       | /api/v1/questionnaires |
| Method         | GET |
| Security       | 2   |
| Description    | Gets all questionnaires.|

### Deploy Questionnaire

| Description    |  Value|
| ------------- | :-----|
| Endpoint       | /api/v1/questionnaires/[questionnaire_uuid]/deploy |
| Method         | POST |
| Security       | 2    |
| Description    | Deploys a questionnaire. Running this makes the questionnaire available at the questions endpoints.|

### Close Questionnaire

| Description    |  Value|
| ------------- | :-----|
| Endpoint       | /api/v1/questionnaires/[questionnaire_uuid]/close |
| Method         | POST |
| Security       | 2    |
| Description    | Closes a live questionnaire. Running this makes the questions endpoints stop working.|

### Get results of a questionnaire

| Description    |  Value|
| ------------- | :-----|
| Endpoint       | /api/v1/questionnaires/[questionnaire_uuid]/results |
| Method         | GET  |
| Security       | 2    |
| Description    | Gets all results to a questionnaire.|

## Respondent endpoints

### Get public questionnaire questions

| Description    |  Value|
| ------------- | :-----|
| Endpoint       | /api/v1/questions/[path] |
| Method         | GET |
| Security Level | 4   |
| Description    | Gets questions for a public questionnaire.|

### Get protected questionnaire questions

| Description    |  Value|
| ------------- | :-----|
| Endpoint       | /api/v1/questions/[path]/questionnaire/[questionnaire_random_number] |
| Method         | GET |
| Security Level | 3   |
| Description    | Gets questions for a protected questionnaire.|

### Get individualized public questionnaire questions

| Description    |  Value|
| ------------- | :-----|
| Endpoint       | /api/v1/questions/[path]/respondent/[respondent_random_number] |
| Method         | GET |
| Security Level | 3   |
| Description    | Gets questions for a public questionnaire, but individualized to for a single respondent.|

### Get individualized protected questionnaire questions

| Description    |  Value|
| ------------- | :-----|
| Endpoint       | /api/v1/questions/[path]/user/questionnaire/[questionnaire_random_number]/respondent/[respondent_random_number] |
| Method         | GET |
| Security Level | 3   |
| Description    | Gets questions for a public questionnaire, but individualized to for a single respondent.|

### Answer to a questionnaire

| Description    |  Value|
| ------------- | :-----|
| Endpoint       | /api/v1/questions/[path]/answer |
| Method         | POST   |
| Security Level | 3 or 4 |
| Description    | Send answers to questionnaire in the payload, optionally including a questionnaire and respondent random numbers.|

repository: filosofianakatemia/qne

gha_language: TypeScript

repo_name: filosofianakatemia/qne


text:
This tool allows you to easily clean the LaTeX code of your paper to submit to
arXiv. From a folder containing all your code, e.g. `/path/to/latex/`, it
creates a new folder `/path/to/latex_arXiv/`, that is ready to ZIP and upload to
arXiv.

## Example call:

```
python -m arxiv_latex_cleaner.arxiv_latex_cleaner /path/to/latex/ --im_size 500 --images_whitelist='{"images/im.png":2000}'
```

## Main features:

#### Privacy-oriented

*   Removes all auxiliary files (`.aux`, `.log`, `.out`, etc.).
*   Removes all comments from your code (yes, those are visible on arXiv and you
    do not want them to be).

#### Size-oriented

There is a 10MB limit on arXiv submissions, so to make it fit:

*   Removes all unused images that take up space (those that are not actually
    included in any `.tex` file).
*   Resizes all images to `im_size` pixels, to reduce the size of the
    submission. You can whitelist some images to skip the global size using
    `images_whitelist`.

## Usage:

```
arxiv_latex_cleaner.py [-h] [--im_size IM_SIZE]
                       [--images_whitelist IMAGES_WHITELIST]
                       input_folder

positional arguments:
  input_folder          Input folder containing the LaTeX code.

optional arguments:
  -h, --help            show this help message and exit
  --im_size IM_SIZE     Size of the output images (in pixels, longest side).
                        Fine tune this to get as close to 10MB as possible.
  --images_whitelist IMAGES_WHITELIST
                        Images that won't be resized to the default
                        resolution, but the one provided here in a dictionary
                        as follows '{"path/to/im.jpg": 1000}'
```

repository: FGDBTKD/google-research

gha_language: Python

repo_name: FGDBTKD/google-research


text:
---
title: "List taskProcessingResults (for a run)"
description: "Get the taskProcessingResult resources from a run."
author: "AlexFilipin"
ms.localizationpriority: medium
ms.prod: "governance"
doc_type: apiPageType
---

# List taskProcessingResults (for a run)

Namespace: microsoft.graph.identityGovernance

> [!IMPORTANT]
> APIs under the `/beta` version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the **Version** selector.

Get the [taskProcessingResult](../resources/identitygovernance-taskprocessingresult.md) resources for a [run](../resources/identitygovernance-run.md).

## Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see [Permissions](/graph/permissions-reference).

|Permission type|Permissions (from least to most privileged)|
|:---|:---|
|Delegated (work or school account)|LifecycleWorkflows.Read.All, LifecycleWorkflows.ReadWrite.All|
|Delegated (personal Microsoft account)|Not supported.|
|Application|LifecycleWorkflows.Read.All, LifecycleWorkflows.ReadWrite.All|

For delegated scenarios, the admin needs one of the following [Azure AD roles](/azure/active-directory/users-groups-roles/directory-assign-admin-roles#available-roles):

- Global administrator
- Global reader
- Lifecycle workflows administrator

## HTTP request

<!-- {
  "blockType": "ignored"
}
-->
``` http
GET /identityGovernance/lifecycleWorkflows/workflows/{workflowId}/runs/{runId}/taskProcessingResults
```

## Optional query parameters

This method supports the `$select`, `$orderBy`, `$expand`, and `$filter` OData query parameters to help customize the response. For general information, see [OData query parameters](/graph/query-parameters).

## Request headers

|Name|Description|
|:---|:---|
|Authorization|Bearer {token}. Required.|

## Request body

Do not supply a request body for this method.

## Response

If successful, this method returns a `200 OK` response code and a collection of [microsoft.graph.identityGovernance.taskProcessingResult](../resources/identitygovernance-taskprocessingresult.md) objects in the response body.

## Examples

### Example 1: Get the task processing results in a run report from a workflow

### Request

The following is an example of a request.

# [HTTP](#tab/http)
<!-- {
  "blockType": "request",
  "name": "lifecycleworkflows_list_run_taskprocessingresult"
}
-->
``` http
GET https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/workflows/a977dbe8-0f3f-4ae6-b3a7-29e1010ac4cc/runs/33bf1a9c-2b26-49b6-996f-ca416c518341/taskProcessingResults
```

# [C#](#tab/csharp)

```csharp

GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var taskProcessingResults = await graphClient.IdentityGovernance.LifecycleWorkflows.Workflows["{identityGovernance.workflow-id}"].Runs["{identityGovernance.run-id}"].TaskProcessingResults
	.Request()
	.GetAsync();

```

 [!IMPORTANT]
 Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see [Use the Microsoft Graph SDKs with the beta API](/graph/sdks/use-beta).

 For details about how to [add the SDK](/graph/sdks/sdk-installation) to your project and [create an authProvider](/graph/sdks/choose-authentication-providers) instance, see the [SDK documentation](/graph/sdks/sdks-overview).

### Response

The following is an example of the response
>**Note:** The response object shown here might be shortened for readability.
<!-- {
  "blockType": "response",
  "truncated": true,
<EMAIL_ADDRESS>"Collection(microsoft.graph.identityGovernance.taskProcessingResult)"
}
-->
``` http
HTTP/1.1 200 OK
Content-Type: application/json

{
<EMAIL_ADDRESS>"https://graph.microsoft.com/beta/$metadata#identityGovernance/lifecycleWorkflows/workflows('a977dbe8-0f3f-4ae6-b3a7-29e1010ac4cc')/runs('33bf1a9c-2b26-49b6-996f-ca416c518341')/taskProcessingResults",
    "value": [
        {
            "completedDateTime": "2023-01-20T17:16:03.4863553Z",
            "createdDateTime": "2023-01-20T17:16:00.9095011Z",
            "id": "7a21089f-ec13-4e9c-997e-b31f4e59d41e",
            "processingStatus": "completed",
            "startedDateTime": "2023-01-20T17:16:02.8025169Z",
            "failureReason": null,
            "subject": {
                "id": "1baa57fa-3c4e-4526-ba5a-db47a9df95f0"
            },
            "task": {
                "category": "joiner,leaver",
                "continueOnError": false,
                "description": "Add user to selected groups",
                "displayName": "Add User To Groups",
                "executionSequence": 3,
                "id": "c8dbaed8-3d23-4e5a-8f65-130767639667",
                "isEnabled": true,
                "taskDefinitionId": "22085229-5809-45e8-97fd-270d28d66910",
                "arguments": [
                    {
                        "name": "groupID",
                        "value": "1624be55-d924-491e-ac72-401f6f961e4d"
                    }
                ]
            }
        }
    ]
}
```

### Example 2: Get the specific properties of task processing results in a run report for a workflow

#### Request

The following is an example of a request.

# [HTTP](#tab/http)
<!-- {
  "blockType": "request",
  "name": "lifecycleworkflows_list_run_taskprocessingresult_select"
}
-->
``` http
GET https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/workflows/a977dbe8-0f3f-4ae6-b3a7-29e1010ac4cc/runs/33bf1a9c-2b26-49b6-996f-ca416c518341/taskProcessingResults?$select=id,failureReason,processingStatus,subject
```

# [C#](#tab/csharp)

```csharp

GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var taskProcessingResults = await graphClient.IdentityGovernance.LifecycleWorkflows.Workflows["{identityGovernance.workflow-id}"].Runs["{identityGovernance.run-id}"].TaskProcessingResults
	.Request()
	.Select("id,failureReason,processingStatus,subject")
	.GetAsync();

```

 [!IMPORTANT]
 Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see [Use the Microsoft Graph SDKs with the beta API](/graph/sdks/use-beta).

 For details about how to [add the SDK](/graph/sdks/sdk-installation) to your project and [create an authProvider](/graph/sdks/choose-authentication-providers) instance, see the [SDK documentation](/graph/sdks/sdks-overview).

### Response

The following is an example of the response
>**Note:** The response object shown here might be shortened for readability.
<!-- {
  "blockType": "response",
  "truncated": true,
<EMAIL_ADDRESS>"Collection(microsoft.graph.identityGovernance.taskProcessingResult)"
}
-->
``` http
HTTP/1.1 200 OK
Content-Type: application/json

{
<EMAIL_ADDRESS>"https://graph.microsoft.com/beta/$metadata#identityGovernance/lifecycleWorkflows/workflows('a977dbe8-0f3f-4ae6-b3a7-29e1010ac4cc')/runs('33bf1a9c-2b26-49b6-996f-ca416c518341')/taskProcessingResults(id,failureReason,processingStatus,subject)",
    "value": [
        {
            "id": "7a21089f-ec13-4e9c-997e-b31f4e59d41e",
            "processingStatus": "completed",
            "failureReason": null,
            "subject": {
                "id": "1baa57fa-3c4e-4526-ba5a-db47a9df95f0"
            },
            "task": {
                "category": "joiner,leaver",
                "continueOnError": false,
                "description": "Add user to selected groups",
                "displayName": "Add User To Groups",
                "executionSequence": 3,
                "id": "c8dbaed8-3d23-4e5a-8f65-130767639667",
                "isEnabled": true,
                "taskDefinitionId": "22085229-5809-45e8-97fd-270d28d66910",
                "arguments": [
                    {
                        "name": "groupID",
                        "value": "1624be55-d924-491e-ac72-401f6f961e4d"
                    }
                ]
            }
        }
    ]
}
```

repository: microsoftgraph/msgraph-beta-sdk-dotnet

gha_license_id: NOASSERTION

repo_name: microsoftgraph/msgraph-beta-sdk-dotnet


text:
---
title: Ruby 2D on Linux
description: Learn how to set up your environment and install dependencies
layout: learn
---

# Install Ruby

Installing Ruby with package managers (e.g. apt, yum, pacman) can cause issues. We recommend using a Ruby version manager instead, like [rbenv](https://github.com/rbenv/rbenv). Here's how to set it up:

1. First, clone the rbenv repo into `~/.rbenv`:
```
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
```

2. Install [ruby-build](https://github.com/rbenv/ruby-build) as an rbenv plugin, which will add the `rbenv install` command:
```
$ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
```

3. Add rbenv to your path and initialize it by adding the following to your `~/.bashrc` or `.bash_profile`:
```bash
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
```

4. Get access to rbenv by loading the new shell config using:
```
$ source ~/.bashrc  # or `~/.bash_profile`
```

5. [Install packages](https://github.com/rbenv/ruby-build/wiki#suggested-build-environment) to prepare your build environment.

6. Install the latest version of Ruby (2.6.1 in this case):
```
$ rbenv install 2.6.1
```

7. Set Ruby 2.6.1 as the global default:
```
$ rbenv global 2.6.1
```

8. Check to make sure everything works:
```
$ rbenv versions
  system
* 2.6.1 (set by /home/<me>/.rbenv/version)
$ ruby -e "puts 'Hello Ruby'"
Hello Ruby
```

# Install Simple 2D

Ruby 2D requires a native graphics engine called Simple 2D, which relies on [SDL](https://www.libsdl.org). The simplest way to install Simple 2D is by [running the install script from the web](https://github.com/simple2d/simple2d#on-linux).

You can also install SDL packages manually and install Simple 2D from source by doing the following:
1. Install SDL packages for your Linux distribution.
- Ubuntu, Debian, and Mint:
```
$ sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
```
- CentOS and Fedora:
```
# Or `dnf install` on Fedora
$ sudo yum install SDL2-devel SDL2_image-devel SDL2_mixer-devel SDL2_ttf-devel
```
- openSUSE:
```
$ sudo zypper install libSDL2-devel libSDL2_image-devel libSDL2_mixer-devel libSDL2_ttf-devel
```
- Arch:
```
$ sudo pacman -S sdl2 sdl2_image sdl2_mixer sdl2_ttf
```

2. Next, download the source code for the [latest version of Simple 2D](https://github.com/simple2d/simple2d/releases/latest) and run:
```
$ make && sudo make install
```

# Install Ruby 2D

You're now ready to install the gem!

```
$ gem install ruby2d
```

That's it! Head back to the "get started" guide and [write your first 2D app »](/learn/get-started/#writing-your-first-2d-app)

gha_language: SCSS


text:
---
layout: default
---

# 1997-09-12 - TAMPERPROOFING OF CHIP CARDS

## Header Data

From: "William H. Geiger III"<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: cf3a9f521901df27eb420536fb774f4412408975797455c46d119c4bc00f7966

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-09-12 03:17:42 UTC

Raw Date: Fri, 12 Sep 1997 11:17:42 +0800

## Raw message

```
{% raw  %}From: "William H. Geiger III"<EMAIL_ADDRESS>Date: Fri, 12 Sep 1997 11:17:42 +0800
To<EMAIL_ADDRESS>Subject: TAMPERPROOFING OF CHIP CARDS
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

-----BEGIN PGP SIGNED MESSAGE-----

The below message was posted to one of my mailing lists and I thought it
amy be of intrest here.

I found this in our database.  I've never seen it before.
I found it pretty interesting, despite being somewhat old.
Truncation in original.

                *       *       *       *       *

                   TAMPERPROOFING OF CHIP CARDS

                         Ross J. Anderson
             Cambridge University Computer Laboratory
                Pembroke Street, Cambridge CB2 3QG
                Email<EMAIL_ADDRESS>
                             Abstract

There are two ways of attacking smartcards - destructive reverse
engineering of the silicon circuit (including the contents of  ROM), and
discovering the memory contents by other means; a well  equipped
laboratory can do both. Persistent amateurs have often  managed the
latter, and may shortly be able to do the former as  well.

1 Reverse engineering the chip

A recent article[1] gives a good introduction to how reverse  engineering
can be carried out in a moderately well equipped  academic
microelectronics laboratory (there are three such in the  UK, and perhaps
two hundred academic or industrial facilities  worldwide which can carry
out such work). We will start off by  summarising it and giving some
background.

1.1 How attacks are done

The authors of the article cited above worked at the Cambridge  University
microelectronics lab, which is part of the department  of physics. They
got interested in reverse engineering chips five  years ago to help an
industrial client locate manufacturing  defects.

They built an apparatus which consists of a slightly modified  electron
beam lithography machine (this functions in effect as an  electron
microscope) and a PC with an image processing system (a  DCT chip and
locally written software). They then developed  techniques for etching
away a layer at a time without doing too  much damage. Conventional wet
etching causes too much havoc with  half micron chips, so dry etching is
used in which gases such as  CF4 or HF strip off layers of silica and
aluminium in turn.

One of their innovations is a technique to show up N and P doped  layers
in electron micrographs. This uses the Schottky effect: a  thin film of a
metal such as gold or palladium is deposited on  the chip creating a diode
effect which can be seen with the
electron beam.

Finally, image processing software has been developed to spot the  common
chip features and reduce the initially fuzzy image of the  metal tracks
into a clean polygon representation. There are also  routines to get
images of successive layers, and of adjacent  parts of the chip, in
register.

The system has been tested by reverse engineering the Intel 80386  and a
number of other devices. The 80386 took two weeks; it takes  about six
instances of a given chip to get it right. The output  can take the form
of a mask diagram, a circuit diagram or even a  list of the library cells
from which the chip was constructed.

This is typical of the kind of attack which an academic lab can  mount.
Even more sophisticated attacks, invented at Sandia  National laboratories
and recently published[2], involve looking  through the chip.
Light-Induced Voltage Alteration is a non-
destructive technique that involves probing operating ICs from  the back
side with an infrared laser to which the silicon
substrate is transparent. The photocurrents thus created allow  probing of
the device's operation and identification of logic  states of individual
transistors.   This
allows imaging the chip to identify open conductors and  voltage levels
without damage, although it does not operate  through metalization layers.

Of course, even more sophisticated techniques may be available in
classified government facilities.

1.2 The threat to smartcard systems

Smartcards typically have a few kilobytes of ROM, which being  metal can
be read with the above techniques; a few hundred bytes  of RAM, which
being cleared between transactions stores no long  term secrets; and a few
kilobytes of EEPROM, which typically  holds the user data and key
material.

The techniques described above are not directly relevant to
reading out EEPROM. However any laboratory at the level under
consideration would be able to determine EEPROM contents using  microprobe
techniques. More simply, a reverse engineering
operation would pinpoint the physical location of the write
protect bit, which could then be reset using ultraviolet light.

As mentioned, the number of organisations worldwide which can do  electron
beam lithography is of the order of 100-200. These
potential attackers include a number of universities, all the big  chip
makers and the governments of the USA, Canada, the UK and  China. Of
these, the US and Chinese governments appear to have  the greatest
experience at chip breaking.

For a respectable firm to join this club costs about $2m - $1.5m  for the
electron beam lithographer and ancilliary equipment, plus  a year's salary
for about five professionals to get it all going  (typically a physicist
to deal with the ion beams, a chemist to  deal with packaging, two
computer people to write software, and a  chip person to run the whole
operation).

The number of club members may rise as more and more firms,
especially in the Far East, start producing ASICs. However it is  not
likely that electron beam lithography will ever become a  really
widespread technology. The total number of sites with the  capability to
do regular hi-tech attacks might rise to about 1000  at most.

An outsider without $2m still has a number of options. For ex-
ample, there are three universities in the UK alone which possess  the
necessary equipment (Cambridge, Edinburgh and Southampton)  and an
attacker might enrol for a PhD or other degree in order to  acquire access
and training. It is also possible to use more  primitive equipment at the
cost of spending months rather than  weeks on each reconstruction; this is
apparently the approach of  the Chinese government, and could be viable
where workers are  paid little (or are expecting a share of large criminal
profits).

Finally, there are apparently places in the Far East, and at  least one in
Silicon Valley, which reverse engineer chips for  cash. How much cash, and
how many questions would be asked, are  not known to this writer.

1.3 Possible defences

A number of copy trap features are incorporated into commercial  chip
designs. For example, we have heard of design elements that  look like a
transistor, but are in reality only a connection  between gate and source;
and 3-input NORs which function only as  2-input NORs.

Many of these copier traps are based on holes in isolating layers  or on
tricks done in the diffusion layer with ion implantation  (based on the
assumption that it is hard to distinguish N from  P). However the layer
etching and Schottky techniques developed  by Haroun Ahmed's team can
detect such traps.

Another possibility is to introduce complexity into the chip  layout and
to use nonstandard cell libraries. However the chip  still has to work,
which limits the complexity; and nonstandard  cells can be reconstructed
at the gate level and incorporated in  the recognition software.

Finally, in the Clipper chip there are a number of silicon
features, of which the most important is a fusible link system.  These
links are only fused after fabrication and hold the long  term key and
other secret aspects of the chip. Details can of  course be found in a
paper in the relevant data book[3], and from  the scanning electron
micrographs there, it is clear that the  secret information can be
recovered by sectioning the chip. This  technique has been used by
Professor Ahmed's team on occasion on  obscure features in other chips.

Thus the effect of current silicon level copy traps is just to  slow down
the attacker. In fact, we have heard from a usually  reliable source that
Intel has reverse engineered the Clipper  chip, but that the results have
been classified.

The same appears to be the case for chemical measures. Chips  intended for
classified military use are often protected by
passivation layers of a tenacity never encountered in civilian
packaging[4]. But here again, informed sources agree that with  enough
effort, techniques can be developed to remove them.

1.4 Relevance to smartcard products

We understand that neither silicon copy traps not advanced
passivation techniques are used by smartcard manufacturers in the  bulk of
their products. The marketing director of a smartcard  manufacturer said
that they simply had no demand from their users  for anything really
sophisticated[5]. The most that appears to be  done is an optical sensor
under an opaque coating[6].

Hi-tech techniques may indeed have been used by commercial
pirates to duplicate satellite TV smartcards[7].

Recent postings to a TV hackers' mailing list recount how an
undergraduate used nitric acid and acetone to remove ICs intact  from
Sky-TV smartcards; he then put them in the University's  electron beam
tester (an ICT 8020, also sold as the Advantest E  1340 - a 1991 machine).
The chips were run in a test loop, but he  had been unable to remove the
silicon nitride passivation layer;  the many secondary electrons removed
from this caused it to get  charged positive very quickly, which obscured
the underlying  circuit. He did not have access to a dry etching facility
to  remove this layer, and could get no further. However it is
significant that a person with no funding or specialist knowledge  could
get even this far.

However, amateur hackers have managed to break smartcard security  without
having to penetrate the device physically. Instead, they  have used flaws
in the design of the card's hardware or software  to determine its
contents.

2 Determining the EEPROM contents

Many methods have been employed to determine the EEPROM contents  of
smartcards. In addition to the very general reverse  engineering
techniques described above, there are a lot of  shortcut attacks on
particular designs.

2.1 How attacks are done

The following list is not exhaustive:

o   raising the supply voltage above its design limit;

o   cutting the supply voltage below its design limit;

o   resetting random memory locations using ultraviolet light
    until the read protect bit is found;

o   exploiting misfeatures in the hardware, including the
    manufacturer supplied ROM code;

o   exploiting misfeatures in the customer written EEPROM code
    (current attacks on UK satellite TV systems take this route);

o   some combination of the above.

The appendix contains accounts from a hacker mailing list of two  actual
attacks carried out on chips.

2.2 Threat assessment

All systems have bugs, and so the level of threat to smartcard  systems
presented by exploitable loopholes is a function of how  many bugs remain
(i.e. how mature the design is) and how much  effort is spent in looking
for them (i.e. how many motivated  attackers there are). This in turn
depends on the application  area.

Satellite TV systems attracted a great many attackers for
historical reasons; in the USA, many rural households had got  into the
habit of watching satellite TV feeds as there were no  terrestrial
stations in range, even although these feeds were  intended for
rebroadcast rather than direct consumption. When the  feeds were
encrypted, the families who depended on them for their  news and
entertainment - and often could not buy decoders through  any legal
channel - were outraged.

In Europe, a similar problem arose when the final season of 'Star  Trek:
The Next Generation' was encrypted. This program's fans  included many
with appropriate skills, and soon (March 94) there  appeared a program
called Season which decoded Sky TV.

Since then, there has been a battle of wits between Sky and the  Trekkies,
which has probably cost Sky somewhere between $10
million and $100 million. On May 18th 1994, Sky changed from  issue 07
cards to their new issue 09 card. Hackers refer to May  18th as Dark
Wednesday. The 09 card proved harder to hack but a  temporary solution
appeared in June. It only lasted a few weeks  before Sky changed codes
again. Though some attempts at an issue  09 Season were made, a code
change by Sky stopped it until just  before Christmas.

Then no less than three new versions of Season appeared - two for  the PC
and one for the MAC. Successive code changes on January  4th and January
25th led to further updates of Season, and by  about 8th March all the
secrets in the Sky 09 card were known -  and published! Hackers are
awaiting the release of series 10 Sky  cards with relish.

In addition to the attacks on satellite TV, there have been a  number of
attacks on banking systems and prepayment electricity  meter systems which
are documented in three of my recent papers  [8, 9, 10] Most of the
attacks documented there resulted from  similarly opportunistic
exploitation of design and operational  errors, and some of the target
systems were based on smartcards.

Finally, some concern has been expressed that attack skills may  be
transferable. For example, a banking industry security expert  is worried
that the satellite TV hacking community might next  turn its attention to
eftpos systems.

2.3 Possible defences

The main conclusion to be drawn from the above is probably that  just as
we do not know how to make a device which resists
tampering by a funded organisation, we do not know how to build a  device
of any complexity to resist logical as opposed to physical  tampering.

There are a number of other lessons. For example, companies which  rely on
smartcard systems should if possible avoid making a lot  of enemies.
Diversity of attack has been significant in pay-TV,  metering and banking
systems and just as a funded organisation  can break the silicon directly,
so one must expect that many  tinkering amateurs will eventually find a
flaw in any piece of  software. It is well known in the software testing
community that  a significant number of bugs come to light when a piece of

software is passed on to another tester or to a customer; this is  because
different testers and/or users exercise different parts  of the input
space[11].

It is also imprudent to start off with weak security and then  improve it
gradually in response to attacks. The satellite TV  people did this, and
trained up a community of hackers. At some  point, you must invest enough
to put clear water between your  systems and your opponents, and the
sooner you make this  investment the smaller it is likely to be.

The main investment should be in getting the overall design
right, or at least as right as one can, from the beginning. It is  unwise
to spend a lot of money on tamperproofing while ignoring  the much simpler
and dirtier attacks which exploit errors in  design and operation. Quality
control, and examination by
multiple independent experts, should take priority over attempts  to mimic
the passivation techniques used by the military.

After all, the three published attacks on Clipper all involve the  logical
design (key management protocols and modes of operation)  rather than
penetration of the device itself.

3 Conclusion

At present, there are no portable tamperproof devices. If secrets  are
held on smartcards which are allowed outside protected  spaces, then both
physical and logical attacks should be
expected.

The scale of such attacks will depend on many things. If there is  a
capable motivated opponent, such as a chip maker or the  government of a
NATO country or China, then it must be assumed  that a complete
penetration will take at most weeks. If there are  many less capable but
still motivated opponents, then
penetrations based on the opportunistic exploitation of design  flaws are
to be expected in due course.

We conclude that systems based on portable tamper-resistant
devices should be designed with caution. They should avoid
motivating a determined attack on the cards, and the penetration  of a
small number of cards should not be fatal to the system  owner.

These considerations interact; for example, if the scope of
secrets kept within the card is limited so that breaking a card  allows
access to only one bank account, then it is unlikely that  an attack would
be economic to an attacker or prove more than a  minor nuisance to the
card issuer.

                             APPENDIX

First account

This short essay will show you how to read the EPROM of an
AMD87C51, with all security programmed.

.... the SM-card I had was programmed with both Lock bits and it  was
impossible to read out the IROM.

But the data sheet also tells:
    To ensure proper functionality of the chip, the internally
    latched value of the EA pin must agree with its external
    state.

Perhaps it was possible to confuse the processor.

I build a small device with external EPROM (64KBytes) and RAM.  The EPROM
was coded with a monitor program in the upper address  range which gives
me the possibility to load and execute code by  control of a PC. Starting
the processor with external ROM access  disables the access of the
internal ROM and due to the latching  of the EA pin during RESET, changes
at the EA pin had no effect.  Also the MOVC returns only external ROM
values.

Know my idea was to start the processor with internal ROM and  then to
confuse him so that he accesses the external EPROM and  run into the
monitor program.

I tried ...

But reduction of the power supply voltage works. At about 1,5  Volt the
processor starts to access the external ROM. Rising the  voltage back to 5
Volt the processor (most of the times) still  run external, but with the
possibility of access to the internal  ROM...

I programmed a small routine, which calls an address within the  internal
ROM and execute this. I started at the higher end of the  internal ROM and
decreased the calling address with each try by  10h. Most of the time the
processor hangs up. But at some
addresses I got a return to the monitor program. So I analysed  this
addresses and prepared the registers in a way to verify that  the routine
could read ROM data. And I found the routine which  did this. So the
internal ROM code reads itself and returns  himself to the monitor program
for storage. It took about 3 days  to go through the ROM and find the
routine and one long week to  understand the code.

Second account

This short story shows how to get access to a secured 87C51
microcontroller. It's a different way, than the one described by  .....
Referring to his article, I assume, that this 87C51  microcontrollers and
their features (including security bits) are  known.

The idea was, that the security bits are not located near the  EPROM array
on the silicon. After some tests in erasing standard  EPROMS, I had the
right tools to try it on a real device: With a  mask designed from black,
thick paper with a small hole in it, I  started to lighten the silicon on
the outer edges and sides.  Moving the mask carefully and checking the
security bits (by  reading the device in a microcontroller programmer)
after each  try is a long job. I did additional tests to open the chip (by
 removing the windows or dividing the ceramic carrier material).  But this
always led to permanent damage to the chip (broken
silicon, destroyed wires between pads and pins), so I gave this  up. So
after 4 destroyed chips the fifth was the right one. You  have to be sure,
that your mask is good prepared and the erasing  light doesn't diffuse
across the chip. No I'am able to erase such  a device in less than 10
minutes. But ... it's only easy if the  device is one of AMD or Philips.
The Intel devices have a window,  which is formed like a lens (the silicon
looks very big). On this  devices it's nearly impossible to lighten a
specific part of the  silicon. The job is easier on devices with standard
window and a  _big_ EPROM Array (seems to be devices aged two or more
years).

                                         . . . if somebody is  interested
in the 4K codes of the MasterCard (bad and dirty code)  or MovieCard (very
elegant algorithm and i/o implementation),  just gimme' a direct mail.
Disassembled and commented listings in  WinWord format are also available
(comments in mixed English and  German language).

                            REFERENCES

[1]  'Layout Reconstruction of Complex Silicon Chips', S Blythe, B
     Fraboni, S Lall, H Ahmed, U de Riu, IEEE J. of Solid-State
     Circuits v 28 no 2 (Feb 93) pp 138-145

[2]  'Two New Imaging Techniques Promise To Improve IC Defect
     Identification', C Ajluni, Electronic Design Vol 43 No 14 (10
     July 1995) pp 37-38

[3]  'Conducting Filament of the Programmed Metal Electrode
     Amorphous Silicon Antifuse', KE Gordon, RJ Wong,
     International Electron Devices Meeting, Dec 93; reprinted as
     pp 6-3 to 6-10, QuickLogic Data Book, 1994

[4]  see FIPS PUB 140-1 section 4 level 4: "Removal of the coating
     shall have a high probability of resulting in serious damage
     to the module"

[5]  Philippe Maes, GemPlus, during a panel discussion at Cardis
     94

[6]  message<EMAIL_ADDRESS>posted by Anne Anderson of
     Hewlett-Packard<EMAIL_ADDRESS>to sci.crypt 26 Apr 1994

[7]  apparently tiny jets of hot acid have been used to remove the
     passivation layers over parts of the chip at a time

[8]  'Why Cryptosystems Fail'

[9]  'Liability and Computer Security - Nine Principles'

[10] 'Cryptographic Credit Control in Pre-payment Metering
     Systems' All these can be got from
     http://www.cl.cam.ac.uk:/users/rja14/

[11] 'Thermodynamic description of the defects in large
     information processing systems', RM Brady, RC Ball, RJ
     Anderson, to appear

- --
- ---------------------------------------------------------------
William H. Geiger III  http://www.amaranth.com/~whgiii
Geiger Consulting    Cooking With Warp 4.0

Author of E-Secure - PGP Front End for MR/2 Ice
PGP & MR/2 the only way for secure e-mail.
OS/2 PGP 2.6.3a at: http://www.amaranth.com/~whgiii/pgpmr2.html
- ---------------------------------------------------------------

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3a
Charset: cp850
Comment: Registered_User_E-Secure_v1.1b1_ES000000

iQCVAwUBNBimLI9Co1n+aLhhAQGVFAP9F/tJe/iAeghu8+FPHsJMoaYXzQT05MTr
KAo4ibq7Qe+zJaIOEfMRc8sjRJgVjBHeey7XD0ApvRX9SK0wY0x44KxruBTJqzSq
x/o7jiI8efMBTLuIuJzPqnMYsMYdCrcgmRDzyMj+TSI8cFu5NZKkSaSWVajtq7D1
svv5/ACuQos=
=GfBt
-----END PGP SIGNATURE-----

{% endraw %}
```

## Thread

+ Return to [September 1997](/archive/1997/09)

+ Return to<EMAIL_ADDRESS>(Anonymous)](/authors/nobody_at_replay_com_anonymous_)"
+ Return to "["William H. Geiger III" <whgiii@invweb.net>](/authors/william_h_geiger_iii_whgiii_at_invweb_net_)"

+ 1997-09-12 (Fri, 12 Sep 1997 11:17:42 +0800) - TAMPERPROOFING OF CHIP CARDS - _"William H. Geiger III"<EMAIL_ADDRESS>  + 1997-09-13 (Sun, 14 Sep 1997 05:28:13 +0800) - [NoneRe: TAMPERPROOFING OF CHIP CARDS](/archive/1997/09/60a3f083118e5be8dcdaba5f3440a18dcedabca9243f78fc672a96be206cff6d) -<EMAIL_ADDRESS>(Anonymous)_
  + 1997-09-15 (Mon, 15 Sep 1997 15:35:03 +0800) - [NoneRe: TAMPERPROOFING OF CHIP CARDS](/archive/1997/09/11939510fb1dbab1f3964704fa5adf5dfd44370f0b4d647e8b4399b6ccd1e0c8) -<EMAIL_ADDRESS>(Anonymous)_


text:
# Adjust-Brightness #

## Description ##

A script for controlling the screen backlight brightness of a laptop.

## Requirements ##

* Debian GNU/Linux (`bullseye/sid`).

## Installation ##

0. Download the script.
1. (Optional) Make the script executable (`chmod +x adjust-brightness.sh`).

## Configuration ##

The following variables in the script should be modified:

* `backlight_device`: The backlight device of the laptop. The device name can
                      be found by checking the `/sys/class/backlight` directory.
* `brightness_step`: The amount of brightness to increase or decrease in each
                     adjustment.

## Usage ##

To show the current brightness:

```
sh adjust-brightness.sh show
```

To increase the brightness:

```
# As root.
sh adjust-brightness.sh up

# Or using sudo.
sudo sh adjust-brightness.sh up
```

To decrease the brightness:

```
# As root.
sh adjust-brightness.sh down

# Or using sudo.
sudo sh adjust-brightness.sh down
```

repository: alxtsg/Debian-Utilities

repo_name: alxtsg/Debian-Utilities


text:
# File-resolver:
[![Latest Version on Packagist](https://img.shields.io/packagist/v/tleckie/file-resolver.svg?style=flat-square)](https://packagist.org/packages/tleckie/file-resolver)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/teodoroleckie/file-resolver/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/teodoroleckie/file-resolver/?branch=main)
[![Build Status](https://scrutinizer-ci.com/g/teodoroleckie/file-resolver/badges/build.png?b=main)](https://scrutinizer-ci.com/g/teodoroleckie/file-resolver/build-status/main)
[![Total Downloads](https://img.shields.io/packagist/dt/tleckie/file-resolver.svg?style=flat-square)](https://packagist.org/packages/tleckie/file-resolver)
[![Code Intelligence Status](https://scrutinizer-ci.com/g/teodoroleckie/file-resolver/badges/code-intelligence.svg?b=main)](https://scrutinizer-ci.com/code-intelligence)

Simple file resolver.

### Installation

You can install the package via composer:

```bash
composer require tleckie/file-resolver
```

### Usage

```php
<?php

require "vendor/autoload.php";

use Tleckie\FileResolver\Resolver;

$resolver = new Resolver(
    '/tmp/test/',
    'de9f2c7fd25e1b3afad3e85a0bd17d9b100db4b3',
    'json',
    4,
    5
);

$resolver->fullName();
// /tmp/test/de9f2/c7fd2/5e1b3/afad3/de9f2c7fd25e1b3afad3e85a0bd17d9b100db4b3.json

$resolver->fullPath();
// /tmp/test/de9f2/c7fd2/5e1b3/afad3/

$resolver->file();
// de9f2c7fd25e1b3afad3e85a0bd17d9b100db4b3.json
```

repository: teodoroleckie/file-resolver

repo_name: teodoroleckie/file-resolver


text:
# Release Steps

## PyPI

_Note: To release a new Instana package, you must be a project member of the [Instana package project on Pypi](https://pypi.org/project/instana/).
Contact [Peter Giacomo Lombardo](https://github.com/pglombardo) to be added._

1. Before releasing, assure that [tests have passed](https://circleci.com/gh/instana/workflows/python-sensor) and that the package has also been manually validated in various stacks.
2. `git checkout master && git pull --rebase && pip install -U twine`
3. Bump the package version in `instana/version.py`. `git` commit & push the version change to the master branch
4. Create a [draft Release on Github](https://github.com/instana/python-sensor/releases) using [./bin/create_general_release.py](https://github.com/instana/python-sensor/blob/master/bin/create_general_release.py)
5. Run `python setup.py sdist bdist_wheel` to create the packages file in `./dist/`
6. Upload the package to Pypi with twine: `twine upload dist/instana-<version>*`
7. Validate the new release on https://pypi.org/project/instana/
8. Update Python documentation with latest changes: https://docs.instana.io/ecosystem/python/
9. Publish the draft release on [Github](https://github.com/instana/python-sensor/releases)
10. Ensure that the new [Concourse CI resource version](
    https://ci.instana.io/teams/tracer-community/pipelines/tracer-test-suite:main/resources/instana-python-package)
    has been discovered. Trigger it manually if the automation doesn't do it. Also ensure that the [update job](
    https://ci.instana.io/teams/tracer-community/pipelines/tracer-test-suite%3Amain/jobs/update-python-package/)
    and its downstream jobs are successfull. In particular the `run-test-suite` doesn't report any errors.

## AWS Lambda Layer

To release a new AWS Lambda layer, see `bin/aws-lambda/lambda_build_publish_layer.py`.

```bash
./bin/aws-lambda/build_and_publish_lambda_layer.py [-dev|-prod]
./bin/create_lambda_release.py <version>
```

These scripts assume that you have the AWS CLI and Github CLI installed and credentials already configured.

Post release, remember to update documentation and the Instana UI.

repository: instana/python-sensor

repo_name: instana/python-sensor


text:
This package contains implementations of the four algorithms for computing
the Fibonacci sequence.

The algorithms and their modular versions are implemented in ```fibonacci.hpp```.
The ```main.cpp``` program measures speed of computation of these algorithms. It takes three arguments:
number of algorithm, lower bound, upper bound and runs the chosen algorithm for all values between the bounds.
Algorithms 5-8 are modular versions of algorithms 1-4. For modular versions, the program computes Un mod n for
all n not divisible by 5 between the bounds.

Algorithms 1 and 5 are the slowest. Algorithm 2 and 6 are slightly faster than the rest,
however algorithm 6 cannot compute Uk mod n where k, n are not coprime.

The code uses the NTL library (https://libntl.org/).

Compiling
```
gcc main.cpp -pthread -lstdc++ -lntl -lgmp -lm
```

Example
```
./a.out 1 0 10000
Running algorithm 1 from 0 up to 10000.
duration (milliseconds): 101
```

license: Unlicense

repository: okrcma/pseudoprimes

repo_name: okrcma/pseudoprimes