AHAngel Hinepikoeni.hashnode.dev·Jun 27, 2021 · 2 min readProcessing of Linked Lists in JavaFrom Eck, D. J. (2020). Introduction to programming using Java, version 8.1.2 Hobart and William Smith Colleges. http://math.hws.edu/javanotes: If head is a variable of type Node that points to the first node in the list, then the general form of th...00
AHAngel Hinepikoeni.hashnode.dev·Jun 9, 2021 · 1 min readTraversing Arrays and ArrayLists in Java with a For Loop and with a While LoopFor Loops Arrays: for (int i = 0; i < newArray.length; i++) { // Do something with the item in the Array at position i newArray[i] += 1; // Increment it for example } ArrayLists: for (int i = 0; i < newArrayList.size(); i++) { // Do something w...00
AHAngel Hinepikoeni.hashnode.dev·Jun 9, 2021 · 1 min readJava ArrayList methodsRemember that to add something at a certain index, use listName.add(i, "Thing to be added"); where i is the index where you want the item added. To change an item at a certain index, use listName.set(i, "New thing"); but remember that you can only ch...00
AHAngel Hinepikoeni.hashnode.dev·May 15, 2021 · 1 min readGenerating an SSH key to log into a target machineUse ssh-keygen to create a set of secure RSA keys, public and private, on your own machine Note the location of the private key Copy the public key SSH into the target machine Paste public key into ~/.ssh/authorized_users [sudo] nano ~/.ssh/authoriz...00
AHAngel Hinepikoeni.hashnode.dev·May 8, 2021 · 1 min readTHM Vulnversity - Privilege EscalationWe found a vulnerable web server and uploaded a PHP reverse shell, and activated it. We end up as the user www-data. To privilege escalate, we use Python to get an interactive shell: python -c 'import pty;pty.spawn("/bin/bash")' We know that /bin/...00