(BraceGroup children: [ (C {(.)} {(/DietPi/dietpi/func/dietpi-globals)}) (C {(export)} {(Lit_VarLike 'G_PROGRAM_NAME=') (SQ <DietPi-Survey>)}) (C {(G_CHECK_ROOT_USER)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:SURVEY_VERSION) op:Equal rhs:{(4)} spids:[116])] spids: [116] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:SURVEY_SENTCOUNT) op:Equal rhs:{(1)} spids:[120])] spids: [120] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:OPTED_IN) op:Equal rhs:{(1)} spids:[125])] spids: [125] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DIETPI_VERSION) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(sed)} {(-n)} {(1p)} {(/DietPi/dietpi/.version)})] ) left_token: <Left_CommandSub '$('> spids: [132 140] ) (.) (CommandSubPart command_list: (CommandList children: [(C {(sed)} {(-n)} {(2p)} {(/DietPi/dietpi/.version)})] ) left_token: <Left_CommandSub '$('> spids: [142 150] ) ) } spids: [130] ) ] spids: [130] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:G_HW_MODEL) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(sed)} {(-n)} {(1p)} {(/DietPi/dietpi/.hw_model)})] ) left_token: <Left_CommandSub '$('> spids: [155 163] ) } spids: [154] ) ] spids: [154] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:UNIQUE_ID) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(sed)} {(-n)} {(5p)} {(/DietPi/dietpi/.hw_model)})] ) left_token: <Left_CommandSub '$('> spids: [167 175] ) } spids: [166] ) ] spids: [166] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:FTP_ADDR) op:Equal rhs:{(DQ (dietpi.com))} spids:[179])] spids: [179] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FTP_USER) op: Equal rhs: {(DQ (dietpi-survey))} spids: [185] ) ] spids: [185] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:FTP_PASS) op:Equal rhs:{(DQ (raspberry13))} spids:[191])] spids: [191] ) (FuncDef name: Update_FileName_Format body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FILENAME_FORMAT) op: Equal rhs: { (DQ ($ VSub_Name '$SURVEY_VERSION') (-) ($ VSub_Name '$UNIQUE_ID') (-) ($ VSub_Name '$DIETPI_VERSION') (-) ($ VSub_Name '$G_HW_MODEL') (.txt) ) } spids: [204] ) ] spids: [204] ) ] spids: [201] ) spids: [198 201] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FP_SETTINGS) op: Equal rhs: {(DQ (/DietPi/dietpi/.dietpi-survey))} spids: [221] ) ] spids: [221] ) (FuncDef name: Write_Settings body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(_EOF_)} here_end_span_id: 251 stdin_parts: [ ($ VSub_Name '$OPTED_IN') ('\n') ($ VSub_Name '$SURVEY_SENTCOUNT') ('\n') ] ) (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$FP_SETTINGS'))} ) ] ) ] spids: [230] ) spids: [227 230] ) (FuncDef name: Read_Settings body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OPTED_IN) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(sed)} {(-n)} {(1p)} {(DQ ($ VSub_Name '$FP_SETTINGS'))})] ) left_token: <Left_CommandSub '$('> spids: [265 275] ) } spids: [264] ) ] spids: [264] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SURVEY_SENTCOUNT) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(sed)} {(-n)} {(2p)} {(DQ ($ VSub_Name '$FP_SETTINGS'))})] ) left_token: <Left_CommandSub '$('> spids: [279 289] ) } spids: [278] ) ] spids: [278] ) ] spids: [260] ) spids: [257 260] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$FP_SETTINGS'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(Read_Settings)})] spids: [16777215 326] ) ] else_action: [(C {(Write_Settings)})] spids: [338 346] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child: (ArithBinary op_id: Arith_DEqual left: (ArithWord w:{($ VSub_Name '$OPTED_IN')}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [360 369] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(G_CHECK_URL)} {(DQ ($ VSub_Name '$FTP_ADDR'))}) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child: (ArithBinary op_id: Arith_DEqual left: (ArithWord w:{($ VSub_QMark '$?')}) right: (ArithWord w:{(Lit_Digits 0)}) ) spids: [389 398] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(/DietPi/dietpi/func/obtain_network_details)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:active_network_adapter) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(sed)} {(-n)} {(3p)} {(/DietPi/dietpi/.network)})] ) left_token: <Left_CommandSub '$('> spids: [413 421] ) } spids: [412] ) ] spids: [412] ) (C {(Update_FileName_Format)}) (C {(cd)} {(/tmp)}) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(_EOF_)} here_end_span_id: 582 stdin_parts: [ ('-------------------------\n') ('DietPi-Survey v') ($ VSub_Name '$SURVEY_VERSION') ('\n') ('-------------------------\n') ('\n') ('Upload Count : ') ($ VSub_Name '$SURVEY_SENTCOUNT') ('\n') ('DietPi Version : ') ($ VSub_Name '$DIETPI_VERSION') ('\n') ('Mac Address : ') (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(ifconfig)} {(-a)}) (C {(grep)} {(-m1)} {(DQ ($ VSub_Name '$active_network_adapter'))} ) (C {(awk)} {(SQ <'{print $NF}'>)}) (C {(sed)} {(SQ <'s/://g'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [472 503] ) ('\n') ('Hardware Index : ') ($ VSub_Name '$G_HW_MODEL') ('\n') ('Hardware Name : ') ($ VSub_Name '$G_HW_MODEL_DESCRIPTION') ('\n') ('Distro Index : ') ($ VSub_Name '$G_DISTRO') ('\n') ('Autoboot Index : ') (CommandSubPart command_list: (CommandList children: [(C {(cat)} {(/DietPi/dietpi/.dietpi-autostart_index)})] ) left_token: <Left_CommandSub '$('> spids: [515 519] ) ('\n') ('Country : ') (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(curl)} {(--max-time)} {(4)} {(-s)} {(http) (Lit_Other ':') (//whatismycountry.com/)} ) (C {(sed)} {(-n)} {(SQ <'s|.*,\\(.*\\)</h3>|\\1|p'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [522 544] ) ('\n') ('Hostname : ') (CommandSubPart command_list: (CommandList children:[(C {(cat)} {(/etc/hostname)})]) left_token: <Left_CommandSub '$('> spids: [547 551] ) ('\n') ('\n') ('-------------------------\n') ('DietPi-Software Installed\n') ('-------------------------\n') (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(cat)} {(/DietPi/dietpi/.installed)}) (C {(grep)} {(SQ <' =2 '>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [557 569] ) ('\n') ('\n') ('-------------------------\n') ('FileSystem\n') ('-------------------------\n') (CommandSubPart command_list: (CommandList children:[(C {(df)} {(-h)})]) left_token: <Left_CommandSub '$('> spids: [575 579] ) ('\n') ] ) (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$FILENAME_FORMAT'))} ) ] ) (C {(wput)} {(--timeout) (Lit_Other '=') (10th-4)} {(--tries) (Lit_Other '=') (1)} {(--waitretry) (Lit_Other '=') (4)} {(-q)} {(-B)} {(-u)} {(DQ ($ VSub_Name '$FILENAME_FORMAT'))} {(ftp) (Lit_Other ':') (//) (DQ ($ VSub_Name '$FTP_USER')) (Lit_Other ':') (DQ ($ VSub_Name '$FTP_PASS')) (Lit_Other '@') (DQ ($ VSub_Name '$FTP_ADDR')) } ) (C {(rm)} {(DQ ($ VSub_Name '$FILENAME_FORMAT'))}) (DParen child: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:SURVEY_SENTCOUNT)) spids: [646 650] ) (C {(Write_Settings)}) ] spids: [16777215 401] ) ] spids: [16777215 657] ) ] spids: [16777215 372] ) ] spids: [16777215 660] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] spids: [3] )