<commit_before>! Copyright (C) 2010 <NAME>.
! See http://factorcode.org/license.txt for BSD license.
USING: dns io kernel math.parser sequences ;
IN: tools.dns

: a-line. ( host ip -- )
    [ write " has address " write ] [ print ] bi* ;

: a-message. ( message -- )
    [ message>query-name ] [ message>a-names ] bi
    [ a-line. ] with each ;

: mx-line. ( host pair -- )
    [ write " mail is handled by " write ]
    [ first2 [ number>string write bl ] [ print ] bi* ] bi* ;

: mx-message. ( message -- )
    [ message>query-name ] [ message>mxs ] bi
    [ mx-line. ] with each ;

: host ( domain -- )
    [ dns-A-query a-message. ]
    [ dns-AAAA-query a-message. ]
    [ dns-MX-query mx-message. ] tri ;<commit_msg>tools.dns: Show ipv6 ips in host command.<commit_after>! Copyright (C) 2010 <NAME>.
! See http://factorcode.org/license.txt for BSD license.
USING: dns io kernel math.parser sequences ;
IN: tools.dns

: a-line. ( host ip -- )
    [ write " has address " write ] [ print ] bi* ;

: aaaa-line. ( host ip -- )
    [ write " has IPv6 address " write ] [ print ] bi* ;

: a-message. ( message -- )
    [ message>query-name ] [ message>a-names ] bi
    [ a-line. ] with each ;

: (aaaa-message.) ( message -- )
    [ message>query-name ] [ message>aaaa-names ] bi
    [ aaaa-line. ] with each ;

: aaaa-message. ( message -- )
    [ a-message. ] [ (aaaa-message.) ] bi ;

: mx-line. ( host pair -- )
    [ write " mail is handled by " write ]
    [ first2 [ number>string write bl ] [ print ] bi* ] bi* ;

: mx-message. ( message -- )
    [ message>query-name ] [ message>mxs ] bi
    [ mx-line. ] with each ;

: host ( domain -- )
    [ dns-A-query a-message. ]
    [ dns-AAAA-query aaaa-message. ]
    [ dns-MX-query mx-message. ] tri ;
{'fraction_non_alphanumeric': 0.17113519680547631, 'fraction_numerical': 0.0068454078722190535, 'mean_word_length': 2.248148148148148, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4481187', 'n_tokens_mistral': 641, 'n_tokens_neox': 634, 'n_words': 165}