Friday, December 4, 2015

Open Source Intelligence (OSINT) gathering tools and resources.


Open Source Intelligence (OSINT) gathering tools and resources.

  • Spokeo – People search engine and free white pages finds phone, address, email, and photos. Find people by name, email, address, and phone for free.
  • theHarvester – This tool is intended to help Penetration testers in the early stages of the penetration test in order to understand the customer footprint on the Internet. It is also useful for anyone that wants to know what an attacker can see about their organization.
  • Shodan – Search for computers based on software, geography, operating system, IP address and more
  • Maltego – Maltego is a unique platform developed to deliver a clear threat picture to the environment that an organization owns and operates. Maltego’s unique advantage is to demonstrate the complexity and severity of single points of failure as well as trust relationships that exist currently within the scope of your infrastructure.
  • Hoovers – Search over 85 million companies within 900 industry segments; Hoover’s Reports Easy-to-read reports on key competitors, financials, and executives
  • Market Visual – Search Professionals by Name, Company or Title
  • GEOCreepy – GEOCreepy is an application that allows you to gather geolocation related information about users from social networking platforms and image hosting services.
  • Recorded Future – Recorded Future intelligence analysis tools help analysts understand trends in big data, and foresee what may happen in the future. Groundbreaking algorithms extract temporal and predictive signals from unstructured text. Recorded Future organizes this information, delineates results over interactive timelines, visualizes past trends, and maps future events– all while providing traceability back to sources. From OSINT to classified data, Recorded Future offers innovative, massively scalable solutions.
  • Snoopy – Snoopy is a distributed tracking and profiling framework
  • Stalker – STALKER is a tool to reconstruct all captured traffic (wired or wireless alike) and parse out all of the “interesting” information disclosures.  It goes beyond just grabbing passwords and emails out of the air as it attempts to build a complete profile of your target(s).  You would be amazed at how much data you can collect in 15 minutes.
  • LittleSis – LittleSis is a free database of who-knows-who at the heights of business and government.
  • Entity Cube – EntityCube is a research prototype for exploring object-level search technologies, which automatically summarizes the Web for entities (such as people, locations and organizations) with a modest web presence.
  • TinEye – TinEye is a reverse image search engine currently in beta. Give it an image and it will tell you where the image appears on the web.
  • Google Hacking DB – Google Search Query Fu to find the secret sauce
  • MyIPNeighbours – My IP Neighbors lets you find out if any other web sites (“virtual hosts”) are hosted on a given web server.
  • Social Mention – Social Mention is a social media search engine that searches user-generated content such as blogs, comments, bookmarks, events, news, videos, and more
  • Glass Door – Search jobs then look inside. Company salaries, reviews, interview questions, and more – all posted anonymously by employees and job seekers.
  • NameCHK – Check to see if your desired username or vanity url is still available at dozens of popular Social Networking and Social Bookmarking websites.
  • Scythe – The ability to test a range of email addresses (or account names) across a range of websites (e.g. social media, blogging platforms, etc) to find where those targets have active accounts.
  • Recon-NG – A nice Python Script that automates recon on LinkedIn, Jigsaw, Shodan and some search engine fu.
  • Pushpin – Awesome little Python script that will identify every tweet, flicker pic and Youtube video within an area of a specific Geo address.
  • Silobreaker – Enterprise Semantic Search Engine, allows virtualisation of data, analytics and exploration of key data.
  • Google Trends – See what are the popular related topics people are searching for. This will help widen your search scope.
  • Google Alerts – Google Alerts are email updates of the latest relevant Google results (web, news, etc.) based on your queries.
  • Addict-o-matic – Nice little search aggregator. Allows you to enter a search term and build a page from search and social networking sites.
  • PasteLert – PasteLert is a simple system to search pastebin.com and set up alerts (like google alerts) for pastebin.com entries. This means you will automatically recieve email whenever your term(s) is/are found in new pastebin entries!
  • CheckUsernames – Check for usernames across 160 Social Networking Sites.
  • Whos Talkin – social media search tool that allows users to search for conversations surrounding the topics that they care about most.
  • 192 – Search for People, Businesses and Places in the UK.
  • TouchGraph SEO – Java based tool for importing and visualising various data types.
  • Tweet Archivist – Tweets are ephemeral. Tweets disappear. Why? That’s the way Twitter is designed. Tweet Archivist can save those tweets before they’re gone. Now, to be clear, Tweet Archivist is not an archive of every tweet ever tweeted. It doesn’t have a database of all tweets.
  • Whoisology – Handy little search engine based on Whois data to identify domains owned by a specific contact.
  • Carrot2 – Nice little visualisation search engine.
  • iSeek – Another handy search engine that break results down into easy to manage categories.
  • GlobalFileSearch – An FTP Search Engine that may come in handy.
  • NerdyData – Neat search engine that works at the source code level.
  • OneMillionTweetMap – Provides visual confirmation of tweets where geotags are enabled, also provides heatmaps for heavy tweet areas.
  • SpiderFoot – The main objective of SpiderFoot is to automate this process to the greatest extent possible, freeing up a penetration tester’s time to focus their efforts on the security testing itself.
  • Username Search – Handy site that will search multiple sites for usernames, email addresses and phone numbers.
  • PlaTO – Searchable list for sites that store credentials in plaintext (taken from Plaintext Offenders)
  • GitRob – Handy OSINT tool for finding interesting things related to an organisation in GitHub
  • LeakedIn – Aggregator site for data samples lost or disclosed online
  • Default Passwords List – Great list on CIRT.net of default passwords for various devices which often comes in handy.
  • Searchcode – Handy source code search engine to find code thats been shared online. May contain usernames, passwords, specific strings, etc.


Sunday, June 28, 2015

Gnu Go

Gnu Go

GNU Go is a free program that plays the game of Go. GNU Go has played thousands of games on the NNGS Go server. GNU Go is now also playing regularly on the Legend Go Server in Taiwan, on the WING server in Japan, and many volunteers run GNU Go clients on KGS. GNU Go has established itself as the leading non-commercial go program in the recent tournaments that it has taken part in.

GUIs capable of running GNU Go

  • qGo Windows / Linux / OSX. Also an IGS client
  • glGo
  • gGo
  • jago (Java)
  • cgoban1 (X Window-System)
  • drago. Has an autohandicap mode and can give score estimate at any time.
  • gogui (Java) Useful for a lot of experimentation with GNU Go via the GTP shell (but supports simple playing, too)
  • Emacs interface links: emacswiki
  • Sente Goban (Very nice Mac Os X client for GNU Go / IGS) goban
  • MultiGo
  • Many Faces of Go Play against GNUgo, or play GNUgo against any other program supporting GTP protocol.
  • SmartGo Play against GNU Go; supports Tourney between SmartGo and GNU Go or other GTP-enabled programs.
  • ccGo. Also an IGS client.
  • Quarry (GNU/Linux, GTK+-based).
  • Go Widget. Dashboard widget for Mac OSX. Play against GNU Go on a 9x9 board. Go Widget
  • wap-go.com. HTML-frontend to GTP-capable programs. Optimized to save traffic, allows to play against GNU Go from mobilephone or PDA using html-browser.
  • Monkeyjump (GNU/Linux, Python/SDL-based) Minimalistic. Play against GNU Go on various board sizes. Works with other GTP-capable programs. Configurable keybindings and themes.

GNU Go at go servers

The easiest way to play against GNU Go is to log on to one of the go servers below and challenge one of the many GNU Go bots.

Tuesday, June 23, 2015

Learn Programming


Online Courses & ScreencastsProgramming Books (Free)
JavaScriptCode Academy, Learn Street, Code Combat, Code AvengersEloquent JavaScript, JavaScript Guide,Speaking JS, JS The Right Way, Oh My JS,Canvassing
HTML & CSSCode Academy, Don’t Fear The Internet, Tutsplus,Learn Layout, A to Z CSS, Dash, Web Accessibility,The Hello World, Khan Academy, HTML5 from ScratchMozilla, Dive into HTML5, 20 Things I Learned,HTML Dog, HTML & CSS, HTML5 for Designers, DOM Enlightenment, HTML Canvas
jQueryCode Academy, Tutsplus, Code SchooljQuery Fundamentals, Learn jQuery
PythonCode Academy, Google, Learn Street, Python Tutor,IHeartPYPython for You and Me,  Dive into Python,Learn Python the Hard Way, Think Python,Python for Fun, Tango with Django, Django
Ruby & Ruby on RailsCode Academy, TryRubyCode Learn, Railscasts,Rubymonk, Learn StreetWhy’s (Poignant) Guide to Ruby, Learn Ruby the Hard Way, Learn to Program, Learn Rails by Example
PHPCode AcademyPHP Programming, Practical PHP
Also see: How to Learn Regular Expressions (RegEx)
Google Apps ScriptGetting Started, Office Hours, Google Scripts Examples, Learning Apps Script
WordPressTreehouse, WordPress TV
Linux & Shell ScriptingStanford.edu, Explain ShellConquer the Command Line
Node.jsNodetuts, Node SchoolThe Node Beginner Book, Mixu’s Node book,Node Up and Running, Mastering Node.js
Angular JSCode School, Egg Head, Learn AngularAngular JS Tutorial, Thinking Angular, Angular Tutorial, Getting Started (Adobe)
Also see: Learn Touch Typing & Code Faster
Git (version control)Code School, Git Immersion, GitHub Training, UdacityPro Git, Learn Git, Gists in Github
Objective-C (iOS & Mac)Code School, Stanford, iTunesU
Chrome Dev ToolsCode School, Dev Tools Secret, Chrome Dev Tools Tutorial, Udacity, Building Browser Apps
Go LanguageGolang.org, GopherCastsProgramming in Go, Go by Example, Learning Go, Building Web Apps with Go, Learning Go
JavaLearn Java, Coding Bat, Java Udemy, LearnerooProgramming in Java, Thinking in Java,O’Reilly Learning Java, Think Java, Java & CS,Java for Python Devs
Android App DevelopmentUdacity (Google Developers), Coursera, The New Boston, Google University, App Development Essentials, Code Learn, App Inventor (Visual)
D3 (data visualization)Data Visualization for the Web, Dashing D3, D3 Tips & Tricks
Also see: Learn VIM, the text editor for programmers
SQL (Databases)SQL Zoo, SQL @Stanford, Essential SQL, SQL for Nerds, Intro to SQL, SQL Bolt, PHP & MySQL

Saturday, June 6, 2015

MASSIVE OPEN ONLINE COURSE (MOOC)


Khan Academy

You only have to know one thing:
You can learn anything

EDUCAUSE 

EDUCAUSE is a nonprofit association whose mission is to advance higher education through the use of information technology.

EdX

EdX offers interactive online classes and MOOCs from the world’s best universities, colleges and organizations.

coursera

Coursera provides universal access to the world’s best education, partnering with top universities and organizations to offer courses for anyone to take, for free.

FutureLearn

Choose from hundreds of free online courses: from Language & Culture to Business & Management; Science & Technology to Health & Psychology.

MIT Open Courseware

MIT’s Open Courseware offers 2100 courses in a variety of topics, including Electrical Engineering and Computer Science.

Udacity

Udacity is a free service currently with 14 classes where, “You learn by solving challenging problems… with world-renowned university instructors.” 

Google Code University

It’s Google and it’s code, so yeah, it’s a pretty solid free resource, and obviously a good one if you are interested in Android development.

Mozilla Developer Network

Do you want to make your own websites and web apps? You've come to the right place!

HTML5 Rocks

The site has a lot of free info on HTML5, including blog posts, and tutorials.

The Code Player

Learn HTML5, CSS3, Javascript and more...

Codecademy

Learn to code interactively, for free.

General Assembly

Learn technology, design, and business skills from industry professionals in our global community.

Eloquent JavaScript

This is a book about JavaScript, programming, and the wonders of the digital. You can read it online here, or get your own paperback copy of the book.

Ruby Koans

The Koans walk you along the path to enlightenment in order to learn Ruby.

Learn Code The Hard Way

Downloaded more than 500 thousand times, Learn Python The Hard Way is proving to be an effective and fun book for learning to code.

Stack Overflow

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required. 

Coder Dojo

The global network of free computer programming clubs for young people. 

O’Reilly

At O'Reilly School of Technology you can master IT skills online, using coding to learn coding.

Scratch

Create stories, games, and animations Share with others around the world.

Tuts+

Tuts+ creates video courses and written tutorials to help you learn creative and technical skills.

Udemy

We’re the world’s online learning marketplace, where 7 million+ students are taking courses in everything from programming to yoga to photography–and much, much more.

Code School

Learn By Doing
No setup. No hassle. Just learning.

Processing

Processing is a programming language, development environment, and online community.

Code.org

Every student in every school should have the opportunity to learn computer science



Thursday, January 29, 2015

BOOT Chess

;----------RED-SECTOR-INC.-proudly-presents-a-33-year-old-record-:----------
;                   ___ _
;                  /     /         _____ _ _      _____ _ _        ___ _
;     .::.        /     /         /     /  /     /     /  /       /     /
;     ::::       /     / ____  .-/   _ ___/-. .-/   _ ___/-.     /     /__
;      ::       /            \ |    |  .    | |    |  .    |    /        /
;      ::            __ _     \     l  |    | |    l  |    |   /     ___/
;     .::.    /     /   /     /     |  l    |_|    l  |    |__/     / ____
;    .::::.        / __/            `--'           `--'            /      |
;   ::::::::                /                               /             |
;                    ___ __    Cl!   ___ ___ /      ___ _ _             __|
;        ___ _ _    /   __/_ __  _ _/      _/_   _ /_  /  /        ___ /__
;     /_/   /  / / /   / /            _____/ /  / /    __/      _ /   /  /
;  .-/     ___/   /     /______         /      ___\    \___    / /    __/
;  |      /      /     /       |     __/ ___  |    \       |  ___\    \___
;  |     /  ____               |    /       | |   _/       | |    \       |
;  |    /--/    |     ___/     |            | |            | |   _/       |
;  |            |    /  /  ::  | ____/  ::  | |  ::  \_____| |            |
;  |_____/  ::  | __/  /_______|    /_______| |_______\      |  ::  \_____|
;       /_______|     /___ _       /___ _         _ ___\     |_______\
;      /___ _                                                    _ ___\
; BootChess is the smallest computer implementation of chess on any platform
; Chess in a 512-byte x86 boot sector for Windows / Linux / OS X / DOS / BSD
; Coded by Olivier "Baudsurfer/RSi" Poudade with extra help of Peter "QKumba"
; Ferrie. Logo by Frederic "Cleaner/Break" Cambus. (c)2015 WTFPL v2 license. 
; "Fasm BootChess.asm" + "partcopy BootChess.bin 0 200 -f0" = PC floppy boot 
;-BootChess.asm-------------------;-----------------------------------------
x86 equ 1                         ; x86=1 PC/emu vs. win32b/(DOS)Box
saf equ 0                         ; saf=0 +queening -exotic failsafe 
_b equ byte                       ; DEFAULT SETTINGS ABOVE ARE FOR A
_w equ word                       ; STANDARD PC BOOTSECTOR +QUEENING 
_d equ dword                      ; x86=1 saf=0 512b  inc.  queening
_s equ short                      ; x86=1 saf=1 500b+ excl. queening  
_n equ near                       ; x86=0 saf=1 506b  inc.  queening
_f equ far                        ; x86=0 saf=0 487b  excl. queening
    if x86                        ; beg of boot vs .com preprocessing
    org 7c00h                     ; std start of bootsector after post
    if saf                        ; beg clear any start ambiguous segment
    jmp _f 0:fix                  ; 7c0:0000 vs. 0:7c000 cs para fix-up
    end if                        ; end clear any start ambiguous segment  
fix:push cs                       ; if post int 19h isr bootsrap loader 
    pop ds                        ; left any bda or shadow segment values 
    push cs                       ; then enforce ds=cs=0  
    pop es                        ; then enforce es=ds=cs=0
    mov aX,13h                    ; function set vga mode 320x200x256
    else                          ; else if 16-bit binary assume ah=0
    org 100h                      ; start of com binary program ip
    mov aL,13h                    ; function set vga mode 320x200x256
    end if                        ; end of boot vs .com preprocessing
    int 10h                       ; standard bios video api
    brd equ bf1+16                ; chess board at end of sector
    mov di,brd                    ; set physical board index
    mov bp,12                     ; set 6x8+8 empty sqr mid board lines
    call in2                      ; pass#1 black "rnbqkbnr" low-caps
    push word opn                 ; pass#2 hi-caps whites & fall-through
rle:lodsb                         ; al='.'/al=null (fixed length rle)
    mov cl,8                      ; empty sqr mid board line length
    rep stosb                     ; set one empty sqr mid board line
    dec bp                        ; all empty sqr mid brd lines inited ?
    jnz rle                       ; if not repeat init else bp=0 assumed
    mov ah,'A'-'a'                ; fall-through pass#2 white hi-caps
in2:mov si,br0                    ; si points to endrank "rnbqkbnr" str
    if x86=0                      ; if .com binary environment ch=0
    mov cL,8                      ; "rnbqkbnr" endrank str length
    else                          ; assume nothing although tempting 
    mov cX,8                      ; "rnbqkbnr" endrank str length
    end if                        ; end of register ch startup value
in3:lodsb                         ; read physical board str car
    add al,ah                     ; hi-caps rank 1 / low-caps rank 8
    stosb                         ; write physical board str car
    loop in3                      ; all "rnbqkbnr" str car written ?
    mov cl,8                      ; si-;equiv piece vals di-;0x88 brd
    rep movsb                     ; write logical 0x88 board str vals
    retn                          ; return to callers
ge0:mov bx,di                     ; physical board idx (bx=brd)
    mov dh,'1'                    ; beg white move src rank
ge1:mov dl,'h'                    ; beg white move src file
ge2:mov [si],dx                   ; beg white move src str
    mov ch,'1'                    ; beg white move dst rank
ge3:mov cl,'h'                    ; beg white move dst file
ge4:mov [si+2],cx                 ; beg white move dst str
    pusha                         ; save all values
    call idx                      ; passive chess coords to linear indexes
    jbe  mis                      ; white move src color not conforming
    push bx                       ; save white move dst idx
    call ver                      ; white move legal chess ?
    pop bx                        ; restore white move dst idx
    jc mis                        ; white move not legal chess
    mov di,num+3                  ; compare move destination rank in 7dfeh 
    inc si                        ; with move source rank in 7dfch 
    cmpsb                         ; is taxi distance to topmost bettered ? 
    jnc wor                       ; else not getting closer to black king
    cmp _b [di],'?'               ; does any fallback move exist yet ?
    jz lkj                        ; no, then last valid move good enough
wor:mov aL,_b[si+bx+brd-num-'a'+6]; yes, previous valid legal exist so 
    dec aL                        ; only override if it's a capture 
    js mis                        ; no, don't want worse taxi distance  
    mov bx,fs                     ; it's a capture with piece value=al
    cmp bL,aL                     ; but hightest capture value yet ?
    jnc mis                       ; no, less important opponent piece 
max:mov fs,bx                     ; fs=best move yet in taxi half-ply
lkj:dec si                        ; realign source index 
    dec si                        ; to copy dword bst=dword idx 
    movsd                         ; after 4096 tries : move=dword bst
mis:popa                          ; restore all values
    cmp cl,'a'                    ; end white move dst file ?
    loopnz ge4                    ; dec white move else next dst file
    inc ch                        ; inc white move dst rank
    cmp ch,'9'                    ; end white move dst rank ?
    jnz ge3                       ; else next move dst rank
cpx:inc bx                        ; inc physical board index
    dec dx                        ; dec white move src file
    cmp dl,'`'                    ; end white move src file ?
    jnz ge2                       ; else next move src file
    inc dh                        ; inc white move src rank
    cmp dh,ch                     ; end white move src rank ? ch=9
    jnz ge1                       ; else next move src rank
    push _d [si+4]                ; get best white move found
    pop _d [si]                   ; set it as final white move
val:mov cl,'.'                    ; valid : empty sqr replaces src piece
    call act                      ; active chess coords to linear indexes
    xor bp,3                      ; player turn and pawn unidir. delta
    jz ge0                        ; white turn to play (case best=0)
bla:mov al,'?'                    ; input str clear pattern
    mov di,si                     ; input str clear pattern (di=num)
    mov cx,8                      ; input str clear pattern
    rep stosb                     ; input str clear pattern (di=brd)
    call key                      ; get user keyboard input
    jbe bla                       ; black move src color not conforming
opn:call ver                      ; di=brd, black move legal chess ?
    jc bla                        ; white move not legal chess
    jmp _s  val                   ; validate black move
ver:call idx                      ; get lin indexes /w implicit passive
    xchg bx,dx                    ; switch bx=dst idx dx=src idx
    mov ah,[si+bx+brd-num-'a'+8]  ; get piece logical 0x88 brd val...
    mov dh,bl                     ; dh=src idx dl=dst idx
    sub dx,"aa"                   ; get move file zero-based indexes
    bsr bx,ax                     ; scan for 1st bit set (si=idx+10)
    movsx bx,[si+bx-10-num+tab]   ; bl=moved piece type idx (bh=0)
    mov cx,_w [si+bx-num+tab]     ; piece type deltas cl=repeats ch=num
    sahf                          ; set piece logical 0x88 brd val  
    jnp sp1                       ; branch if piece not pawn (bit#4!=1)
    jc sp2                        ; branch if pawn prev moved (bit#0=1)
sp1:jns sp3                       ; branch if piece not king (bit#7!=1)
sp2:mov cl,1                      ; override repeat if piece pawn or king
sp3:jnp sp4                       ; branch if piece not pawn (bit#4!=1)
    add bx,bp                     ; pawn player turn unidirection mutex
sp4:inc bx                        ; advance piece type struct field ptr
    and ah,11111100b              ; isolate piece bitmask only 
vl1:push cx                       ; save piece type deltas
    mov al,dh                     ; load start dst idx val
    inc bx                        ; advance piece type struct field ptr
vl2:add al,[si+bx-num+tab]        ; add this piece delta to dst idx val
    xchg aL,bL                    ; base reg=dst idx val and preserved
    mov ch,[si+bx+brd-num+8]      ; read projected dst square val
    xchg aL,bL                    ; base reg=piece type struct field ptr
    cmp al,dl                     ; wanted move found (src+delta(s)=dst) ?
    jnz dif                       ; different than requested move
sam:sahf                          ; get piece logical 0x88 brd val in flgs
    jnp yes                       ; branch if piece is not pawn (bit#2=0)
    test [si+bx-num+tab],1        ; pawn piece delta parity=diag vs. vert
    jz ord                        ; branch if pawn piece moving vert
    test ch,ch                    ; pawn piece vert move=;eating ?
    jnz yes                       ; capturing verify dst sqr not empty
    jmp _s bad                    ; else illegal chess move is a miss
ord:test ch,ch                    ; pawn piece vert move=;no eating ?
    jz yes                        ; no eating=;empty dst sqr else illegal
dif:sahf                          ; store piece nature in flags register
    jnp skp                       ; not pawn piece so skip direction test
    test [si+bx-num+tab],1        ; pawn piece delta parity=diag vs. vert
    jnz bad                       ; diagonal pawn move is illegal
skp:test ch,ch                    ; else skipping over dst square val ?
    jnz bad                       ; projected dst sqr val is not empty
    sahf                          ; get piece logical 0x88 brd val in flgs
    jz x88                        ; branch if piece is queen (bit#6=1)
    jna bad                       ; branch if piece is not knight(bit#4=0)
x88:test al,88h                   ; ch=0 dst out of physical board limits?
    loopz vl2                     ; else cont if delta repeats remain
bad:pop cx                        ; restore piece type deltas
    dec ch                        ; all possible delta nums verified ?
    jnz vl1                       ; if not then cont next delta type
nok:stc                           ; else return /w no match flg set
    retn                          ; return to caller
yes:pop cx                        ; correct entry sp and disregard count
    retn                          ; return to caller(s)
key:call prt                      ; refresh screen to account input echo
    xor bx,bx                     ; bx=str idx=odd/even/alpha/num mutex
kbd:cbw                           ; fun blocking wait for keystroke (ah=0)
    int 16h                       ; std bios keybd api (ah=scan al=ascii)
esc:dec ah                        ; was esc key pressed to quit ?
    jnz car                       ; else default process key input
xit:if x86                        ; if x86 boot context environment
    int 19h                       ; exit through bootstrap to reboot cpu
    else                          ; else if .com 16-bit binary
    int 20h                       ; dos 1+ - terminate program
    end if                        ; end of exit methods (os load or shell)
car:mov [bx+si],al                ; sav ascii val to move string (si=num)
prt:pusha                         ; save game state snapshot
    cwd                           ; curs location dx=(0,0)=(row,column)
    mov ax,1301h                  ; function ega write str write mode 1
    mov bl,7                      ; page 0 grey car attrib matching tty
    mov cl,8                      ; src str lngth (curs updated horiz)
    mov bp,bf1                    ; es:bp is "abcdefgh" ptr
lns:int 10h                       ; standard bios video api
    add bp,16                     ; bp=para step siz separating strings
    push ax                       ; save old bios video api func params
    mov ax,0e39h                  ; function teletype outp car=rank '9'
    sub al,dh                     ; decrement right handside rank value
    int 10h                       ; standard bios video api
    pop ax                        ; restore old bios video api fx params
    cmp dh,cl                     ; src str total (curs updated vert)
    inc dh                        ; preemptive off-by-one allows 9 verts
    jc lns                        ; all 9 brd gui row strings printed ?
    mov bp,si                     ; 10th row tail bp=move coords, cl=8
    int 10h                       ; standard bios video api
    popa                          ; restore game state snapshot
    inc bx                        ; test if any more keys ?
    cmp bl,4                      ; frFR format input string
    jc kbd                        ; else continue input 
idx:loop idx                      ; ch=0 passive call load src/dst lin idx
act:mov si,num                    ; reinit si to point to coord input str.
    mov bx,[si]                   ; bx=src coord (pass#1)
    cbw                           ; empty sqr val in logical 0x88 board
    call put                      ; place param passed as fun pass#1
    mov dx,[si+2]                 ; bx=dst idx dx=src idx
    xchg bx,dx                    ; fall-through for second pass
    push word mat                 ; test for checkmate and conforming
put:xchg ax,bx                    ; bx|dx=[num+di]+16*((8-'0')-[num+di+1])
    aad -10h                      ; shl ah,4/sub al,ah/xor ah,ah
    add al,80h                    ; bx|dx=al-640%256-16*ah
    xchg ax,bx                    ; bx|dx=al+128-16*ah
    jcxz sim                      ; active call request or simulation ?
    if saf=0                      ; standard non-failsafe queening
    cmp _b [si+3],'8'             ; validated dst rank is top-most ?    
    jz qq                         ; if so then promote pawn to queen
    cmp _b [si+3],'1'             ; validated dst rank is bottom-most ?
    jnz prm                       ; if not no pawn queening promotion
qq: sahf                          ; store piece nature in flag register
    jnp prm                       ; no pawn queening promotion  
    xor ah,01000110b              ; transform p to promoted queen
    inc cx                        ; queen promotion p2q or P2Q
    end if                        ; end of conditional queening
prm:xchg ah,[si+bx+brd-num-'a'+8] ; update piece logical 0x88 board val
    xchg cl,[si+bx+brd-num-'a']   ; update piece physical board ascii val
    or ah,1                       ; update piece moved once (bit#0)
sim:retn                          ; return to caller(s)
mat:sahf                          ; catured piece king and mate ?
    js xit                        ; if piece is king then game is over
    call chk                      ; move src color conforming ?
    jnz nok                       ; move src color not conforming
chk:xchg bx,dx                    ; src idx <- span=""> dst idx
    mov al,[si+bx+brd-num-'a']    ; pass#1:src idx pass#2:dst idx di=brd
    xor _b [si+len-num],8         ; self-modif 8/26 val=[1;8]/[a(A);z(Z)]
    mov cl,-'a'                   ; assert black piece car interval
    test bp,bp                    ; test whose turn it is to play
    jnz lim                       ; assert white piece car interval
    mov cl,-'A'                   ; al=ascii value cl=-(lower boundery)
lim:xadd al,cl                    ; tmp=al+cl cl=al al=tmp +fall-trough
    db 0d4h                       ; aam <self-modified value>
len:db 12h                        ; ah=al/8 al%=8
    mov al,cl                     ; al=restored ascii value
    test ah,ah                    ; set/clear zf=0 success zf=1 failure
    retn                          ; return to caller(s) nb: destroys ah
tab db p-tab,r-tab,n-tab,b-tab    ; piece type mov offset array
    db q-tab,q-tab                ; note original 1K ZX Chess q=k trick
br0 db "rnbqkbnr",8,16,32,64,128  ; end rank pattern + beg piece values
    db 32,16,8,'p',4,'.',0,'.',0  ; end piece values + beg mid board reps
    db '.',0,'.',0,'P',4          ; ... end mid board reps
p   db 2,3,-10h,-15,-17,10h,15    ; bit#2 pf=04 p[6]=r[0] overlay
r   db 17,4,10h,-1h,-10h          ; bit#3 ??=08 r[5]=n[0] overlay
n   db 1,8,1fh,21h,12h,-0eh,-1fh  ; bit#4 af=16 n[9]=b[0] overlay
    db -21h,-12h                  ; ... end of knight moves list
b   db 0eh,4,-0fh,11h,-11h        ; bit#5 ??=32 b[5]=q[0] overlay
q   db 0fh,8,10h,11h,0fh,1h,-10h  ; bit#6 zf=64 k=q except k[0]=1
    db -11h,-0fh,-1h              ; ... end of queen/king moves list
bf1 db "abcdefgh"                 ; gui file index string
num db "e2e4"                     ; hardcoded Ruy Lopez opening
    if saf and x86                ; x86 failsafe exotic boot environment
    times 510-($-$$) db 0         ; nul padding if necessary
    org 7df0h                     ; boot signature vbr/mbr standard offset
    sig db 55h,0aah               ; magic number no-endian boot signature
    end if                        ; end of conditional failsafe signature