Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - kanen

#136
newLISP in the real world / Re: net-connect timeout
April 01, 2010, 11:35:16 AM
I get the impression this conversation sounds familiar to you. Didn't we have this exact same conversation at kozoru? :)



I suppose I am going to write a packet library for newLISP, then. As I need to be able to construct packets of arbitrary timeouts and with arbitrary header and payloads.



Has anyone written a libnet newLISP wrapper yet? If so, I would love to play with it.


Quote from: "Lutz"The C socket API, on which the newLISP net-xxx API is based, does not offer to set a timeout fosocket connection call. On UNIX this timeout is a kernel setting. On Mac OS X and other BSDs, you could use the sysctl shell utility to change this setting, and you could do that from inside newLISP using (exec "sysctl ...") with the appropiate ... specification.
#137
Using Dragonfly;



I am interested in having a user enter some text into a box and then have them click a button which will perform a newLISP def and return some results.



For example:



(your-name input box) Name: | John |

(JavaScript button) Submit



When the user clicks submit, it runs:


(define (Name your-name)
  (println "Hello: " your-name)
)


Seems simple, but my ant-like brain has not yet grok'd the fullness of Dragonfly.
#138
newLISP in the real world / net-connect timeout
March 31, 2010, 06:34:58 PM
Searched, but couldn't find an answer. I am not the most patient forum searcher, tho...



Is there a way to specify a net-connect timeout value so I do not spend too long trying to connect to a port that is not open or a system that is not online?



The default value, whatever it is, is too long for what I am doing and I need a shorter timeout.
#139
xytroxon,



Some of the comments on reddit  have a slight pungency of code-elitism, but ... being on reddit is apparently causing my visitors to basically double for the newLISP entry, which is great for the newLISP community.



Lutz will hopefully attest to my love for spreading the word.


Quote from: "xytroxon"It's on reddit, vote it up ;p)



http://www.reddit.com/r/programming/comments/bird1/the_thing_was_fast_i_mean_damn_fast_fast_the_way/">http://www.reddit.com/r/programming/com ... t_the_way/">http://www.reddit.com/r/programming/comments/bird1/the_thing_was_fast_i_mean_damn_fast_fast_the_way/



-- xytroxon
#140
Added to my blog post. Several people wrote me with "huh?" comments on the notation. :)


Quote from: "cormullion"Hi John - I see you're an old/newLISP master from Kozoru days - good to see you here, I hope you can teach us newcomers some nifty moves... :)



The only suggestion I'd propose to your excellent newLISP Bayes post would be to map round over the results:


(map (fn (n) (round n -2)) quoted)

because the scientific notation detracts from the scoring... :/
#141
RSS Feed?



I have searched and not been able to find an RSS Feed for the newLISP Fan Club Forum.



What am I missing?
Quote from: "cormullion"Just an admin question: I seem to have missed Tim's March 10 post in the "So, what can you actually DO with newLISP?" area because it didn't appear in the Active Topics list or in the RSS. Is this something I've done (cookies?) or a problem others are seeing?
#142
I am using it for kane|box - a network security tool I am working on. (I was the founder of nCircle Network Security).



I was writing the tool in Ruby, but Lutz (whom I have known for years) convinced me otherwise.



More on my blog: http://www.lifezero.org">www.LifeZero.org



P.S. I am seriously happy to see this code and I am already turning it into a module for my own purposes.


Quote from: "cormullion"Works fine here Lutz... (MacOS X 10.6.2, newLISP 10.1)



What's it for!?
#143
Wild!



I sent you an e-mail today about this very thing, then checked the boards and ... magically... here it is.



Reminds me of why I used newLISP all those years. So much community and help.



#awesome


Quote from: "Lutz"This packet sniffer is easily customized to your own needs:



http://www.newlisp.org/syntax.cgi?code/sniff.txt">http://www.newlisp.org/syntax.cgi?code/sniff.txt



On Mac OS X and UBUNTU linux the necessary libpcap is installed by default. On Windows goto http://www.winpcap.org/">http://www.winpcap.org/ to get wpcap.dll.



ps: also linked from the Tips&Tricks page
#144
Modified the unix.lsp code:


     "/usr/lib/libpcap.so.1.0.0"; UBUNTU 9.04
     ;"/usr/lib/libc.so" ; Linux, BSD, Solaris


Problem solved.
Quote from: "kanen"When I attempt to import the unix.lsp module, I get an "invalid ELF header" error.



The results are below.



I have tried the Ubuntu apt-get version and the version compiled from source. Both have the same problem.



Any ideas? Am I missing something obvious?


kanen@openkane:~/Source/newlisp-10.2.1$ ./newlisp
newLISP v.10.2.1 on Linux IPv4 UTF-8, execute 'newlisp -h' for more info.

> (load "unix.lsp")

ERR: problem loading library in function import : "/usr/lib/libc.so: invalid ELF header"
> kanen@openkane:~/Source/newlisp-10.2.1$ head /usr/lib/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so.2 ) )
#145
When I attempt to import the unix.lsp module, I get an "invalid ELF header" error.



The results are below.



I have tried the Ubuntu apt-get version and the version compiled from source. Both have the same problem.



Any ideas? Am I missing something obvious?


kanen@openkane:~/Source/newlisp-10.2.1$ ./newlisp
newLISP v.10.2.1 on Linux IPv4 UTF-8, execute 'newlisp -h' for more info.

> (load "unix.lsp")

ERR: problem loading library in function import : "/usr/lib/libc.so: invalid ELF header"
> kanen@openkane:~/Source/newlisp-10.2.1$ head /usr/lib/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so.2 ) )