| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -31,7 +31,7 @@ import plugin_ix
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					# iregistry = plugins.Registry(meta.__home__)
 | 
					 | 
					 | 
					 | 
					# iregistry = plugins.Registry(meta.__home__)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@_cli.command(name='log-intruder')
 | 
					 | 
					 | 
					 | 
					@_cli.command(name='log-intruder')
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def intrusion(path:str='/var/log/auth.log', year:int=datetime.now().year):
 | 
					 | 
					 | 
					 | 
					def intrusion(path:str='/var/log/auth.log', year:int=datetime.now().year,debug:bool=False):
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    """
 | 
					 | 
					 | 
					 | 
					    """
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    This function 
 | 
					 | 
					 | 
					 | 
					    This function 
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    """
 | 
					 | 
					 | 
					 | 
					    """
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -42,7 +42,9 @@ def intrusion(path:str='/var/log/auth.log', year:int=datetime.now().year):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                try:
 | 
					 | 
					 | 
					 | 
					                try:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    _pointer  = getattr(smart.logger,_id)
 | 
					 | 
					 | 
					 | 
					                    _pointer  = getattr(smart.logger,_id)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    _df = _pointer(_r[_id])
 | 
					 | 
					 | 
					 | 
					                    _df = _pointer(_r[_id])
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    
 | 
					 | 
					 | 
					 | 
					                    if debug :
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                        print (_df)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                    else:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        post(_df,_id)
 | 
					 | 
					 | 
					 | 
					                        post(_df,_id)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                except Exception as e:
 | 
					 | 
					 | 
					 | 
					                except Exception as e:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    print (e)
 | 
					 | 
					 | 
					 | 
					                    print (e)
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -52,17 +54,20 @@ def intrusion(path:str='/var/log/auth.log', year:int=datetime.now().year):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        print ("Nothing out of the ordinary was found in")
 | 
					 | 
					 | 
					 | 
					        print ("Nothing out of the ordinary was found in")
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        print (f"{path}")
 | 
					 | 
					 | 
					 | 
					        print (f"{path}")
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@_cli.command(name='top')
 | 
					 | 
					 | 
					 | 
					@_cli.command(name='top')
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def apply_apps (app:str=None,user:str=None):
 | 
					 | 
					 | 
					 | 
					def apply_apps (app:str=None,user:str=None,debug:bool=False):
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    """
 | 
					 | 
					 | 
					 | 
					    """
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    This function looks at applications/commands running on the system
 | 
					 | 
					 | 
					 | 
					    This function looks at applications/commands running on the system
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    """
 | 
					 | 
					 | 
					 | 
					    """
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    
 | 
					 | 
					 | 
					 | 
					    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _df = smart.top.read(name=app)
 | 
					 | 
					 | 
					 | 
					    _df = smart.top.read(name=app,user=user)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _id = 'apps' if not app else app
 | 
					 | 
					 | 
					 | 
					    _id = 'apps' if not app else app
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # if app  :
 | 
					 | 
					 | 
					 | 
					    # if app  :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    #     _index = _df.name == app
 | 
					 | 
					 | 
					 | 
					    #     _index = _df.name == app
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    #     if _index.sum() :
 | 
					 | 
					 | 
					 | 
					    #     if _index.sum() :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    #         _df = _df[_index]
 | 
					 | 
					 | 
					 | 
					    #         _df = _df[_index]
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    if debug :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        print (_df)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    else:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        post(_df,_id)
 | 
					 | 
					 | 
					 | 
					        post(_df,_id)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    
 | 
					 | 
					 | 
					 | 
					    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@_cli.command(name='archive')
 | 
					 | 
					 | 
					 | 
					@_cli.command(name='archive')
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -86,17 +91,23 @@ def _archive():
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        """
 | 
					 | 
					 | 
					 | 
					        """
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    print(_msg)
 | 
					 | 
					 | 
					 | 
					    print(_msg)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@_cli.command(name='folder')
 | 
					 | 
					 | 
					 | 
					@_cli.command(name='folder')
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def apply_folder(path:str):
 | 
					 | 
					 | 
					 | 
					def apply_folder(path:str,debug:bool=False):
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    """
 | 
					 | 
					 | 
					 | 
					    """
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    This function will read the content of a folder and generate a 
 | 
					 | 
					 | 
					 | 
					    This function will read the content of a folder and generate a 
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    """
 | 
					 | 
					 | 
					 | 
					    """
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _df = smart.folder.read(path=path)
 | 
					 | 
					 | 
					 | 
					    _df = smart.folder.read(path=path)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # print (_df)
 | 
					 | 
					 | 
					 | 
					    # print (_df)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    if debug :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        print(_df)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    else:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        post(_df,'folders')
 | 
					 | 
					 | 
					 | 
					        post(_df,'folders')
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    pass
 | 
					 | 
					 | 
					 | 
					    pass
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@_cli.command (name='files')
 | 
					 | 
					 | 
					 | 
					@_cli.command (name='files')
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def apply_files(folder:str) :
 | 
					 | 
					 | 
					 | 
					def apply_files(folder:str,debug:bool=False) :
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _df = smart.files.read(folder)
 | 
					 | 
					 | 
					 | 
					    _df = smart.files.read(folder)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    if debug:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        print(_df)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    else:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        post(_df,'files')
 | 
					 | 
					 | 
					 | 
					        post(_df,'files')
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@_cli.command(name='init')
 | 
					 | 
					 | 
					 | 
					@_cli.command(name='init')
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					# @plugins.cli.appr(name='init')
 | 
					 | 
					 | 
					 | 
					# @plugins.cli.appr(name='init')
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -120,7 +131,7 @@ def apply_signup (email:str,key:str=None,provider:str='sqlite') :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    else:
 | 
					 | 
					 | 
					 | 
					    else:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        _verb = "updated"
 | 
					 | 
					 | 
					 | 
					        _verb = "updated"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    f = open(os.sep.join([_PATH,'config.json']),'w')
 | 
					 | 
					 | 
					 | 
					    f = open(os.sep.join([_PATH,'config.json']),'w')
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    f.write(json.dumps(_config))
 | 
					 | 
					 | 
					 | 
					    f.write(json.dumps(_config,indent=2))
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    f.close()
 | 
					 | 
					 | 
					 | 
					    f.close()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _msg = f"""
 | 
					 | 
					 | 
					 | 
					    _msg = f"""
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        The configuration file was {_verb} successfully at {meta.__home__}
 | 
					 | 
					 | 
					 | 
					        The configuration file was {_verb} successfully at {meta.__home__}
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |