@@ -127,10 +127,6 @@ def main():
127127 """
128128 args = get_args ()
129129 connect (args .ip , args .port )
130- try :
131- node = LinkNode (args .url )
132- except (ValueError , HTTPError , ConnectionError ) as err :
133- raise err
134130
135131 # If flag is -v, --update, -q/--quiet then user only runs that operation
136132 # because these are single flags only
@@ -145,13 +141,16 @@ def main():
145141 # If url flag is set then check for accompanying flag set. Only one
146142 # additional flag can be set with -u/--url flag
147143 if args .url :
144+ try :
145+ node = LinkNode (args .url )
146+ except (ValueError , HTTPError , ConnectionError ) as err :
147+ raise err
148148 LinkIO .display_ip ()
149149 # -m/--mail
150150 if args .mail :
151- emails = node .get_emails ()
152- print (emails )
151+ print (node .emails )
153152 if args .save :
154- saveJson ('Emails' , emails )
153+ saveJson ('Emails' , node . emails )
155154 # -i/--info
156155 elif args .info :
157156 execute_all (node .name )
@@ -167,7 +166,7 @@ def main():
167166 else :
168167 LinkIO .display_children (node )
169168 if args .save :
170- saveJson ("Links" , node .get_children () )
169+ saveJson ("Links" , node .links )
171170 else :
172171 print ("usage: See torBot.py -h for possible arguments." )
173172
0 commit comments