Recursion: Head vs Tail

This is mentioned in terms of scala when performing head recursion :

def factorital(n:Int): Int =
if(n==0) 1 else n*factorital(n-1)

translated to tail recursion in scala this would be

def factorial_tail_recursion(n:Int,value:Int): Int =
if(n==0) value
else factorial_tail_recursion(n-1,value*n)

a tail recursive option would be

 

Also useful in the coursera assignment :

http://alvinalexander.com/scala/how-add-elements-to-a-list-in-scala-listbuffer-immutable – nice guide to have a java like list in scala.

 

http://www.algorithmist.com/index.php/Coin_Change#Dynamic_Programming

Server Message blocks (SMB) protocol

nmap script for locating smb servers here

and info on the protocol here

with a tidbit on the packet types that are sent over the netbios/tcpip

The Microsoft SMB Protocol is a client-server implementation and consists of a set of data packets, each containing a request sent by the client or a response sent by the server. These packets can be broadly classified as follows:

  • Session control packets—Establishes and discontinues a connection to shared server resources.
  • File access packets—Accesses and manipulates files and directories on the remote server.
  • General message packets—Sends data to print queues, mailslots, and named pipes, and provides data about the status of print queues.

Useful revision

crosHere are just a few videos and tidbits i’ve found useful for revision for the off sec course.

TCP/IP

Subnetting

Hacking DNS

using tcpdump

This is particularly useful as the off sec videos don’t demonstrate how to read or write to file for analysis and how to limit to a given port

cross site scripting (css)

This comes useful when using the recon-ng tool that provides a bunch of domain related vulnerabilities. Seems pretty straight forward – make sure that you don’t have web apps that accept code injection into any search fields.

Enrolled onto Coursera scala course and PWK

So after a long hiatus of bad stuff happening i’ve decided to enrol onto the coursers course specialisation in scala and functional programming and the penetration testing with kali course. The later of which is renowned for being tough as nails to qualify from and the former has a lot of really good feedback.

IYou can read more about PWK here and about the functional programming principles specialisation here. Plus i’ll be adding some flair to my site with a coursera pin and a PWK pin.