[14750] 2019-10-28_基于开源蜜罐的实践与功能扩展

文档创建者:s7ckTeam
浏览次数:7
最后更新:2025-01-18
2019-10-28_基于开源蜜罐的实践与功能扩展 L U A   F r e e B u f   2 0 1 9 - 1 0 - 2 8 0 x 0 0   h t t p m y s q l F T P f t p 2 1 2 1 F T P 访 访 访 P a y l o a d P a y l o a d I P I P 使 U I a ) O p e n c a n a r y b ) D a s h b o a r d O p e n C a n a r y H f i s h O p e c a n a r y O p e n C a n a r y O p e n C a n a r y 2 0 1 5 P y t h o n   P y t h o n O p e n c a n a r y O p e n C a n a y U I O p e n c a n a r y t w i s t e d p y t h o n 0 x 0 1   P y t h o n o p e n c a n a r y P y t h o n P y t h o n P y t h o n v i r t u a l e n v O p e n c a n a n r y p i p O p e n c a n a r y P y t h o n 2 . 7 P y t h o n P y t h o n O p e n c a n a r y 0 x 0 2   使 v i r t u a l e n v P y t h o n P y t h o n p i p 2 . 1   P I P P I P P y t h o n : p y t h o n - d e v e p y t h o n p y t h o n . h p i p 2 . 2   V i r t u a l E n v v i r t u a l e n v 使 p y t h o n r o o t v i r t u a l e n v / r o o t / . v i r t u a l e n v s / / u s r / l i b / p y t h o n 2 . 7 / s i t e - p a c k a g e s / o p e n c a n a r y o p e n c a n a r y p y t h o n 2 . x g i t h u b v i r t u a l e n v , p y t h o n p y t h o n 2 . 7 2 . 3   P y t h o n . b a s h _ p r o f i l e v i r t u a l e v n w r a p p e r . s h / u s r / l o c a l / b i n / u s r / b i n   s h e l l s h e l l p y t h o n   g e t - p i p . p y s u d o   p i p   i n s t a l l   v i r t u a l e n v s u d o   p i p   i n s t a l l   v i r t u a l e n v w r a p p e r   - - u p g r a d e   - - i g n o r e - i n s t a l l e d s o u r c e   / u s r / l o c a l / b i n / v i r t u a l e n v w r a p p e r . s h
m k v i r t u a l e n v p y 2 7 p y 2 7 P y t h o n 2 . 4   O p e n c a n a n r y p i p o p e n c a n a r y 0 x 0 3   O p e n c a n a r y F T P c o p y c o n f i g / r o o t / . o p e n c a n a r y . c o n f o p e n c a n a r y F T P H T T P P r o x y M S S Q L M y S Q L N T P P o r t s c a n R D P S a m b a S I P S N M P S S H T e l n e t T F T P V N C f t p m k v i r t u a l e n v   p y 2 7   - p   / u s r / b i n / p y t h o n w o r k o n   p y 2 7 s u d o   p i p   i n s t a l l   o p e n c a n a r y o p e n c a n a r y d   - - c o p y c o n f i g f r o m   o p e n c a n a r y . m o d u l e s   i m p o r t   C a n a r y S e r v i c e f r o m   t w i s t e d . a p p l i c a t i o n   i m p o r t   i n t e r n e t f r o m   t w i s t e d . p r o t o c o l s . f t p   i m p o r t   F T P F a c t o r y ,   F T P R e a l m ,   F T P ,   U S R _ L O G G E D _ I N _ P R O C E E D ,   G U E S T _ L O G G E D _ I N _ P R O C E E D ,   I F T P S h e l l ,   A u t h o r i z a t i o n E r r o r f r o m   t w i s t e d . c r e d . p o r t a l   i m p o r t   P o r t a l f r o m   z o p e . i n t e r f a c e   i m p o r t   i m p l e m e n t s f r o m   t w i s t e d . c r e d . c h e c k e r s   i m p o r t   I C r e d e n t i a l s C h e c k e r f r o m   t w i s t e d . p y t h o n   i m p o r t   f a i l u r e f r o m   t w i s t e d . c r e d   i m p o r t   e r r o r   a s   c r e d _ e r r o r ,   c r e d e n t i a l s F T P _ P A T H   =   " / b r i a r / d a t a / f t p " c l a s s   D e n y A l l A c c e s s : i m p l e m e n t s ( I C r e d e n t i a l s C h e c k e r ) c r e d e n t i a l I n t e r f a c e s   =   ( c r e d e n t i a l s . I A n o n y m o u s ,   c r e d e n t i a l s . I U s e r n a m e P a s s w o r d ) d e f   r e q u e s t A v a t a r I d ( s e l f ,   c r e d e n t i a l s ) : r e t u r n   f a i l u r e . F a i l u r e ( c r e d _ e r r o r . U n a u t h o r i z e d L o g i n ( ) ) c l a s s   L o g g i n g F T P ( F T P ) : # r i p p e d   f r o m   m a i n   F T P   c l a s s ,   o v e r r i d d e n   t o   e x t r a c t   c o n n e c t i o n   i n f o d e f   f t p _ P A S S ( s e l f ,   p a s s w o r d ) : " " " S e c o n d   p a r t   o f   l o g i n .   G e t   t h e   p a s s w o r d   t h e   p e e r   w a n t s   t o a u t h e n t i c a t e   w i t h . " " " i f   s e l f . f a c t o r y . a l l o w A n o n y m o u s   a n d   s e l f . _ u s e r   = =   s e l f . f a c t o r y . u s e r A n o n y m o u s : #   a n o n y m o u s   l o g i n c r e d s   =   c r e d e n t i a l s . A n o n y m o u s ( ) r e p l y   =   G U E S T _ L O G G E D _ I N _ P R O C E E D e l s e : #   u s e r   l o g i n c r e d s   =   c r e d e n t i a l s . U s e r n a m e P a s s w o r d ( s e l f . _ u s e r ,   p a s s w o r d ) r e p l y   =   U S R _ L O G G E D _ I N _ P R O C E E D l o g d a t a   =   { ' U S E R N A M E ' :   s e l f . _ u s e r ,   ' P A S S W O R D ' :   p a s s w o r d } s e l f . f a c t o r y . c a n a r y s e r v i c e . l o g ( l o g d a t a ,   t r a n s p o r t = s e l f . t r a n s p o r t ) d e l   s e l f . _ u s e r
f t p 8 0 使 t w i s t e d m o u l e s F T P 访 f t p G U I d e f   _ c b L o g i n ( ( i n t e r f a c e ,   a v a t a r ,   l o g o u t ) ) : a s s e r t   i n t e r f a c e   i s   I F T P S h e l l ,   " T h e   r e a l m   i s   b u s t e d ,   j e r k . " s e l f . s h e l l   =   a v a t a r s e l f . l o g o u t   =   l o g o u t s e l f . w o r k i n g D i r e c t o r y   =   [ ] s e l f . s t a t e   =   s e l f . A U T H E D r e t u r n   r e p l y d e f   _ e b L o g i n ( f a i l u r e ) : f a i l u r e . t r a p ( c r e d _ e r r o r . U n a u t h o r i z e d L o g i n ,   c r e d _ e r r o r . U n h a n d l e d C r e d e n t i a l s ) s e l f . s t a t e   =   s e l f . U N A U T H r a i s e   A u t h o r i z a t i o n E r r o r d   =   s e l f . p o r t a l . l o g i n ( c r e d s ,   N o n e ,   I F T P S h e l l ) d . a d d C a l l b a c k s ( _ c b L o g i n ,   _ e b L o g i n ) r e t u r n   d c l a s s   C a n a r y F T P ( C a n a r y S e r v i c e ) : N A M E   =   ' f t p ' d e f   _ _ i n i t _ _ ( s e l f , c o n f i g = N o n e ,   l o g g e r = N o n e ) : C a n a r y S e r v i c e . _ _ i n i t _ _ ( s e l f ,   c o n f i g = c o n f i g ,   l o g g e r = l o g g e r ) s e l f . b a n n e r   =   c o n f i g . g e t V a l ( ' f t p . b a n n e r ' ,   d e f a u l t = ' F T P   R e a d y . ' ) . e n c o d e ( ' u t f 8 ' ) s e l f . p o r t   =   c o n f i g . g e t V a l ( ' f t p . p o r t ' ,   d e f a u l t = 2 1 ) #   f i n d   a   p l a c e   t o   c h e c k   t h a t   l o g t y p e   i s   i n i t i a l i s e d #   f i n d   a   p l a c e   t o   c h e c k   t h a t   f a c t o r y   h a s   s e r v i c e   a t t a c h e d s e l f . l o g t y p e   =   l o g g e r . L O G _ F T P _ L O G I N _ A T T E M P T s e l f . l i s t e n _ a d d r   =   c o n f i g . g e t V a l ( ' d e v i c e . l i s t e n _ a d d r ' ,   d e f a u l t = ' ' ) d e f   g e t S e r v i c e ( s e l f ) : p   =   P o r t a l ( F T P R e a l m ( F T P _ P A T H ) ,   [ D e n y A l l A c c e s s ( ) ] ) f   =   F T P F a c t o r y ( p ) f . p r o t o c o l   =   L o g g i n g F T P f . w e l c o m e M e s s a g e   =   s e l f . b a n n e r f . c a n a r y s e r v i c e   =   s e l f r e t u r n   i n t e r n e t . T C P S e r v e r ( s e l f . p o r t ,   f ,   i n t e r f a c e = s e l f . l i s t e n _ a d d r ) f r o m   t w i s t e d . a p p l i c a t i o n   i m p o r t   i n t e r n e t f r o m   t w i s t e d . p r o t o c o l s . f t p   i m p o r t   F T P F a c t o r y ,   F T P R e a l m ,   F T P ,   U S R _ L O G G E D _ I N _ P R O C E E D ,   G U E S T _ L O G G E D _ I N _ P R O C E E D ,   I F T P S h e l l ,   A u t h o r i z a t i o n E r r o r { " d e v i c e . n o d e _ i d " :   " o p e n c a n a r y - 1 " , " g i t . e n a b l e d " :   f a l s e , " g i t . p o r t "   :   9 4 1 8 , " f t p . e n a b l e d " :   t r u e , " f t p . p o r t " :   2 1 , " f t p . b a n n e r " :   " F T P   s e r v e r   r e a d y " , " h t t p . b a n n e r " :   " A p a c h e / 2 . 2 . 2 2   ( U b u n t u ) " , " h t t p . e n a b l e d " :   f a l s e , " h t t p . p o r t " :   8 0 , " h t t p . s k i n " :   " n a s L o g i n " , " h t t p . s k i n . l i s t " :   [ { " d e s c " :   " P l a i n   H T M L   L o g i n " , " n a m e " :   " b a s i c L o g i n " } , { " d e s c " :   " S y n o l o g y   N A S   L o g i n " , " n a m e " :   " n a s L o g i n " } ] , " h t t p p r o x y . e n a b l e d "   :   f a l s e , " h t t p p r o x y . p o r t " :   8 0 8 0 , " h t t p p r o x y . s k i n " :   " s q u i d " , " h t t p r o x y . s k i n . l i s t " :   [ { " d e s c " :   " S q u i d " , " n a m e " :   " s q u i d " } , { " d e s c " :   " M i c r o s o f t   I S A   S e r v e r   W e b   P r o x y " , " n a m e " :   " m s - i s a " } ] , " l o g g e r " :   { " c l a s s " :   " P y L o g g e r " , " k w a r g s " :   { " f o r m a t t e r s " :   { " p l a i n " :   { " f o r m a t " :   " % ( m e s s a g e ) s "
- - c o p y c o n f i g O p e n c a n a r y . e n a b l e d t r u e - - r e s t a r t o p e n c a n a r y " f o r m a t " :   " % ( m e s s a g e ) s " } } , " h a n d l e r s " :   { " c o n s o l e " :   { " c l a s s " :   " l o g g i n g . S t r e a m H a n d l e r " , " s t r e a m " :   " e x t : / / s y s . s t d o u t " } , " f i l e " :   { " c l a s s " :   " l o g g i n g . F i l e H a n d l e r " , " f i l e n a m e " :   " / v a r / t m p / o p e n c a n a r y . l o g " } } } } , " p o r t s c a n . e n a b l e d " :   f a l s e , " p o r t s c a n . l o g f i l e " : " / v a r / l o g / k e r n . l o g " , " p o r t s c a n . s y n r a t e " :   5 , " p o r t s c a n . n m a p o s r a t e " :   5 , " p o r t s c a n . l o r a t e " :   3 , " s m b . a u d i t f i l e " :   " / v a r / l o g / s a m b a - a u d i t . l o g " , " s m b . e n a b l e d " :   f a l s e , " m y s q l . e n a b l e d " :   f a l s e , " m y s q l . p o r t " :   3 3 0 6 , " m y s q l . b a n n e r " :   " 5 . 5 . 4 3 - 0 u b u n t u 0 . 1 4 . 0 4 . 1 " , " s s h . e n a b l e d " :   f a l s e , " s s h . p o r t " :   2 2 , " s s h . v e r s i o n " :   " S S H - 2 . 0 - O p e n S S H _ 5 . 1 p 1   D e b i a n - 4 " , " r e d i s . e n a b l e d " :   f a l s e , " r e d i s . p o r t " :   6 3 7 9 , " r d p . e n a b l e d " :   f a l s e , " r d p . p o r t " :   3 3 8 9 , " s i p . e n a b l e d " :   f a l s e , " s i p . p o r t " :   5 0 6 0 , " s n m p . e n a b l e d " :   f a l s e , " s n m p . p o r t " :   1 6 1 , " n t p . e n a b l e d " :   f a l s e , " n t p . p o r t " :   " 1 2 3 " , " t f t p . e n a b l e d " :   f a l s e , " t f t p . p o r t " :   6 9 , " t c p b a n n e r . m a x n u m " : 1 0 , " t c p b a n n e r . e n a b l e d " :   f a l s e , " t c p b a n n e r _ 1 . e n a b l e d " :   f a l s e , " t c p b a n n e r _ 1 . p o r t " :   8 0 0 1 , " t c p b a n n e r _ 1 . d a t a r e c e i v e d b a n n e r " :   " " , " t c p b a n n e r _ 1 . i n i t b a n n e r " :   " " , " t c p b a n n e r _ 1 . a l e r t s t r i n g . e n a b l e d " :   f a l s e , " t c p b a n n e r _ 1 . a l e r t s t r i n g " :   " " , " t c p b a n n e r _ 1 . k e e p _ a l i v e . e n a b l e d " :   f a l s e , " t c p b a n n e r _ 1 . k e e p _ a l i v e _ s e c r e t " :   " " , " t c p b a n n e r _ 1 . k e e p _ a l i v e _ p r o b e s " :   1 1 , " t c p b a n n e r _ 1 . k e e p _ a l i v e _ i n t e r v a l " : 3 0 0 , " t c p b a n n e r _ 1 . k e e p _ a l i v e _ i d l e " :   3 0 0 , " t e l n e t . e n a b l e d " :   f a l s e , " t e l n e t . p o r t " :   " 2 3 " , " t e l n e t . b a n n e r " :   " " , " t e l n e t . h o n e y c r e d s " :   [ { " u s e r n a m e " :   " a d m i n " , " p a s s w o r d " :   " $ p b k d f 2 - s h a 5 1 2 $ 1 9 0 0 0 $ b G 1 N a Y 3 x v j d G y B l j 7 N 3 7 X w $ d G r m B q q W a 1 o k T C p N 3 Q E m e o 9 j 5 D u V 2 u 1 E u V F D 8 D i 0 G x N i M 6 4 T o 5 O / Y 6 6 f 7 U A S v n Q r 8 . L C z q T m 6 a w C 8 K j / a G K v w A " } , { " u s e r n a m e " :   " a d m i n " , " p a s s w o r d " :   " a d m i n 1 " } ] , " m s s q l . e n a b l e d " :   f a l s e , " m s s q l . v e r s i o n " :   " 2 0 1 2 " , " m s s q l . p o r t " : 1 4 3 3 , " v n c . e n a b l e d " :   f a l s e , " v n c . p o r t " : 5 0 0 0 } o p e n c a n a r y d   - - s t a r t n e t s t a t   - p l u n t
使 - - h e l p 0 x 0 4   O p e n c a n a r y , H I D S O p e n c a n a r y F T P O p e n c a n a r y F T P 1 9 2 . 1 6 8 . 0 . 6 o p e n c a n a r y f t p 访 j s o n j s o n 1 9 2 . 1 6 8 . 0 . 6 2 1 f t p 访 O p e n C a n a r y f t p p y t h o n t w i s t e d 访 p a y l o g o p e n c a n a r y . c o n f / u s r / t m p / o p e n c a n a r y . l o g o p e n c a n a r y o p e n c a n a r y 4 . 1   H T T P 4 . 2   F T P 4 . 3   S S H n e t s t a t   - p l u n t t c p   0   0   0 . 0 . 0 . 0 : 2 2 2 2   0 . 0 . 0 . 0 : *   L I S T E N   1 2 6 8 3 / p y t h o n t c p   0   0   0 . 0 . 0 . 0 : 8 0 8 0   0 . 0 . 0 . 0 : *   L I S T E N   1 2 6 8 3 / p y t h o n t c p   0   0   0 . 0 . 0 . 0 : 8 0   0 . 0 . 0 . 0 : *   L I S T E N   1 2 6 8 3 / p y t h o n t c p   0   0   0 . 0 . 0 . 0 : 2 1   0 . 0 . 0 . 0 : *   L I S T E N   1 2 6 8 3 / p y t h o n t c p   0   0   0 . 0 . 0 . 0 : 2 3   0 . 0 . 0 . 0 : *   L I S T E N   1 2 6 8 3 / p y t h o n t c p   0   0   0 . 0 . 0 . 0 : 1 4 3 3   0 . 0 . 0 . 0 : *   L I S T E N   1 2 6 8 3 / p y t h o n t c p   0   0   0 . 0 . 0 . 0 : 3 3 8 9   0 . 0 . 0 . 0 : *   L I S T E N   1 2 6 8 3 / p y t h o n t c p   0   0   0 . 0 . 0 . 0 : 8 0 0 1   0 . 0 . 0 . 0 : *   L I S T E N   1 2 6 8 3 / p y t h o n t c p   0   0   0 . 0 . 0 . 0 : 5 0 0 0   0 . 0 . 0 . 0 : *   L I S T E N   1 2 6 8 3 / p y t h o n t c p   0   0   0 . 0 . 0 . 0 : 9 4 1 8   0 . 0 . 0 . 0 : *   L I S T E N   1 2 6 8 3 / p y t h o n t c p   0   0   0 . 0 . 0 . 0 : 3 3 0 6   0 . 0 . 0 . 0 : *   L I S T E N   1 2 6 8 3 / p y t h o n t c p   0   0   0 . 0 . 0 . 0 : 6 3 7 9   0 . 0 . 0 . 0 : *   L I S T E N   1 2 6 8 3 / p y t h o n u d p   0   0   0 . 0 . 0 . 0 : 5 7 1 9 7   0 . 0 . 0 . 0 : *   8 9 9 4 / p y t h o n u d p   0   0   0 . 0 . 0 . 0 : 5 0 6 0   0 . 0 . 0 . 0 : *   1 2 6 8 3 / p y t h o n u d p   0   0   0 . 0 . 0 . 0 : 6 9   0 . 0 . 0 . 0 : *   1 2 6 8 3 / p y t h o n u d p   0   0   0 . 0 . 0 . 0 : 1 2 3   0 . 0 . 0 . 0 : *   1 2 6 8 3 / p y t h o n u d p   0   0   0 . 0 . 0 . 0 : 1 6 1   0 . 0 . 0 . 0 : *   1 2 6 8 3 / p y t h o n o p e n c a n a r y d   - - r e s t a r t o p e n c a n a r y d   - - s t o p o p e n c a n a r y d   - - h e l p f t p   1 9 2 . 1 6 8 . 0 . 6 [ r o o t @ l o c a l h o s t   o p e n c a n a r y ] #   f t p   1 9 2 . 1 6 8 . 0 . 6 C o n n e c t e d   t o   1 9 2 . 1 6 8 . 0 . 6   ( 1 9 2 . 1 6 8 . 0 . 6 ) . 2 2 0   F T P   s e r v e r   r e a d y N a m e   ( 1 9 2 . 1 6 8 . 0 . 6 : r o o t ) :   t e s t 3 3 1   P a s s w o r d   r e q u i r e d   f o r   t e s t . P a s s w o r d : 5 3 0   S o r r y ,   A u t h e n t i c a t i o n   f a i l e d . L o g i n   f a i l e d . f t p > { " s r c _ p o r t " :   3 5 9 9 0 ,   " l o g d a t a " :   { " U S E R N A M E " :   " t e s t " ,   " P A S S W O R D " :   " 1 2 3 4 5 6 " } ,   " l o g t y p e " :   2 0 0 0 ,   " d s t _ h o s t " :   " 1 9 2 . 1 6 8 . 0 . 6 " ,   " d s t _ p o r t " :   2 1 ,   " s r c _ h o s t " :   " 1 9 2 . 1 6 8 . 0 . 5 " } c u r l   0 . 0 . 0 . 0 : 8 0 { " d s t _ h o s t " :   " 1 7 2 . 1 8 . 2 0 0 . 5 8 " ,   " d s t _ p o r t " :   8 0 ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 7   1 3 : 4 7 : 4 5 . 8 1 7 9 4 0 " ,   " l o g d a t a " :   { " H O S T N A M E " :   " 1 7 2 . 1 8 . 2 0 0 . 5 8 " ,   " P A S S W O R D " :   " a d m i n 8 8 8 " ,   " P A T H " :   " / i n d e x . h t m l " f t p   1 7 2 . 1 2 . 2 0 0 . 5 8 { " d s t _ h o s t " :   " 1 7 2 . 1 8 . 2 0 0 . 5 8 " ,   " d s t _ p o r t " :   8 0 ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 7   1 3 : 4 7 : 4 5 . 8 1 7 9 4 0 " ,   " l o g d a t a " :   { " H O S T N A M E " :   " 1 7 2 . 1 8 . 2 0 0 . 5 8 " ,   " P A S S W O R D " :   " a d m i n 8 8 8 " ,   " P A T H " :   " / i n d e x . h t m l "
4 . 4   T e l n e t 4 . 5   M y s q l 4 . 6   G i t 4 . 7   N T P 4 . 8   R e d i s 4 . 9   T C P 4 . 1 0   V N C V N C 访 4 . 1 1   R D P 4 . 1 2   S I P s s h   r o o t @ 1 7 2 . 1 8 . 2 0 0 . 5 8 { " d s t _ h o s t " :   " 1 7 2 . 1 8 . 2 0 0 . 5 8 " ,   " d s t _ p o r t " :   2 2 2 2 ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 7   1 3 : 5 4 : 2 7 . 8 1 1 1 0 1 " ,   " l o g d a t a " :   { " S E S S I O N " :   " 3 " } ,   " l o g t y p e " :   4 0 0 0 ,   " n o d e _ i d " :   " o p e n c a n a r y - 1 " ,   " s r c _ h o s t " t e l n e t   1 7 2 . 1 8 . 2 0 0 . 5 8 { " d s t _ h o s t " :   " 1 7 2 . 1 8 . 2 0 0 . 5 8 " ,   " d s t _ p o r t " :   2 3 ,   " h o n e y c r e d " :   f a l s e ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 7   1 3 : 5 6 : 4 5 . 3 4 1 7 8 5 " ,   " l o g d a t a " :   { " P A S S W O R D " :   " a d m i n 8 8 8 " ,   " U S E R N A M E " :   " a d m i n 1 2 3 " } ,   " l o g t y p e " m y s q l   - h 1 7 2 . 1 8 . 2 0 0 . 5 8   - u r o o t   - p { " d s t _ h o s t " :   " 1 7 2 . 1 8 . 2 0 0 . 5 8 " ,   " d s t _ p o r t " :   3 3 0 6 ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 7   1 3 : 5 8 : 2 5 . 9 2 2 2 5 7 " ,   " l o g d a t a " :   { " P A S S W O R D " :   " 1 8 0 7 6 c 0 9 6 1 5 d e 8 0 d d b 2 9 0 3 1 9 1 b 7 8 3 7 1 4 9 1 8 b 4 c 4 f " ,   " U S E R N A M E " :   " r o o t " g i t   c l o n e   g i t : / / 1 9 2 . 1 6 8 . 1 . 7 : 9 4 1 8 / t m p . g i t { " d s t _ h o s t " :   " 1 9 2 . 1 6 8 . 1 . 7 " ,   " d s t _ p o r t " :   9 4 1 8 ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 5   1 5 : 3 8 : 4 6 . 3 6 8 6 2 7 " ,   " l o g d a t a " :   { " H O S T " :   " 1 9 2 . 1 6 8 . 1 . 7 : 9 4 1 8 " ,   " R E P O " :   " t m p . g i t " } ,   " l o g t y p e " :   1 6 0 0 1 ,   " n o d e _ i d " g i t   c l o n e   g i t : / / 1 9 2 . 1 6 8 . 1 . 7 : 9 4 1 8 / t m p . g i t { " d s t _ h o s t " :   " 0 . 0 . 0 . 0 " ,   " d s t _ p o r t " :   1 2 3 ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 5   1 5 : 5 8 : 5 2 . 0 7 5 9 8 7 " ,   " l o g d a t a " :   { " N T P   C M D " :   " m o n l i s t " } ,   " l o g t y p e " :   1 1 0 0 1 ,   " n o d e _ i d " :   " o p e n c a n a r y - 1 " ,   " s r c _ h o s t " ( e n v )   [ r o o t @ h o n e y p o t   H o n e y p o t ] #   r e d i s - c l i   - h   1 9 2 . 1 6 8 . 1 . 7 1 9 2 . 1 6 8 . 1 . 7 : 6 3 7 9 >   k e y s   * ( e r r o r )   N O A U T H   A u t h e n t i c a t i o n   r e q u i r e d . 1 9 2 . 1 6 8 . 1 . 7 : 6 3 7 9 >   c o n f i g   g e t   r e q u i r e p a s s ( e r r o r )   E R R   u n k n o w n   c o m m a n d   ' c o n f i g ' 1 9 2 . 1 6 8 . 1 . 7 : 6 3 7 9 >   a u t h   a d m i n ( { " d s t _ h o s t " :   " 1 9 2 . 1 6 8 . 1 . 7 " ,   " d s t _ p o r t " :   6 3 7 9 ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 5   1 6 : 0 5 : 1 1 . 6 3 7 2 6 9 " ,   " l o g d a t a " :   { " A R G S " :   " " ,   " C M D " :   " C O M M A N D " } ,   " l o g t y p e " :   1 7 0 0 1 ,   " n o d e _ i d " :   " o p e n c a n a r y - 1 " t e l n e t   1 9 2 . 1 6 8 . 1 . 6   8 0 0 1 { " d s t _ h o s t " :   " 1 9 2 . 1 6 8 . 1 . 6 " ,   " d s t _ p o r t " :   8 0 0 1 ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 5   1 7 : 1 8 : 5 1 . 6 0 1 4 7 8 " ,   " l o g d a t a " :   { " B A N N E R _ I D " :   " 1 " ,   " D A T A " :   " " ,   " F U N C T I O N " :   " C O N N E C T I O N _ M A D E " } ,   " l o g t y p e " :   { " d s t _ h o s t " :   " 1 9 2 . 1 6 8 . 1 . 7 " ,   " d s t _ p o r t " :   5 0 0 0 ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 6   0 8 : 2 1 : 2 8 . 9 5 1 9 4 0 " ,   " l o g d a t a " :   { " V N C   C l i e n t   R e s p o n s e " :   " 5 8 c 0 0 b e 9 e e 5 b 7 f 3 b 6 6 6 7 7 1 d d 2 b d a 9 3 0 9 " ,   " V N C   P a s s w o r d " { " d s t _ h o s t " :   " 1 9 2 . 1 6 8 . 1 . 7 " ,   " d s t _ p o r t " :   3 3 8 9 ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 6   0 8 : 5 9 : 1 3 . 8 9 0 9 3 4 " ,   " l o g d a t a " :   { " D O M A I N " :   " " ,   " H O S T N A M E " :   " H e l l o H o s t " ,   " P A S S W O R D " :   " h e l l o w o r d " ,   " U S E R N A M E " h y d r a   - l   a d m i n s i p   - p   p a s s w o r d   1 9 2 . 1 6 8 . 1 . 7   s i p
4 . 1 3   S N M P 4 . 1 4   N M A P 4 . 1 5   S Y N 4 . 1 6   F I N 4 . 1 7   X m a s T r e e 4 . 1 8   N u l l 4 . 1 9   M S S Q L M S S Q L 4 . 2 0   H T T P P r o x y 0 x 0 5   O p e n c a n a r y O p e n c a n a y P y t h o n o p e n c a n a r y m y s q l m a c I P { " d s t _ h o s t " :   " 0 . 0 . 0 . 0 " ,   " d s t _ p o r t " :   5 0 6 0 ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 6   0 9 : 5 5 : 1 2 . 5 7 8 1 4 8 " ,   " l o g d a t a " :   { " H E A D E R S " :   { " c a l l - i d " :   [ " 1 3 3 7 @ 1 9 2 . 1 6 8 . 1 . 7 " ] ,   " c o n t e n t - l e n g t h " :   [ " 0 " ] ,   " c s e q " h y d r a   - p   p a s s w o r d   1 9 2 . 1 6 8 . 1 . 7   s n m p { " d s t _ h o s t " :   " 0 . 0 . 0 . 0 " ,   " d s t _ p o r t " :   1 6 1 ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 6   1 1 : 1 7 : 2 7 . 2 6 6 2 1 4 " ,   " l o g d a t a " :   { " C O M M U N I T Y _ S T R I N G " :   " p a s s w o r d " ,   " R E Q U E S T S " :   [ " 1 . 3 . 6 . 1 . 2 . 1 . 1 . 1 " ] } ,   " l o g t y p e " :   s u d o   n m a p   - v   - P n   - O   1 9 2 . 1 6 8 . 1 . 7 { " d s t _ h o s t " :   " 1 9 2 . 1 6 8 . 1 . 7 " ,   " d s t _ p o r t " :   " 2 1 " ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 6   1 6 : 3 5 : 2 4 . 3 5 6 0 8 0 " ,   " l o g d a t a " :   { " F I N " :   " " ,   " I D " :   " 3 7 4 9 9 " ,   " I N " :   " e t h 1 " ,   " L E N " :   " 6 0 " ,   " M A C " :   " 0 8 : 0 0 : 2 7 : d a : 4 c : e 2 : 6 c : 9 6 : c f : d d : e e : b d : 0 8 : 0 0 " s u d o   n m a p   - s S   1 9 2 . 1 6 8 . 1 . 7 { " d s t _ h o s t " :   " 1 9 2 . 1 6 8 . 1 . 7 " ,   " d s t _ p o r t " :   " 2 1 " ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 6   1 6 : 3 5 : 2 4 . 1 9 0 1 7 6 " ,   " l o g d a t a " :   { " I D " :   " 5 1 9 1 8 " ,   " I N " :   " e t h 1 " ,   " L E N " :   " 5 6 " ,   " M A C " :   " 0 8 : 0 0 : 2 7 : d a : 4 c : e 2 : 6 c : 9 6 : c f : d d : e e : b d : 0 8 : 0 0 " s u d o   n m a p   - s F   1 9 2 . 1 6 8 . 1 . 7 { " d s t _ h o s t " :   " 1 9 2 . 1 6 8 . 1 . 7 " ,   " d s t _ p o r t " :   " 2 3 " ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 6   1 6 : 4 6 : 1 8 . 3 3 6 9 5 4 " ,   " l o g d a t a " :   { " F I N " :   " " ,   " I D " :   " 2 9 7 6 8 " ,   " I N " :   " e t h 1 " ,   " L E N " :   " 4 0 " ,   " M A C " :   " 0 8 : 0 0 : 2 7 : d a : 4 c : e 2 : 6 c : 9 6 : c f : d d : e e : b d : 0 8 : 0 0 " s u d o   n m a p   - s X   1 9 2 . 1 6 8 . 1 . 7 { " d s t _ h o s t " :   " 1 9 2 . 1 6 8 . 1 . 7 " ,   " d s t _ p o r t " :   " 1 3 9 " ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 6   1 6 : 4 8 : 4 6 . 2 2 5 5 3 9 " ,   " l o g d a t a " :   { " F I N " :   " " ,   " I D " :   " 1 9 9 8 4 " ,   " I N " :   " e t h 1 " ,   " L E N " :   " 4 0 " ,   " M A C " :   " 0 8 : 0 0 : 2 7 : d a : 4 c : e 2 : 6 c : 9 6 : c f : d d : e e : b d : 0 8 : 0 0 " s u d o   n m a p   - s N   1 9 2 . 1 6 8 . 1 . 7 { " d s t _ h o s t " :   " 1 9 2 . 1 6 8 . 1 . 7 " ,   " d s t _ p o r t " :   " 5 0 6 0 " ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 6   1 6 : 5 1 : 0 7 . 7 8 9 9 0 3 " ,   " l o g d a t a " :   { " I D " :   " 2 6 4 4 1 " ,   " I N " :   " e t h 1 " ,   " L E N " :   " 4 0 " ,   " M A C " :   " 0 8 : 0 0 : 2 7 : d a : 4 c : e 2 : 6 c : 9 6 : c f : d d : e e : b d : 0 8 : 0 0 " { " d s t _ h o s t " :   " 1 7 2 . 1 8 . 2 0 0 . 5 8 " ,   " d s t _ p o r t " :   1 4 3 3 ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 7   0 9 : 0 4 : 5 8 . 6 9 0 1 3 7 " ,   " l o g d a t a " :   { " A p p N a m e " :   " S Q L P r o   f o r   M S S Q L   ( h a n k i n s o f t . c o m ) " ,   " C l t I n t N a m e " :   " D B - L i b r a r y " { " d s t _ h o s t " :   " 1 7 2 . 1 8 . 2 0 0 . 5 8 " ,   " d s t _ p o r t " :   8 0 8 0 ,   " l o c a l _ t i m e " :   " 2 0 1 9 - 0 1 - 0 7   1 3 : 2 6 : 4 7 . 7 6 1 2 9 7 " ,   " l o g d a t a " :   { " P A S S W O R D " :   " p a s s s q u i d " ,   " U S E R N A M E " :   " s q u i d a d m i n " } ,   " l o g t y p e " :   7 0 0 1 ,   " n o d e _ i d "
O p e n C a n a r y   O p e n C a n a r y l o g g e r 1 . R E S T A P I R E S T   A P I R E S T 2 . R P C R P C R P C P P C s e m a p h o r e 3 . U D P   S y s l o g s o c k e t c s y s l o g j s o n s y s l o g   G r a y l o g s y s l o g j s o n E S G r a y l o g E S E S S p l u n k 使   E S G r a y l o g l o g g e r l o g g e r . p y   o p e n c a n a r y v i r t u a l e n v p y t h o n l o g g e r . p y   便 h a n d l e r S y s l o g G r a y l o g s y s l o g j s o n G r a y l o g   j s o n s y s l o g o p e n c a n a r y . c o n f l o g g e r l o g g i n g . F i l e a H a n d l e r O p e n c a n r y E x a m p l e r . p y o p e n c a n a r y . c o n f / u s r / l i b / p y t h o n 2 . 7 / s i t e - p a c k a g e s / o p e n c a n a r y d e f   l o g ( s e l f ,   l o g d a t a ,   r e t r y = T r u e ) : i m p o r t   s y s l o g _ c l i e n t g r a y l o g   =   s y s l o g _ c l i e n t . S y s l o g ( " 1 9 8 . 1 6 8 . 0 . 8 " ) g r a y l o g . s e n d ( j s o n . d u m p s ( l o g d a t a ) ,   s y s l o g _ c l i e n t . L e v e l . I N F O ) l o g d a t a   =   s e l f . s a n i t i z e L o g ( l o g d a t a ) s e l f . l o g g e r . w a r n ( j s o n . d u m p s ( l o g d a t a ,   s o r t _ k e y s = T r u e ) ) s e l f . l o g g e r . w a r n ( j s o n . d u m p s ( l o g d a t a ,   s o r t _ k e y s = T r u e ) ) i m p o r t   s y s l o g _ c l i e n t g r a y l o g   =   s y s l o g _ c l i e n t . S y s l o g ( " 1 9 8 . 1 6 8 . 0 . 8 " ) g r a y l o g . s e n d ( j s o n . d u m p s ( l o g d a t a ) ,   s y s l o g _ c l i e n t . L e v e l . I N F O )         " l o g g e r " :   {                 " c l a s s " :   " P y L o g g e r " ,                 " k w a r g s " :   {                         " f o r m a t t e r s " :   {                                 " p l a i n " :   {                                         " f o r m a t " :   " % ( m e s s a g e ) s "                                 }                         } ,                         " h a n d l e r s " :   {                                 " c o n s o l e " :   {                                         " c l a s s " :   " l o g g i n g . S t r e a m H a n d l e r " ,                                         " s t r e a m " :   " e x t : / / s y s . s t d o u t "                                 } ,                                 " f i l e " :   {                                         " c l a s s " :   " l o g g i n g . F i l e H a n d l e r " ,                                         " f i l e n a m e " :   " / v a r / t m p / o p e n c a n a r y . l o g "                                 }                         }                 }         } , f r o m   o p e n c a n a r y . m o d u l e s   i m p o r t   C a n a r y S e r v i c e
l o g g e r h a n d l e r F i l e H a n d l e r s y s l o g S y s l o g H a n d l e r o p e n c a n a r y . c o n f s y s l o g U D P s y s l o g s y s l o g f r o m   o p e n c a n a r y . m o d u l e s   i m p o r t   C a n a r y S e r v i c e f r o m   t w i s t e d . i n t e r n e t . p r o t o c o l   i m p o r t   P r o t o c o l f r o m   t w i s t e d . i n t e r n e t . p r o t o c o l   i m p o r t   F a c t o r y f r o m   t w i s t e d . a p p l i c a t i o n   i m p o r t   i n t e r n e t c l a s s   E x a m p l e 0 P r o t o c o l ( P r o t o c o l ) : " " " E x a m p l e   ( F i c t i o n a l )   P r o t o c o l $   n c   l o c a l h o s t   8 0 0 7 W e l c o m e ! p a s s w o r d :   w r o n g 0 p a s s w o r d :   w r o n g 1 p a s s w o r d :   w r o n g 2 B a d   p a s s w o r d s $ " " " d e f   _ _ i n i t _ _ ( s e l f ) : s e l f . p r o m p t s   =   0 d e f   c o n n e c t i o n M a d e ( s e l f ) : s e l f . t r a n s p o r t . w r i t e ( " W e l c o m e ! r n p a s s w o r d :   " ) s e l f . p r o m p t s   + =   1 d e f   d a t a R e c e i v e d ( s e l f ,   d a t a ) : " " " C a r e f u l ,   d a t a   r e c i e v e d   h e r e   i s   u n b u f f e r e d .   S e e   e x a m p l e 1 f o r   h o w   t h i s   c a n   b e   b e t t e r   h a n d l e d . " " " p a s s w o r d   =   d a t a . s t r i p ( " r n " ) l o g d a t a   =   { " P A S S W O R D "   :   p a s s w o r d } s e l f . f a c t o r y . l o g ( l o g d a t a ,   t r a n s p o r t = s e l f . t r a n s p o r t ) i f   s e l f . p r o m p t s   <   3 : s e l f . t r a n s p o r t . w r i t e ( " r n p a s s w o r d :   " ) s e l f . p r o m p t s   + =   1 e l s e : s e l f . t r a n s p o r t . w r i t e ( " r n B a d   p a s s w o r d s r n " ) s e l f . t r a n s p o r t . l o s e C o n n e c t i o n ( ) c l a s s   C a n a r y E x a m p l e 0 ( F a c t o r y ,   C a n a r y S e r v i c e ) : N A M E   =   ' e x a m p l e 0 ' p r o t o c o l   =   E x a m p l e 0 P r o t o c o l d e f   _ _ i n i t _ _ ( s e l f ,   c o n f i g = N o n e ,   l o g g e r = N o n e ) : C a n a r y S e r v i c e . _ _ i n i t _ _ ( s e l f ,   c o n f i g ,   l o g g e r ) s e l f . p o r t   =   8 0 0 7 s e l f . l o g t y p e   =   l o g g e r . L O G _ B A S E _ E X A M P L E C a n a r y S e r v i c e F a c t o r y   =   C a n a r y E x a m p l e 0 c l a s s   D e m o H a n d l e r ( l o g g i n g . H a n d l e r ) :         d e f   _ _ i n i t _ _ ( s e l f ,   d e m o _ u s e r i d ,   d e m o _ a u t h k e y ,   a l l o w e d _ p o r t s ) :                 l o g g i n g . H a n d l e r . _ _ i n i t _ _ ( s e l f )                 s e l f . d e m o _ u s e r i d   =   s t r ( d e m o _ u s e r i d )                 s e l f . d e m o _ a u t h k e y   =   s t r ( d e m o _ a u t h k e y )                 t r y :                         #   E x t r a c t   t h e   l i s t   o f   a l l o w e d   p o r t s                         s e l f . a l l o w e d _ p o r t s   =   m a p ( i n t ,   s t r ( a l l o w e d _ p o r t s ) . s p l i t ( ' , ' ) )                 e x c e p t :                         #   B y   d e f a u l t ,   r e p o r t   o n l y   p o r t   2 2                         s e l f . a l l o w e d _ p o r t s   =   [   2 2   ]         d e f   e m i t ( s e l f ,   r e c o r d ) :                 . . . " l o g g e r " :   {         " c l a s s "   :   " P y L o g g e r " ,         " k w a r g s "   :   {                 " f o r m a t t e r s " :   {                         " p l a i n " :   {                                 " f o r m a t " :   " % ( m e s s a g e ) s "                         }                 } ,                 " h a n d l e r s " :   {                         " d s h i e l d " :   {                                 " c l a s s " :   " o p e n c a n a r y . l o g g e r . D e m o H a n d l e r " ,                                 " d e m o _ u s e r i d " :   " t e s t " ,                                 " d e m o _ a u t h k e y " :   " $ % $ # # $ # % $ % " ,                                 " a l l o w e d _ p o r t s " :   " 2 2 , 2 3 "                         }                 }         } }
E L K G r a y l o g C l i c k h o s u e 0 x 0 6   I P I P   I P I P I P   C l i c k H o u s e I P R E S T   A P I   R E S T 使 R P C R P C R P C R E S T     o p e n c a n a r y o p e n c a n a r y 0 x 0 7   I P o p e n c a n a r y a g e n t s e r v e r . i p I P O p e n c a n a y : o p e n c a n a r y   w e b a g e n t o p e n c a n a r y   a g e n t s y s l o g n g i n x t o r n a d o w e b 使 m y s q l 使 v u e ,   g i t h u b O p e n c a n a r y H p f e e d s , O p e n c a n a r y h p f e e d s O p e n c a n a r y I P I P I P C M D B W E B G r a y l o g G r a y l o g E S G r a y l o g s p l u k s p l u n k f p i n g z a b b i x z a b b i x h p f e e d s - c l i e n t   - - h o s t   l o c a l h o s t   - p   1 0 0 0 0   - i   h o n e y m a p   - s   c f d d 6 a 6 8 b e 6 9 4 6 4 6 6 6 a e 6 0 b 6 6 d a e 6 9 f 6   - c   g e o l o c . e v e n t s   p u b l i s h   " { c o u n t r y c o d e : ' N A ' ,   l a t i t u d e : 3 7 . 7 7 4 9 ,   l o n g i t u d e : - 1 2 2 . 4 1 9 4 ,   c i t y :
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则