(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tid) op: assign_op.Equal rhs: {(DQ <integrity>)} spids: [7] ) ] ) (C {<cp>} {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>} {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy_bak'>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tries) op: assign_op.Equal rhs: {<10>} spids: [24] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:startoffset) op: assign_op.Equal rhs: {<2900>} spids: [27] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:macs) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {(${ Id.VSub_Name SSH)} {<-Q>} {<mac>}) ) } spids: [30] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:macs) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$macs') <' '> (command_sub left_token: <Id.Left_Backtick '`'> child: (C {(${ Id.VSub_Name SSH)} {<-Q>} {<cipher-auth>}) ) ) } spids: [49] ) ] ) (command.Simple words: [{<echo>} {(DQ <'KexAlgorithms diffie-hellman-group14-sha1,diffie-hellman-group1-sha1'>)}] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$OBJ') <'/ssh_proxy'>} ) ] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$SUDO') <' sh '> (${ Id.VSub_Name SRC) <'/sshd-log-wrapper.sh '> (${ Id.VSub_Name TEST_SSHD_LOGFILE) <' '> (${ Id.VSub_Name SSHD) <' -i -f '> ($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'> ) } spids: [90] ) ] ) (command.ForEach iter_name: m iter_words: [{($ Id.VSub_DollarName '$macs')}] do_arg_iter: F body: (command.DoGroup children: [ (C {<trace>} {(DQ <'test '> ($ Id.VSub_DollarName '$tid') <': mac '> ($ Id.VSub_DollarName '$m'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:elen) op: assign_op.Equal rhs: {<0>} spids: [133] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:epad) op: assign_op.Equal rhs: {<0>} spids: [137] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:emac) op: assign_op.Equal rhs: {<0>} spids: [141] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:etmo) op: assign_op.Equal rhs: {<0>} spids: [145] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ecnt) op: assign_op.Equal rhs: {<0>} spids: [149] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip) op: assign_op.Equal rhs: {<0>} spids: [153] ) ] ) (command.ForEach iter_name: off iter_words: [ { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<jot>} {($ Id.VSub_DollarName '$tries')} {($ Id.VSub_DollarName '$startoffset')} ) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName '$skip')} {<->} {<1>}) ) } spids: [177] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$skip')} {<-gt>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(command.ControlFlow token:<Id.ControlFlow_Continue continue>)] spids: [191 204] ) ] ) (C {<cp>} {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy_bak'>} {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pxy) op: assign_op.Equal rhs: { (DQ <'proxycommand='> ($ Id.VSub_DollarName '$cmd') <' | '> ($ Id.VSub_DollarName '$OBJ') <'/modpipe -wm xor:'> ($ Id.VSub_DollarName '$off') <':1'> ) } spids: [230] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (C {(${ Id.VSub_Name SSH)} {<-Q>} {<cipher-auth>}) (command.Simple words: [ {<grep>} { (DQ <'^'> (${ Id.VSub_Name m) (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) ) } ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] do_fork: T ) ] negated: F ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ <'Ciphers='> ($ Id.VSub_DollarName '$m'))}] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>} ) ] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:macopt) op: assign_op.Equal rhs: {(DQ <'-c '> ($ Id.VSub_DollarName '$m'))} spids: [288] ) ] ) ] spids: [242 272] ) ] else_action: [ (command.Simple words: [{<echo>} {(DQ <'Ciphers=aes128-ctr'>)}] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>} ) ] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <'MACs='> ($ Id.VSub_DollarName '$m'))}] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$OBJ') <'/sshd_proxy'>} ) ] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:macopt) op: assign_op.Equal rhs: {(DQ <'-m '> ($ Id.VSub_DollarName '$m') <' -c aes128-ctr'>)} spids: [323] ) ] ) ] ) (C {<verbose>} { (DQ <'test '> ($ Id.VSub_DollarName '$tid') <': '> ($ Id.VSub_DollarName '$m') <' @'> ($ Id.VSub_DollarName '$off') ) } ) (command.Simple words: [ {(${ Id.VSub_Name SSH)} {($ Id.VSub_DollarName '$macopt')} {<-2F>} {($ Id.VSub_DollarName '$OBJ') <'/ssh_proxy'>} {<-o>} {(DQ ($ Id.VSub_DollarName '$pxy'))} {<-oServerAliveInterval> <Id.Lit_Equals '='> <1>} {<-oServerAliveCountMax> <Id.Lit_Equals '='> <30>} {<999.999.999.999>} {(SQ <'printf "%4096s" " "'>)} ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<fail>} { (DQ <'ssh -m '> ($ Id.VSub_DollarName '$m') <' succeeds with bit-flip at '> ($ Id.VSub_DollarName '$off') ) } ) ] spids: [385 398] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ecnt) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName '$ecnt')} {<Id.Lit_Other '+'>} {<1>}) ) } spids: [414] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:out) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<egrep>} {<-v>} {(DQ <'^debug'>)} {($ Id.VSub_DollarName '$TEST_SSH_LOGFILE')} ) (C {<tail>} {<-2>}) (C {<tr>} {<-s>} {(SQ <'\\r\\n'>)} {(SQ <.>)}) ] negated: F ) ) } spids: [428] ) ] ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$out'))} arms: [ (case_arm pat_list: [{<Bad> <Id.Lit_QMark '?'> <packet> <Id.Lit_Star '*'>}] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:elen) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName '$elen')} {<Id.Lit_Other '+'>} {<1>} ) ) } spids: [479] ) ] ) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip) op: assign_op.Equal rhs: {<3>} spids: [493] ) ] ) ] spids: [473 477 495 -1] ) (case_arm pat_list: [ {<Corrupted> <Id.Lit_QMark '?'> <MAC> <Id.Lit_Star '*'>} {<Id.Lit_Star '*'> <message> <Id.Lit_QMark '?'> <authentication> <Id.Lit_QMark '?'> <code> <Id.Lit_QMark '?'> <incorrect> <Id.Lit_Star '*'> } ] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:emac) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName '$emac')} {<Id.Lit_Other '+'>} {<1>} ) ) } spids: [517] ) ] ) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip) op: assign_op.Equal rhs: {<0>} spids: [531] ) ] ) ] spids: [498 514 533 -1] ) (case_arm pat_list: [{<padding> <Id.Lit_Star '*'>}] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:epad) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName '$epad')} {<Id.Lit_Other '+'>} {<1>} ) ) } spids: [540] ) ] ) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip) op: assign_op.Equal rhs: {<0>} spids: [554] ) ] ) ] spids: [536 538 556 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<fail>} { (DQ <'unexpected error mac '> ($ Id.VSub_DollarName '$m') <' at '> ($ Id.VSub_DollarName '$off') <': '> ($ Id.VSub_DollarName '$out') ) } ) ] spids: [559 560 572 -1] ) ] ) ] ) ) (C {<verbose>} { (DQ <'test '> ($ Id.VSub_DollarName '$tid') <': '> ($ Id.VSub_DollarName '$ecnt') <' errors: mac '> ($ Id.VSub_DollarName '$emac') <' padding '> ($ Id.VSub_DollarName '$epad') <' length '> ($ Id.VSub_DollarName '$elen') ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$emac')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<fail>} {(DQ ($ Id.VSub_DollarName '$m') <': no mac errors'>)})] spids: [597 610] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:expect) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName '$ecnt')} {<->} {($ Id.VSub_DollarName '$epad')} {<->} {($ Id.VSub_DollarName '$elen')} ) ) } spids: [624] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$emac')} {<-ne>} {($ Id.VSub_DollarName '$expect')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<fail>} { (DQ ($ Id.VSub_DollarName '$m') <': expected '> ($ Id.VSub_DollarName '$expect') <' mac errors, got '> ($ Id.VSub_DollarName '$emac') ) } ) ] spids: [642 655] ) ] ) ] ) ) ] )