Skip to content

Instantly share code, notes, and snippets.

--> .c3270.keymap.xxx
<Key>BTAB: BackTab
<Key>: Backspace() Delete()
--> .c3270pro
! Window size; 160x62 is maximum in PCOMM
@bigendiansmalls
bigendiansmalls / exploit.c
Created July 22, 2021 01:37
CVE-2021-33909
/*
* CVE-2021-33909: size_t-to-int vulnerability in Linux's filesystem layer
* Copyright (C) 2021 Qualys, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
.c3270pro
c3270.keymap: .c3270.keymap.xxx
############################################
.c3270.keymap.xxx
! below for linux and mac
<Key>BTAB: BackTab
! below needed for MAC only
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h> /* for wait */
#include <pwd.h>
#include <grp.h>
int main (int argc, char** argv) {
MODWSHEL CSECT # for racf only
MODWSHEL AMODE 31
YREGS
MAIN DS 0F
BAKR R14,0
LR 8,15 # copy R15 to R8
USING MAIN,8 # R8 for addressability throughout
MODESET KEY=ZERO, X
MODE=SUP
*
@bigendiansmalls
bigendiansmalls / sigs.sh
Created June 22, 2018 18:58
signal parser for linux (stolen from stackoverflow)
#!/bin/bash
sigparse () {
local i=0 bits
# bits="$(printf "16i 2o %X p" "0x$1" | dc)" # variant for busybox
bits="$(printf "ibase=16; obase=2; %X\n" "0x$1" | bc)"
while [ -n "$bits" ] ; do
i="$(expr "$i" + 1)"
case "$bits" in
*1) printf " %s(%s)" "$(kill -l "$i")" "$i" ;;
@bigendiansmalls
bigendiansmalls / zrules.patch
Created February 23, 2017 18:31
zrules for msf - because zrules!
##
# This patch ensures you only get z/OS themed logos when you
# start msfconsole. Cuz why not!
# Author: BeS
# Date: not yet, but working on it.
#
# Run (from root of your msf install)
# - patch -p1 -i zrules.patch
# - set or export ZRULES=1
# - start msfconsole as normal
@bigendiansmalls
bigendiansmalls / glibc.sh
Created January 23, 2017 02:51
rollback glibc for CentOS 7.3.1611 to version included with 7.2.1511
#!/bin/bash
# script to roll GLIBC back on CentOS 7.3 to version below
# no warranty of any kind, use at your own risk.
VER="-2.17-106.el7_2.6"
LIBS=$(echo -n $(yum list installed|grep glibc|awk ' { print $1 } '|cut -d '.' -f1)|sed "s/ /${VER} /g")${VER}
echo ${LIBS}
@bigendiansmalls
bigendiansmalls / EBCDIC-IBM1047-CODE-PAGE.txt
Last active June 20, 2023 19:57
EBCDIC <-> ASCII (IBM 1047) Code Page Complete
#############################################################################
#
# Compiled by BeS 9/15/2015
#
# IBM 1047 - Code page EBCDIC (Mainframe System Z MVS z/os OS/390)
#
# references
# https://www-01.ibm.com/software/globalization/ccsid/ccsid1047.html
# http://www.kreativekorp.com/charset/encoding.php?name=CP1047
# http://www-03.ibm.com/systems/z/os/zos/features/unix/bpxa1p03.html
#include <stdio.h>