summaryrefslogtreecommitdiffstats
path: root/todo/patrick.txt
blob: 7508afd78d4392630baeebef9f52e39a40404be7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
===

Currently working on:

-- LPEG in NSE.

-- HTTP Library in LPeg.

===

Maybe:

-- NSE Debugger. Look at Diman's implementation:
   http://seclists.org/nmap-dev/2008/q1/0228.html
   http://www.keplerproject.org/remdebug/

-- Review NSE Nsock Socket Allocation:
    o Dynamically increase socket slots if nothing has been done
      in the last ~5 seconds. Also decrease once traffic is working again.
      This resolves any sort of socket deadlock.

-- Deadlock identification and correction:
    o Add detection for deadlocks and print which threads are involved.
    o use above results to make a strategy for automatic deadlock resolution.

-- Look into moving Packet Module to C.

===

Done:

-- Review and Improve NSE Nsock Library.
     o Move away from C pointer references and allocation over to Lua.
       If a function ends in error, all the userdata will be collected.
       We would otherwise need to use pcalls everywhere to clean up
       and free malloc()'d memory.
     o Use thread calling nsock_loop (or currently running thread)
       for restoring waiting threads to the running queue.
       Making a function call on a yielded thread is a hack and
       could cause problems in the future.
     o Get rid of the static nsock_pool and use a dynamically allocated
       structure on a per-host-group basis.
     o Prepare for Lua 5.2 --> Change to real errors.

-- Update NSE Book Implementation Section.

-- Added boolean operator patch.

-- Update NSE --script section (book) to include Boolean operators.

-- Fix ceil for runlevels.

-- Solve Brandon's Segfault for thread's sockets and close them when
   the thread ends.

-- Change the error on finding the name of a nonexistent file in script.db
   into a non-fatal warning.

-- Correct nsock_connect to unlock the socket slot if the connection fails.

-- Remove packet.hextobin and packet.bintohex. Fix scripts that used them
   to instead use bin.(un)pack.

-- Commit --script-args patch and update the relevant section in the book.

-- Deadlock identification and correction:
    o Release mutexes upon script death.

-- Review NSE Nsock Socket Allocation:
    o Release socket locks on connection failure or timeout.
    o Track active sockets in the nsock library and don't rely on
      garbage collection for reallocation.

-- HTTP Caching:
    o Add ability to use a proxy to http.lua.
    o Test http.lua performance using local caching proxy.
    o Implement a cache in http.lua.