From 6ef7d559c2174d6e3262e542821ad34a975046ee Mon Sep 17 00:00:00 2001 From: bettleChen <2207153529@qq.com> Date: Thu, 31 Aug 2023 14:01:51 +0800 Subject: [PATCH] upload NetWork project --- Internet/__pycache__/data_crud.cpython-39.pyc | Bin 0 -> 2384 bytes .../data_crud_sqlite.cpython-39.pyc | Bin 0 -> 5118 bytes .../__pycache__/data_detail.cpython-39.pyc | Bin 0 -> 3038 bytes .../data_dispose_CR.cpython-39.pyc | Bin 0 -> 2130 bytes .../__pycache__/data_envelop.cpython-39.pyc | Bin 0 -> 11598 bytes Internet/__pycache__/data_line.cpython-39.pyc | Bin 0 -> 2081 bytes Internet/__pycache__/main_X4.cpython-39.pyc | Bin 0 -> 9244 bytes Internet/data_crud.py | 143 ++++++ Internet/data_crud_sqlite.py | 197 ++++++++ Internet/data_detail.py | 117 +++++ Internet/data_dispose_CR.py | 70 +++ Internet/data_envelop.py | 456 ++++++++++++++++++ Internet/data_line.py | 76 +++ Internet/internet.db | Bin 0 -> 12288 bytes Internet/judgement_data.py | 157 ++++++ Internet/main_X4.py | 381 +++++++++++++++ Internet/pack_un_all.py | 189 ++++++++ Internet/packet_all.py | 285 +++++++++++ images/主机_1.png | Bin 0 -> 4594 bytes images/主机_2.png | Bin 0 -> 2946 bytes images/信封_1.png | Bin 0 -> 1834 bytes images/信封_2.png | Bin 0 -> 1411 bytes images/修改图片大小.py | 11 + images/详情头.png | Bin 0 -> 766 bytes images/详情头_1.png | Bin 0 -> 494 bytes images/详情头_2.png | Bin 0 -> 354 bytes images/路由器_1.png | Bin 0 -> 4065 bytes images/路由器_2.png | Bin 0 -> 2620 bytes 28 files changed, 2082 insertions(+) create mode 100644 Internet/__pycache__/data_crud.cpython-39.pyc create mode 100644 Internet/__pycache__/data_crud_sqlite.cpython-39.pyc create mode 100644 Internet/__pycache__/data_detail.cpython-39.pyc create mode 100644 Internet/__pycache__/data_dispose_CR.cpython-39.pyc create mode 100644 Internet/__pycache__/data_envelop.cpython-39.pyc create mode 100644 Internet/__pycache__/data_line.cpython-39.pyc create mode 100644 Internet/__pycache__/main_X4.cpython-39.pyc create mode 100644 Internet/data_crud.py create mode 100644 Internet/data_crud_sqlite.py create mode 100644 Internet/data_detail.py create mode 100644 Internet/data_dispose_CR.py create mode 100644 Internet/data_envelop.py create mode 100644 Internet/data_line.py create mode 100644 Internet/internet.db create mode 100644 Internet/judgement_data.py create mode 100644 Internet/main_X4.py create mode 100644 Internet/pack_un_all.py create mode 100644 Internet/packet_all.py create mode 100644 images/主机_1.png create mode 100644 images/主机_2.png create mode 100644 images/信封_1.png create mode 100644 images/信封_2.png create mode 100644 images/修改图片大小.py create mode 100644 images/详情头.png create mode 100644 images/详情头_1.png create mode 100644 images/详情头_2.png create mode 100644 images/路由器_1.png create mode 100644 images/路由器_2.png diff --git a/Internet/__pycache__/data_crud.cpython-39.pyc b/Internet/__pycache__/data_crud.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..37c09c1a4db09129fed3a832bdb55947591cc6d1 GIT binary patch literal 2384 zcmdT`O>f*p7@iq>y`1u3R{A;Lvi*Z{VK{M^5DrRDui7JND)agw!Lp{5<3FcxK+O$BvuLfZ_P{=5O++ z7GuBD&GDm(o13`OdjQEK@3Rh5Y>P`F9qG!7^knsiN=GR1(0RlZ+#d4>-qqE3AFtG1g|w zomxNX#{JDC&3b<{7&ER;lC0y+UwiBN+c&U+8YFV9T`?{VG43eQ!0l9N(8oUDpk~DFTc+~) z+7_q^`f_)qjE}~r@mgOQ@AjQVDYbFY^OeP~P4%U`qW8x=i`_x_J5HT|!d6z*&)t-><4 z3-dOiG-Zpf5s+4BDj1FWW4cK|HKflFOb|Q=Xt(r>piV1U+e(onQL$KO^5i{5KwqYp zo+bhGOY{Z>zJOQIGOZO`7*VDIWtObt%^vRP~} ziia}ljaJEKiZO#LUEZL=5EG7m4Lv6kpLFKXNjGom+_mPem@Qi=3RnMOIHs zy<>%ou2@AY{e+z9lOFw3@{ZZ)>KUwPP17N@t`eL|k~5`YND`}XTNra>nu9#SIU)4x z=s#f^<${B2iC!R|!mQ(;3H#~8$BMQumiOkiNARv1M<`5H7M7WhxXqQ}I_jA}aP{+; zRbL_?frh3ggF!EA^TMQ4hBUOgr=oI#`xu{6i9)|9*SUTZ?GyP+dp`^fWp~aHfJ-NG znA;pKExGHCZMpWJw#*;dQp9K>MC!eP721vo;&o`S75X9^qzR{E5?E90$nWqtwSOa! zU&^$A>v{AUKZ*u%Zx}_GlrI|b#k}Dkw;P@6Xm_wn-<4`NLCJJ8>$}30)3g?uY7^Cl z)cWOc#$h~AQKaW+$dP+(%PNZhA^s+|`|2b5lBU$Bug literal 0 HcmV?d00001 diff --git a/Internet/__pycache__/data_crud_sqlite.cpython-39.pyc b/Internet/__pycache__/data_crud_sqlite.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..be8fcb8dc5b9afb1d3cb448fa188dae8ebbd10ee GIT binary patch literal 5118 zcmdT|&vVJlG51KlzkSdBuOLiPvaTJM}(Bn`ZQE6?~8JgxoG98JO zmvmyO&?VE!tut*dz4TyrdZ_y!w0}YV2An$6lWx8A;+f9$dv6yMNmI7d_EJ#Tw^-~0 z_PzJLZy(gi<rw2n zQHzO~uzzLLY!Md;$hb%f2Qnd2A`O`o8Igr_L{8)(Q({6)LZ-zraU3!uro=0dS#d)A z05T_D6(=F{;x+L)qQgRm7QT$L z>!K0nzR|;?1LLu28p7H)`O4%g1CNYV_D-*?tzLK6mp-~ya?2mPr5okydeyz%ZEfG} zbbGfOzcul|wbIghNl(&u((agJdhBRRxU}R=U%ET8wcU`r?ic>9J2Q6j>YaP#75B@A zY~F3i>EfJsxk1AhZ5<>Rpou5DYl{cRIzMDti{d8&hrC(CL z+xd!~ME)J?BJa`@D@-&W$Zki5N&lhWe9-efD~xsTZ`Cqr>N-YG44D87p1xap|JL>0 z-rY|7mh9Zy>0P`qf2*uPbW1dPje1i)5Orv_dj9OrZkTUMztQuf=OhVGoG_+srcFDW zHl>5H{~mp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#yE6 z;Vp=q`&6gVrv^T!v=3_9XU82xjNfCAs9YPyh|_>-i8Ci*i{}6tb3Fn(wZ+5(y6+U2 zXEo+oh;TFy=MaZU&Ebc_e+scr<^Vn?=Qj=5OfDAKGXvhooSQhO`JM;QXXQ5w`IQUI zInDP1M3r@Z94eYa9=M;H`!VNSoWpV03mW^IAvVO|Jvx$e!RH0|r?|ri zk>9>&X1e3*3UqBvneT13-`Da3Wr4oBqDnB`-RlJzg(3hY$_hJvD^O%t7-;CjVQX3UDR_OtS>A2mRD*xQQY)7)MH(JmF@R>L09N{tlXvy z{50VCaf}UCI;kpD?Vy=*zbkmy^Two&z)sj{@$EQCRRuK}??S;=W|#&YsWZe%E0I;h z#P>ETVNdq~zJ6mwUmDSG>UNL|N54Z?bbznIDoH^=p=U0220s_{Nn--!6}muc^ctO} z_7mH1*yUp7uo_rrai2M0XHSma$z##>ueLy4di}qRWyosHv#=L+{Z7ESs&L+k#cqVU z%lXc(ALSN_{YJiy0vpzdz$7JpE<91)$RIOY?_m2J*S)VPcLh&&A~;!X8Hv|$`ANNz Nzxz$RKM4xQ{0Gvj)y)6^ literal 0 HcmV?d00001 diff --git a/Internet/__pycache__/data_envelop.cpython-39.pyc b/Internet/__pycache__/data_envelop.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a4d0926818ab087c1f17ec6ec639e956b56022b5 GIT binary patch literal 11598 zcmd5?Yiu0Xb)K1ha(B60QWPH&MNyVyn~JN5r2L5L%Cao^5lf0Hscy1WI$rUPXs*a1 zd3RQk)FmuOekHXWIdz=GPyi~8len-I)hHZ0cH*>u`nTv0qZkxLfQpm|6lnh_Ka9Zc zcg~%eof(m;6cj~wF=y{N_uS{~obS8$PNlUqr{QzrEB`3gAJMdbCnfwzK-qz-R)r9n z&?mIA`qj$@>xps#zs5vzGF47Zrpsxa@)Hx8L-;LcakYqKIfpC%h$d1Z{j4U^XN+<| zWJLB^t=uYFL=L}2krxI0wh8^9HrTp|_OyM2hMV7IIh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^Xr6Y_Ws5U<&BbEhdF*l11T zN4vz2eiqyO6asSk1|_jsPa(jw;V^(6|B`1TU(z=y$+^lCw!pX3D^0efF29QwBLs@V zLl6?^xN!_GpE>+e+8Lsw{j&%RL<&Tr8~fb!=r#Dg30hRm6q#Nn)ytgatfk(*H2EA7 zu`?wr_L#*>0ykZmp2k$cnpW=umUG^Fhv0OsJ|3T~9KGnMJpP_0i|DGR(^&|eL&)>c z@WO3!bP6x@Wt?Mp;}GXl55Ow_90F98-eXZzRqcDxNZk^fM`c}@wV4TUU3Esrr)6}4 yrj|KGqBwf;d~sW$?gd25&EBtw-F6~awLS=Svv4~x+5AlupVpq%?#XV?KKS1s5;z+G literal 0 HcmV?d00001 diff --git a/Internet/__pycache__/data_line.cpython-39.pyc b/Internet/__pycache__/data_line.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bef0ce2faf6c0371d78cf01ff4e87533fa82c3c8 GIT binary patch literal 2081 zcmb7FUvC>l5Z~SVBA}uQsx$~yLZ%`@Dpt_x@LprPmvgdr zC5d%?p?O8(1MrZ(kw?BoKEpmC@#L?N2gGmo?8FWMsb}qYXLfdW=QqEbi)yth!*l14 zQ@K3L*k7bfJ{FV*7}*NMS4=X=k1$?}7HL9S&@5B~ z5HW*4`En_+$C8$`@s9}D>+0&)-82rr?QVDSHl06yXijk+Vq|j=1ut003IU0Do9u)) z1EEFxCq0u;2pQ#3U}-yxlc$PyD;wg3DHnfdD_?%L_4qLF^wTZX@9pOIKK*#>QJTjp zjq@$q8d8wEyNB8f!*1Hm!_dLLjAAhE^1+RZd)^&;v^lMg9y(?Q!(8|XlN`|HxO7jv z1cV#xhx7$60K%JWY<*^_Ia)9HB7j|FFOb|wv!Pj~Mmt99_LPNu99XQL4OpzgE*$Ad zS5|&;Ioq2fkOHqcr27r&rrQ4I$KDeozaJ7pXO-o(^?U0ZYbQcG`(2rLwEeW3B!QzH z6{Xv;wvsqCI2uItY+J=q9viFzR}n&*cQrrI{IKPw@j)I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`6^)i;-@FhfA;zEiv;$I&%d#B@|QsVJQ!Mj=HsQK?=}We zrTbXy!h7#5%{{Sw!IU|0S}72DBgjH{9>p#c5`jCun(3QC93Gh+k~}SGT|vUdM2(Gj z$tyurH{GXcE8Q4QdhgT@ccRcJd%JLYFHf?jF4@g!E)}2_g+MqGCp?;2zW76Y#^i4g51qO1w|{>Z@Bnqi*Jqr#bj!iLh`L}3k6u1)UO4yD?N`ayAtiqf z(&DbEco6dmkHot29hMTjwp55{vg{g?QzUPKK569R$D>d)u40ze$1P~9VqSx)sB(M;be&!^5e3BE6YdAIFrCXd$5F1AixI- zE>M}AKE)Bm`g9G48uvaF1pkyO4RKfi5aS#hT|}@X9G3hgNoTxm<@W760t32}o>c)q XPH_s)5a>`m^O*LS_OP8mY2tqXaO8`C literal 0 HcmV?d00001 diff --git a/Internet/data_crud.py b/Internet/data_crud.py new file mode 100644 index 0000000..c0b4b11 --- /dev/null +++ b/Internet/data_crud.py @@ -0,0 +1,143 @@ +# 导入模块 +import pymysql + + +# 连接本地数据库 +db = pymysql.connect( + host='localhost', # 例:127.0.0.1 本地数据库地址 + port=3306, # 端口号 + user='root', # 用户id + passwd='123456', # 用户密码 + db='demodb' # 连接的数据库 +) +cursor = db.cursor() +# print(cursor) + + + +# 设置查找simhost表的函数 +def get_simhost_alldata(): + # 获取simhost数据库中所有的数据 + sql = ''' + select * from simhost + ''' + cursor.execute(sql) + # 获取全部数据 + test = cursor.fetchall() + # test = pd.read_sql(sql,db) + host_data_all = [] + for i in test: + # 在这里对数据进行整理... + ID = i[0] + ObjID = i[1] + ObjType = i[2] + ObjLable = i[3] + IPAddr = i[4] + ObjX = i[5] + ObjY = i[6] + MACAddr = i[7] + ObjShow = i[8] + host_data = { + 'ID': ID, + 'ObjID': ObjID, + 'ObjType': ObjType, + 'ObjLable': ObjLable, + 'IPAddr': IPAddr, + 'ObjX': ObjX, + 'ObjY': ObjY, + 'MACAddr': MACAddr, + 'ObjShow': ObjShow + } + host_data_all.append(host_data) + # print(host_data) + # print(test) # 错误 + # cursor.close() # 关闭游标 + # db.close() # 关闭数据库连接 + return host_data_all + +# 建立条件查询将ObjShow==1的值全部获取 +def Select_ObjShow(): + sql = '''select * from simhost where ObjShow=1''' + cursor.execute(sql) + objshow_select = cursor.fetchall() + # print(objshow_select) + objshow_select_all = [] + for i in objshow_select: + # 在这里对数据进行整理... + ID = i[0] + ObjID = i[1] + ObjType = i[2] + ObjLable = i[3] + IPAddr = i[4] + ObjX = i[5] + ObjY = i[6] + MACAddr = i[7] + ObjShow = i[8] + host_data = { + 'ID': ID, + 'ObjID': ObjID, + 'ObjType': ObjType, + 'ObjLable': ObjLable, + 'IPAddr': IPAddr, + 'ObjX': ObjX, + 'ObjY': ObjY, + 'MACAddr': MACAddr, + 'ObjShow': ObjShow + } + objshow_select_all.append(host_data) + # print(objshow_select_all) + return objshow_select_all + +# 设置联合查询ipAddr的地址 +def select_and_ip(id): + data_all = [] + sql = '''select ipaddr.ipaddr from ipaddr inner join simhost on ipaddr.sim_id = simhost.id where simhost.id=%s''' + cursor.execute(sql,id) + data = cursor.fetchall() + for item in data: + # print(item[0]) + data_all.append(item[0]) + + # print(data_all) + return data_all + + +# 创建查询ObjLable列的函数 +def select_ObjLable(): + data_all = [] + sql = ''' + select objlable from simhost + ''' + cursor.execute(sql) + test = cursor.fetchall() + for item in test: + data_all.append(item[0]) + # print(data_all) + return data_all + + +# 在这个位置添加一个修改objshow列的数据函数 +def reve_objshow(): + # 将所有的对象全转换为objshow = 0 + sql = '''update simhost set objshow = 0 where objshow = 1''' + cursor.execute(sql) + db.commit() + return None + + +def reve_after(after_data): + # 将获取的数据进行循环 + for item in after_data: + sql = '''update simhost set objshow = 1 where objlable = %s''' + cursor.execute(sql, item) + db.commit() + return None + + + +if __name__ == '__main__': + # print(get_simhost_alldata()) + # print(select_ObjLable()) + reve_objshow() + after_data = ['A','R1','B'] + reve_after(after_data) \ No newline at end of file diff --git a/Internet/data_crud_sqlite.py b/Internet/data_crud_sqlite.py new file mode 100644 index 0000000..ffb3acc --- /dev/null +++ b/Internet/data_crud_sqlite.py @@ -0,0 +1,197 @@ +# 尝试用sqlite3数据库试试 +import sqlite3 +conn = sqlite3.connect('internet.db') +cursor = conn.cursor() + +# 设置创建数据库的函数 +def create_simhost(): + sql = '''DROP TABLE IF EXISTS `simhost`''' + cursor.execute(sql) + sql_simhost = '''CREATE TABLE simhost + ( + id integer primary key , + ObjID varchar(20), + ObjType int, + Objlable varchar(20), + IPAddr varchar(64), + ObjX int, + ObjY int, + MACAddr varchar(64), + ObjShow int + );''' + cursor.execute(sql_simhost) + return None + +#建立数据表ipaddr的函数 +def create_ipaddr(): + sql = '''DROP TABLE IF EXISTS `ipaddr`''' + cursor.execute(sql) + sql_ipaddr = '''CREATE TABLE ipaddr + ( + id integer primary key , + ipaddr varchar(25), + sim_id int, + foreign key (sim_id) references simhost(id) + );''' + cursor.execute(sql_ipaddr) + return None + +# 设置两个插入数据函数 +def insert_simhost(): + # 需要插入的数据 + data_simhost = [ + (1, 'SH01', 1, 'A', '101.11.1.2', 170, 120, 'MAC01', 1), + (2, 'SR01', 2, 'R1', '102.10.1.1', 250, 160, 'MAC02', 1), + (3, 'SR02', 2, 'R2', '102.10.5.1', 370, 130, 'MAC03', 1), + (4, 'SR03', 2, 'R4', '102.10.6.1', 400, 200, 'MAC04', 1), + (5, 'SR04', 2, 'R5', '111.12.1.1', 480, 260, 'MAC05', 1), + (6, 'SH02', 1, 'D', '201.21.1.2', 420, 330, 'MAC06', 1), + (7, 'SHO3', 1, 'B', '101.11.1.8', 250, 240, 'MAC07', 0), + (8, 'SR05', 2, 'R3', '102.10.6.2', 520, 160, 'MAC08', 0), + (9, 'SH04', 1, 'C', '201.21.1.5', 540, 320, 'MAC09', 0), + ] + sql = '''INSERT INTO simhost (id,ObjID,ObjType,Objlable,IPAddr,ObjX,ObjY,MACAddr,ObjShow) + VALUES (?,?,?,?,?,?,?,?,?)''' + cursor.executemany(sql,data_simhost) + conn.commit() + return None + +def insert_ipaddr(): + # 需要插入的数据 + data_ipaddr = [ + (1, '101.11.1.1', 1), + (2, '102.10.1.1', 2), + (3, '102.10.5.1', 3), + (4, '111.12.5.1', 4), + (5, '201.21.1.1', 5), + ] + sql = '''INSERT INTO ipaddr (id,ipaddr,sim_id) VALUES (?,?,?)''' + cursor.executemany(sql,data_ipaddr) + conn.commit() + return None + +# 设置获取数据库中所有数据的函数 +def get_simhost_alldata(): + sql = '''SELECT * FROM simhost''' + cursor.execute(sql) + data = cursor.fetchall() + # print(data) + all_data = [] + for item in data: + ID = item[0]; ObjID = item[1]; ObjType = item[2] + ObjLable = item[3]; IPAddr = item[4]; ObjX = item[5] + ObjY = item[6]; MACAddr = item[7]; ObjShow = item[8] + host_data = { + 'ID': ID,'ObjID': ObjID,'ObjType': ObjType, + 'ObjLable': ObjLable,'IPAddr': IPAddr,'ObjX': ObjX, + 'ObjY': ObjY,'MACAddr': MACAddr,'ObjShow': ObjShow + } + all_data.append(host_data) + return all_data + +# 建立条件查询将ObjShow==1的值全部取出 +def Select_ObjShow(): + sql = '''SELECT * FROM simhost WHERE ObjShow=1''' + cursor.execute(sql) + objshow_data = cursor.fetchall() + # print(objshow_data) + objshow_data_all = [] + for item in objshow_data: + ID = item[0]; ObjID = item[1]; ObjType = item[2] + ObjLable = item[3]; IPAddr = item[4]; ObjX = item[5] + ObjY = item[6]; MACAddr = item[7]; ObjShow = item[8] + host_data = { + 'ID': ID,'ObjID': ObjID,'ObjType': ObjType, + 'ObjLable': ObjLable,'IPAddr': IPAddr,'ObjX': ObjX, + 'ObjY': ObjY,'MACAddr': MACAddr,'ObjShow': ObjShow + } + objshow_data_all.append(host_data) + return objshow_data_all + +# 建立联合查询ipaddr的地址 +def select_and_ip(id): + data_all = [] + sql = '''SELECT ipaddr.ipaddr FROM ipaddr INNER JOIN simhost ON ipaddr.sim_id = simhost.id WHERE simhost.id=?''' + cursor.execute(sql, (id,)) + data = cursor.fetchall() + for item in data: + # print(item[0]) + data_all.append(item[0]) + return data_all + +# 建立查询ObjLable列的函数 +def select_ObjLable(): + data_all = [] + sql = '''SELECT objlable FROM simhost''' + cursor.execute(sql) + data = cursor.fetchall() + for item in data: + data_all.append(item[0]) + # print(data_all) + return data_all + +# 建立这个位置添加一个修改objshow列的数据函数 +def reve_objshow(): + sql = '''UPDATE simhost SET objshow=0 WHERE objshow=1''' + cursor.execute(sql) + conn.commit() + return None + +# 建立一个修改指定数据的函数objshow +def reve_after(after_data): + # 将获取的数据进行循环 + for item in after_data: + sql = '''UPDATE simhost SET objshow=1 WHERE objlable=?''' + cursor.execute(sql, (item,)) + conn.commit() + return None + + +# 建立一个通过查询ObjLable并返回ObjID的函数 +def select_ObjLable_ObjID(objlable): + sql = '''SELECT objx,objy,objid,objshow FROM simhost WHERE objlable=?''' + cursor.execute(sql, (objlable,)) + old_data = cursor.fetchall() + new_data = old_data[0] + # print(new_data) + return new_data + +# 建立函数通过指定的ObjID来查找所有的数据 +def Select_ObjID(array): + array_all_data = [] # 用来获取所有的对应的数据并放入其中 + sql = '''SELECT * FROM simhost WHERE objlable=?''' + for item in array: + cursor.execute(sql, (item,)) + data = cursor.fetchall() + # print(data) + ID = data[0][0];ObjID = data[0][1];ObjType = data[0][2] + ObjLable = data[0][3];IPAddr = data[0][4];ObjX = data[0][5] + ObjY = data[0][6];MACAddr = data[0][7];ObjShow = data[0][8] + host_data = { + 'ID': ID, 'ObjID': ObjID, 'ObjType': ObjType, + 'ObjLable': ObjLable, 'IPAddr': IPAddr, 'ObjX': ObjX, + 'ObjY': ObjY, 'MACAddr': MACAddr, 'ObjShow': ObjShow + } + array_all_data.append(host_data) + return array_all_data + + + +if __name__ == '__main__': + # create_simhost() + # insert_simhost() + # create_ipaddr() + # insert_ipaddr() + # get_data_sinhost() + # print(get_simhost_alldata()) + # print(Select_ObjShow()) + # print(select_and_ip(1)) + # print(select_ObjLable()) + # reve_objshow() + # after_data = ['A', 'R1', 'B'] + # reve_after(after_data) + # select_ObjLable_ObjID('A') + # array = ['A','B'] + # print(Select_ObjID(array)) + pass + diff --git a/Internet/data_detail.py b/Internet/data_detail.py new file mode 100644 index 0000000..224192d --- /dev/null +++ b/Internet/data_detail.py @@ -0,0 +1,117 @@ +# 在这个文件里画出详情 + + +# 创建函数用来画出详情 +import time + + +class Detail_Show(): + def __init__(self, cv, img_detail, move_data): + self.cv = cv + self.move_data = move_data + self.img_detail = img_detail + + def show_detail(self): + # time.sleep(5) + self.detail_data_all = [] + # 通过获取的move_data数据来画出详情表 + for item in self.move_data: + detail_data_x = item[0]+20 + detail_data_y = item[1] + detail_type = item[3] + detail_data = (detail_data_x,detail_data_y,detail_type) + self.detail_data_all.append(detail_data) + self.cv.create_image(detail_data_x,detail_data_y, image=self.img_detail, tags='detail') # 完成 + + return self.detail_data_all + + +# 建立一个用来画出详情的类 + +class Show_green_detail(): + def __init__(self, cv, item): + self.cv = cv + self.item = item + + # 建立画出对象详情的函数 + def draw_detail(self): + # 判断type对象来画出详情表 + if self.item[2] == 1: # 当type对象为1 画出主机详情图 + # 在这里画出详情图 + frist_x = self.item[0] # 获取frist_x + frist_y = self.item[1] # 获取frist_y + # 这里缺少一个删除其他详情的步骤 + # 画出连接详情表的线 + self.cv.delete('line') + self.cv.create_line((frist_x,frist_y),(frist_x+40,frist_y),(frist_x+45,frist_y-30),fill='#94D050',tags='line') + # 画出详情表 + self.detail_true = self.cv.create_rectangle(frist_x+30,frist_y-120,frist_x+180,frist_y-30,outline='#94D050',tags='line') + # 画出相应的绿条数据 + self.cv.create_text(frist_x+50,frist_y-110,text='应用层',tags='line') + self.cv.create_text(frist_x+50,frist_y-87,text='传输层',tags='line') + self.cv.create_text(frist_x+50,frist_y-64,text='IP 层',tags='line') + self.cv.create_text(frist_x+50,frist_y-42,text='链路层',tags='line') + # 画出 右侧绿色和蓝色的类进度条 + # 应用层 + self.cv.create_rectangle(frist_x+177,frist_y-115,frist_x+150,frist_y-100,fill='#94D050',outline='#94D050',tags='line') + self.cv.create_rectangle(frist_x+148,frist_y-115,frist_x+128,frist_y-100,fill='#00B0F0',outline='#00B0F0',tags='line') + # 传输层 + self.cv.create_rectangle(frist_x + 177, frist_y - 95, frist_x + 140, frist_y - 80, fill='#94D050', + outline='#94D050', tags='line') + self.cv.create_rectangle(frist_x + 138, frist_y - 95, frist_x + 113, frist_y - 80, fill='#00B0F0', + outline='#00B0F0', tags='line') + # IP 层 + self.cv.create_rectangle(frist_x + 177, frist_y - 73, frist_x + 130, frist_y - 58, fill='#94D050', + outline='#94D050', tags='line') + self.cv.create_rectangle(frist_x + 128, frist_y - 73, frist_x + 98, frist_y - 58, fill='#00B0F0', + outline='#00B0F0', tags='line') + # 传输层 + self.cv.create_rectangle(frist_x + 177, frist_y - 50, frist_x + 113, frist_y - 35, fill='#94D050', + outline='#94D050', tags='line') + self.cv.create_rectangle(frist_x + 111, frist_y - 50, frist_x + 78, frist_y - 35, fill='#00B0F0', + outline='#00B0F0', tags='line') + elif self.item[2] == 2: # 当type对象为2 画出路由器详情图 + # print(2) + frist_x = self.item[0] # 获取frist_x + frist_y = self.item[1] # 获取frist_y + # 这里缺少一个删除其他详情的步骤 + # 画出连接详情表的线 + self.cv.delete('line') + self.cv.create_line((frist_x, frist_y), (frist_x + 40, frist_y), (frist_x + 45, frist_y - 30), + fill='#94D050', tags='line') + # 画出详情表 如果需要全覆盖则需要添加一个fill + self.detail_true = self.cv.create_rectangle(frist_x + 30, frist_y - 120, frist_x + 180, frist_y - 30, + outline='#94D050', tags='line') + # 画出相应的绿条数据 + self.cv.create_text(frist_x + 50, frist_y - 110, text='应用层', tags='line') + self.cv.create_text(frist_x + 50, frist_y - 87, text='传输层', tags='line') + self.cv.create_text(frist_x + 50, frist_y - 64, text='IP 层', tags='line') + self.cv.create_text(frist_x + 50, frist_y - 42, text='链路层', tags='line') + # 画出 右侧绿色和蓝色的类进度条 + # 应用层 + self.cv.create_rectangle(frist_x + 177, frist_y - 115, frist_x + 150, frist_y - 100, fill='#D3D3D3', + outline='#D3D3D3', tags='line') + self.cv.create_rectangle(frist_x + 148, frist_y - 115, frist_x + 128, frist_y - 100, fill='#D3D3D3', + outline='#D3D3D3', tags='line') + # 传输层 + self.cv.create_rectangle(frist_x + 177, frist_y - 95, frist_x + 140, frist_y - 80, fill='#D3D3D3', + outline='#D3D3D3', tags='line') + self.cv.create_rectangle(frist_x + 138, frist_y - 95, frist_x + 113, frist_y - 80, fill='#D3D3D3', + outline='#D3D3D3', tags='line') + # IP 层 + self.cv.create_rectangle(frist_x + 177, frist_y - 73, frist_x + 130, frist_y - 58, fill='#94D050', + outline='#94D050', tags='line') + self.cv.create_rectangle(frist_x + 128, frist_y - 73, frist_x + 98, frist_y - 58, fill='#00B0F0', + outline='#00B0F0', tags='line') + # 传输层 + self.cv.create_rectangle(frist_x + 177, frist_y - 50, frist_x + 113, frist_y - 35, fill='#94D050', + outline='#94D050', tags='line') + self.cv.create_rectangle(frist_x + 111, frist_y - 50, frist_x + 78, frist_y - 35, fill='#00B0F0', + outline='#00B0F0', tags='line') + return None + + + + +if __name__ == '__main__': + pass \ No newline at end of file diff --git a/Internet/data_dispose_CR.py b/Internet/data_dispose_CR.py new file mode 100644 index 0000000..58541fc --- /dev/null +++ b/Internet/data_dispose_CR.py @@ -0,0 +1,70 @@ +# 导入函数 +from data_crud_sqlite import * + + +'''创建类来处理函数''' +class Show_Right_All(): + def __init__(self,cv,all_data): + self.cv = cv + self.all_data = all_data + + + # 创建函数 来处理获取的数据 + def Show_img(self,img_host,img_router): + self.loca_all = [] # 定义一个数组用来存数据 + # 将获取的所有数据处理 + for item in self.all_data: + ObjX = item['ObjX'] + ObjY = item['ObjY'] + ObjID = item['ObjID'] + loca = (ObjX, ObjY) + self.loca_all.append(loca) + # 显示图片 + if item['ObjType'] == 1: + self.cv.create_image(ObjX, ObjY, image=img_host, tags=ObjID) + # elif item['ObjType'] == 2: + else: + self.cv.create_image(ObjX, ObjY, image=img_router, tags=ObjID) + # 显示ObjLable + if item['ObjLable'] == 'A': + self.cv.create_text(ObjX, ObjY+27, text=item['ObjLable'], font=('蔚然雅黑',16,'bold'),fill='#C00000', tags=item['ObjLable']) + self.cv.create_text(ObjX, ObjY-32, text=item['IPAddr'], font=('蔚然雅黑',10,'bold'),fill='#C00000', tags=item['IPAddr']) + elif item['ObjLable'] == 'R1': + self.cv.create_text(ObjX+15, ObjY+25, text=item['ObjLable'], font=('蔚然雅黑',16,'bold'),fill='#C00000', tags=item['ObjLable']) + self.cv.create_text(ObjX-67, ObjY, text=item['IPAddr'], font=('蔚然雅黑', 10, 'bold'), fill='#C00000', + tags=item['IPAddr']) + # 通过联表查询获取IP地址 + ip_data_R1 = select_and_ip(2) + # print(ip_data_R1) + self.cv.create_text(ObjX+30, ObjY-30, text= ip_data_R1, font=('蔚然雅黑',10,'bold'),fill='#C00000', tags=ip_data_R1) + elif item['ObjLable'] == 'R2': + self.cv.create_text(ObjX-17, ObjY+25, text=item['ObjLable'], font=('蔚然雅黑',16,'bold'),fill='#C00000', tags=item['ObjLable']) + self.cv.create_text(ObjX, ObjY - 32, text=item['IPAddr'], font=('蔚然雅黑', 10, 'bold'), fill='#C00000', + tags=item['IPAddr']) + elif item['ObjLable'] == 'R4': + self.cv.create_text(ObjX-35, ObjY, text=item['ObjLable'], font=('蔚然雅黑',16,'bold'),fill='#C00000', tags=item['ObjLable']) + self.cv.create_text(ObjX+20, ObjY - 29, text=item['IPAddr'], font=('蔚然雅黑', 10, 'bold'), fill='#C00000', + tags=item['IPAddr']) + ip_data_R4 = select_and_ip(4) + self.cv.create_text(ObjX - 10, ObjY + 26, text=ip_data_R4, font=('蔚然雅黑', 10, 'bold'), fill='#C00000', + tags=ip_data_R4) + elif item['ObjLable'] == 'R5': + self.cv.create_text(ObjX, ObjY+27, text=item['ObjLable'], font=('蔚然雅黑',16,'bold'),fill='#C00000', tags=item['ObjLable']) + self.cv.create_text(ObjX-67, ObjY - 12, text=item['IPAddr'], font=('蔚然雅黑', 10, 'bold'), fill='#C00000', + tags=item['IPAddr']) + ip_data_R5 = select_and_ip(5) + self.cv.create_text(ObjX - 67, ObjY + 3, text=ip_data_R5, font=('蔚然雅黑', 10, 'bold'), fill='#C00000', + tags=ip_data_R5) + elif item['ObjLable'] == 'D': + self.cv.create_text(ObjX-31, ObjY+10, text=item['ObjLable'], font=('蔚然雅黑',16,'bold'),fill='#C00000', tags=item['ObjLable']) + self.cv.create_text(ObjX, ObjY + 27, text=item['IPAddr'], font=('蔚然雅黑', 10, 'bold'), fill='#C00000', + tags=item['IPAddr']) + elif item['ObjLable'] == 'C': + self.cv.create_text(ObjX+25, ObjY-27, text=item['ObjLable'], font=('蔚然雅黑',16,'bold'),fill='#C00000', tags=item['ObjLable']) + self.cv.create_text(ObjX, ObjY + 27, text=item['IPAddr'], font=('蔚然雅黑', 10, 'bold'), fill='#C00000', + tags=item['IPAddr']) + elif item['ObjLable'] == 'R3': + self.cv.create_text(ObjX, ObjY-30, text=item['ObjLable'], font=('蔚然雅黑',16,'bold'),fill='#C00000', tags=item['ObjLable']) + elif item['ObjLable'] == 'B': + self.cv.create_text(ObjX+30, ObjY+10, text=item['ObjLable'], font=('蔚然雅黑',16,'bold'),fill='#C00000', tags=item['ObjLable']) + return None \ No newline at end of file diff --git a/Internet/data_envelop.py b/Internet/data_envelop.py new file mode 100644 index 0000000..b0bdde6 --- /dev/null +++ b/Internet/data_envelop.py @@ -0,0 +1,456 @@ +# 在这里实现移动信封并实现,并在实现的同时使最下方和最右方的canvas中显示数据 +import copy +import tkinter as tk +import time +from data_detail import Detail_Show, Show_green_detail +from data_crud_sqlite import * +# 建立全局变量 +num_begin_x = 0 +num_begin_y = 0 +num_end_x = 1 +num_end_y = 1 + +# 建立信封移动并处理输出数据的函数 +class EnvelopMove(): + def __init__(self,cv,img_host,img_router,img_envelop,img_detail,move_data,Objshow_data,AppPackTag_Data, + unpacket,move_number,right_on_text,right_under_text,under_text): + self.cv = cv # 主页面最大的canvas页面 + self.unpacket = unpacket # 这是一个函数,暂时没用 + self.img_host = img_host # 主机png图片 + self.img_router = img_router # png图片 + self.img_detail = img_detail # png图片 + self.img_envelop = img_envelop # 信封的png图片 + self.move_data = move_data # 信封的移动位置的数据集合 数据样式:[(229, 202, 'SH01', 1), (300, 300, 'SR01', 2)] + self.x1 = self.move_data[0][0] # 定义初始信封的x轴位置 + self.y1 = self.move_data[0][1] # 定义初始信封的y轴位置 + self.Begin_x = None # 定义一个用来存储移动数据的x轴值 + self.End_y = None # 定义一个用来存储移动数据的y轴值 + self.num_begin_x = 0 # 定义获取数组的第一个对比值 + self.num_begin_x_2 = 0 + self.num_begin_x_3 = 0 # 第三次 + self.num_end_x = 1 # 定义获取数组的下一个对比值 + self.num_end_x_2 = 1 + self.num_end_x_3 = 1 # 第三次 + self.num_begin_y = 0 # 定义获取数据下的固定位置值0 + self.num_end_y = 1 # 定义获取数据下的固定位置值1 + self.coord_Ture = True # 定义一个判断用来使用croods函数 + self.move_number_frist = 1 # 定义一个移动数据的初始值 + self.move_number_last = move_number # 数据为需要循环移动信封的次数 该数据为最后值 + self.move_number_add = False # 定义一个值用来实现信封循环发送的判断值 + self.move_number_add_2 = False # 第二次循环进入第三次 + self.right_on_text = right_on_text # 发送主机文本框 + self.right_under_text = right_under_text # 接收主机文本框 + self.under_text = under_text # 连续信息数据文本框 + self.Objshow_data = Objshow_data # 发送的数据总体信息 + self.AppPackTag_Data = AppPackTag_Data # 输入数据总体 + self.number_late = 0 # 设置循环输出的例子 + self.number_late_1 = 0 + self.number_late_2 = 0 + self.one_print_1 = True # 判断是否为第一次输出 + self.one_print_2 = True # 第二次 + self.one_print_3 = True + self.last_envelop_number = int(self.AppPackTag_Data['AppPackSize']) % 2048 + + + # 创建一个信封对象 + def main_envelop(self): + '''在这个位置编写发送和接收文本框中的信息''' + data_Send_0 = '发送主机: '+self.Objshow_data[0]['ObjLable']+'\n' + data_Send_1 = 'IP地址: '+self.Objshow_data[0]['IPAddr']+'\n' # 发送主机详情第一行 + data_Send_2 = 'Mac地址: '+self.Objshow_data[0]['MACAddr']+'\n' # 发送主机详情第二行 + data_Send_3 = '发送数据包大小: '+self.AppPackTag_Data['AppPackSize']+'KB'+'\n' # 发送主机详情第三行 + data_Send_4 = '已发送数据包数量: 0'+'\n' # 发送主机详情第四行 + data_Send_5 = '需要发送的数据包总数: '+str(self.move_number_last)+'\n' + self.right_on_text.insert(tk.END, data_Send_0) + self.right_on_text.insert(tk.END, data_Send_1) + self.right_on_text.insert(tk.END, data_Send_2) + self.right_on_text.insert(tk.END, data_Send_3) + self.right_on_text.insert(tk.END, data_Send_4) + self.right_on_text.insert(tk.END, data_Send_5) + data_Req_1 = '接收主机: '+self.Objshow_data[-1]['ObjLable']+'\n' + data_Req_2 = 'IP地址: '+self.Objshow_data[-1]['IPAddr']+'\n' + data_Req_3 = 'Mac地址: '+self.Objshow_data[-1]['MACAddr']+'\n' + data_Req_4 = '接收数据包大小: '+self.AppPackTag_Data['AppPackSize']+'KB'+'\n' + data_Req_5 = '已接收的数据包数量: 0'+'\n' + data_Req_6 = '需要接收的数据包总数: '+str(self.move_number_last)+'\n' + self.right_under_text.insert(tk.END, data_Req_1) + self.right_under_text.insert(tk.END, data_Req_2) + self.right_under_text.insert(tk.END, data_Req_3) + self.right_under_text.insert(tk.END, data_Req_4) + self.right_under_text.insert(tk.END, data_Req_5) + self.right_under_text.insert(tk.END, data_Req_6) + self.envelop_1 = self.cv.create_image(self.x1, self.y1, image=self.img_envelop,tags='envelop') # 在初始位置创建一个信封图标 + self.show_data_move() + if self.move_number_last >= 2: + self.envelop_2 = self.cv.create_image(self.x1, self.y1, image=self.img_envelop,tags='envelop') + if self.move_number_last >= 3: + self.envelop_3 = self.cv.create_image(self.x1, self.y1, image=self.img_envelop,tags='envelop') + return None + + + # 类似建立模拟函数,第一步先建立信封显示 + def show_data_move(self): + '''在这个位置添加一个判断用来设置新的envelop ?暂时存疑''' + if self.coord_Ture: + self.x_1, self.y_1 = self.cv.coords(self.envelop_1) + # print(self.x_1,self.y_1) + if self.one_print_1: + s_index = '5.10' + e_index = '5.11' + self.right_on_text.delete(s_index, e_index) + self.right_on_text.insert(e_index, '1') + data_one_1 = '发送主机:'+self.Objshow_data[0]['ObjLable']+'\n' # 第一次发送主机 + data_one_2 = '接收主机: '+self.Objshow_data[-1]['ObjLable']+'\n' # 第二行 + data_one_3 = '数据包大小: '+self.AppPackTag_Data['AppPackSize']+'KB'+'\n' # 第三行 + self.one_print_1 = False + if self.num_end_x <= (len(self.move_data)-1): + # self.Begin_x 为需要x轴移动的距离 + Begin_x = self.move_data[self.num_end_x][self.num_begin_y]-self.move_data[self.num_begin_x][self.num_begin_y] + # self.End_y 为需要y轴移动的距离 + End_y = self.move_data[self.num_end_x][self.num_end_y]-self.move_data[self.num_begin_x][self.num_end_y] + # 移动信封 + self.cv.move(self.envelop_1, Begin_x/100, End_y/100) + if int(self.move_data[self.num_end_x][self.num_begin_y]) - 2 <= self.x_1 <= int( + self.move_data[self.num_end_x][self.num_begin_y]) + 2 and int( + self.move_data[self.num_end_x][self.num_end_y]) - 2 <= self.y_1 <= int( + self.move_data[self.num_end_x][self.num_end_y]) + 2: + time.sleep(1) + self.num_begin_x = self.num_begin_x + 1 + self.num_end_x = self.num_end_x + 1 + self.move_number_add = True + data_late_1 = '发送对象: '+self.Objshow_data[self.number_late]['ObjLable']+'\n' + data_late_1_1 = '发送对象IP地址: '+self.Objshow_data[self.number_late]['IPAddr']+'\n' + data_late_1_2 = '发送对象Mac地址: '+self.Objshow_data[self.number_late]['MACAddr']+'\n' + data_late_1_3 = '数据包对象: '+'1'+' / '+str(self.move_number_last)+'\n' + if self.move_number_last == 1: + data_late_1_4 = '数据包大小: '+str(self.last_envelop_number)+' KB \n' + else: + data_late_1_4 = '数据包大小: '+'2048 KB \n' + data_late_1_5 = '数据解包中...... \n' + data_late_1_6 = '数据解包完成 \n' + data_late_2 = '接收对象:'+self.Objshow_data[self.number_late+1]['ObjLable']+'\n' + data_late_2_1 = '接收对象IP地址: '+self.Objshow_data[self.number_late+1]['IPAddr']+'\n' + data_late_2_2 = '接收对象Mac地址: '+self.Objshow_data[self.number_late+1]['MACAddr']+'\n' + data_late_2_3 = '数据封包中...... \n' + data_late_2_4 = '数据封包完成 \n' + self.under_text.insert(tk.END, '*' * 15 + '第一个数据包信息' + '*' * 15 + '\n') + self.under_text.insert(tk.END, data_late_1) + self.under_text.insert(tk.END, data_late_1_1) + self.under_text.insert(tk.END, data_late_1_2) + self.under_text.insert(tk.END, data_late_1_3) + self.under_text.insert(tk.END, data_late_1_4) + self.under_text.insert(tk.END, data_late_1_5) + self.under_text.insert(tk.END, data_late_1_6) + self.under_text.insert(tk.END, data_late_2) + self.under_text.insert(tk.END, data_late_2_1) + self.under_text.insert(tk.END, data_late_2_2) + self.under_text.insert(tk.END, data_late_2_3) + self.under_text.insert(tk.END, data_late_2_4) + self.number_late += 1 + self.cv.after(12, self.show_data_move) + if self.move_number_add and self.move_number_last >= 2: + self.show_data_move_2() + elif self.num_end_x == len(self.move_data): + self.start_index = "5.11" + self.end_index = "5.12" + self.right_under_text.delete(self.start_index, self.end_index) + self.right_under_text.insert(self.end_index, '1') + if self.move_number_last == 1: + self.cv.delete('envelop') + self.coord_Ture = False + self.detail_data = Detail_Show(cv=self.cv, img_detail=self.img_detail, move_data=self.move_data).show_detail() + return None + + # 建立移动第二个信封的函数 + def show_data_move_2(self): + if self.coord_Ture: + self.x_2, self.y_2 = self.cv.coords(self.envelop_2) + if self.one_print_2: + s_index = '5.10' + e_index = '5.11' + self.right_on_text.delete(s_index, e_index) + self.right_on_text.insert(e_index, '2') + self.one_print_2 = False + if self.num_end_x_2 <= (len(self.move_data) - 1): + # self.Begin_x 为需要x轴移动的距离 + Begin_x = self.move_data[self.num_end_x_2][self.num_begin_y] - self.move_data[self.num_begin_x_2][ + self.num_begin_y] + # self.End_y 为需要y轴移动的距离 + End_y = self.move_data[self.num_end_x_2][self.num_end_y] - self.move_data[self.num_begin_x_2][ + self.num_end_y] + # 移动信封 + self.cv.move(self.envelop_2, Begin_x / 100, End_y / 100) + if int(self.move_data[self.num_end_x_2][self.num_begin_y]) - 2 <= self.x_2 <= int( + self.move_data[self.num_end_x_2][self.num_begin_y]) + 2 and int( + self.move_data[self.num_end_x_2][self.num_end_y]) - 2 <= self.y_2 <= int( + self.move_data[self.num_end_x_2][self.num_end_y]) + 2: + # time.sleep(0.1) + self.num_begin_x_2 = self.num_begin_x_2 + 1 + self.num_end_x_2 = self.num_end_x_2 + 1 + self.move_number_add_2 = True # 当第二个信封进入到第二个节点时,将数据进入到第三个 + '''在这里添加一段输出数据试试判断试试''' + self.under_text.insert(tk.END, '#' * 15 + '第二个数据包信息' + '#' * 15 + '\n') + data_late_1 = '发送对象: ' + self.Objshow_data[self.number_late_1]['ObjLable'] + '\n' + data_late_1_1 = '发送对象IP地址: ' + self.Objshow_data[self.number_late_1]['IPAddr'] + '\n' + data_late_1_2 = '发送对象Mac地址: ' + self.Objshow_data[self.number_late_1]['MACAddr'] + '\n' + data_late_1_3 = '数据包对象: ' + '2' + ' / ' + str(self.move_number_last) + '\n' + if self.move_number_last == 2: + data_late_1_4 = '数据包大小: ' + str(self.last_envelop_number) + ' KB \n' + else: + data_late_1_4 = '数据包大小: ' + '2048 KB \n' + data_late_1_5 = '数据解包中...... \n' + data_late_1_6 = '数据解包完成 \n' + data_late_2 = '接收对象:' + self.Objshow_data[self.number_late_1 + 1]['ObjLable'] + '\n' + data_late_2_1 = '接收对象IP地址: ' + self.Objshow_data[self.number_late_1 + 1]['IPAddr'] + '\n' + data_late_2_2 = '接收对象Mac地址: ' + self.Objshow_data[self.number_late_1 + 1]['MACAddr'] + '\n' + data_late_2_3 = '数据封包中...... \n' + data_late_2_4 = '数据封包完成 \n' + self.under_text.insert(tk.END, data_late_1) + self.under_text.insert(tk.END, data_late_1_1) + self.under_text.insert(tk.END, data_late_1_2) + self.under_text.insert(tk.END, data_late_1_3) + self.under_text.insert(tk.END, data_late_1_4) + self.under_text.insert(tk.END, data_late_1_5) + self.under_text.insert(tk.END, data_late_1_6) + self.under_text.insert(tk.END, data_late_2) + self.under_text.insert(tk.END, data_late_2_1) + self.under_text.insert(tk.END, data_late_2_2) + self.under_text.insert(tk.END, data_late_2_3) + self.under_text.insert(tk.END, data_late_2_4) + self.number_late_1 += 1 + if self.num_end_x_2 == 5: + self.cv.after(12, self.show_data_move_2) + # time.sleep(1) + if self.move_number_add_2 and self.move_number_last>=3: + self.show_data_move_3() + elif self.num_end_x_2 == len(self.move_data): + self.right_under_text.delete(self.start_index, self.end_index) + self.right_under_text.insert(self.end_index, '2') + if self.move_number_last == 2: + self.cv.delete('envelop') + self.coord_Ture = False + self.detail_data = Detail_Show(cv=self.cv, img_detail=self.img_detail, move_data=self.move_data).show_detail() + return None + + # 建立移动第三个信封的函数 + def show_data_move_3(self): + if self.coord_Ture: + self.x_3, self.y_3 = self.cv.coords(self.envelop_3) + if self.one_print_3: + s_index = '5.10' + e_index = '5.11' + self.right_on_text.delete(s_index, e_index) + self.right_on_text.insert(e_index, '3') + self.one_print_3 = False + if self.num_end_x_3 <= (len(self.move_data) - 1): + # self.Begin_x 为需要x轴移动的距离 + Begin_x = self.move_data[self.num_end_x_3][self.num_begin_y] - self.move_data[self.num_begin_x_3][ + self.num_begin_y] + # self.End_y 为需要y轴移动的距离 + End_y = self.move_data[self.num_end_x_3][self.num_end_y] - self.move_data[self.num_begin_x_3][ + self.num_end_y] + # 移动信封 + self.cv.move(self.envelop_3, Begin_x / 100, End_y / 100) + if int(self.move_data[self.num_end_x_3][self.num_begin_y]) - 2 <= self.x_3 <= int( + self.move_data[self.num_end_x_3][self.num_begin_y]) + 2 and int( + self.move_data[self.num_end_x_3][self.num_end_y]) - 2 <= self.y_3 <= int( + self.move_data[self.num_end_x_3][self.num_end_y]) + 2: + # time.sleep(0.1) + self.num_begin_x_3 = self.num_begin_x_3 + 1 + self.num_end_x_3 = self.num_end_x_3 + 1 + + self.under_text.insert(tk.END, '*' * 15 + '第三个数据包信息' + '*' * 15 + '\n') + data_late_1 = '发送对象: ' + self.Objshow_data[self.number_late_2]['ObjLable'] + '\n' + data_late_1_1 = '发送对象IP地址: ' + self.Objshow_data[self.number_late_2]['IPAddr'] + '\n' + data_late_1_2 = '发送对象Mac地址: ' + self.Objshow_data[self.number_late_2]['MACAddr'] + '\n' + data_late_1_3 = '数据包对象: ' + '2' + ' / ' + str(self.move_number_last) + '\n' + if self.move_number_last ==3 : + data_late_1_4 = '数据包大小: ' + str(self.last_envelop_number) + ' KB \n' + else: + data_late_1_4 = '数据包大小: ' + '2048 KB \n' + data_late_1_5 = '数据解包中...... \n' + data_late_1_6 = '数据解包完成 \n' + data_late_2 = '接收对象:' + self.Objshow_data[self.number_late_2 + 1]['ObjLable'] + '\n' + data_late_2_1 = '接收对象IP地址: ' + self.Objshow_data[self.number_late_2 + 1]['IPAddr'] + '\n' + data_late_2_2 = '接收对象Mac地址: ' + self.Objshow_data[self.number_late_2 + 1]['MACAddr'] + '\n' + data_late_2_3 = '数据封包中...... \n' + data_late_2_4 = '数据封包完成 \n' + self.under_text.insert(tk.END, data_late_1) + self.under_text.insert(tk.END, data_late_1_1) + self.under_text.insert(tk.END, data_late_1_2) + self.under_text.insert(tk.END, data_late_1_3) + self.under_text.insert(tk.END, data_late_1_4) + self.under_text.insert(tk.END, data_late_1_5) + self.under_text.insert(tk.END, data_late_1_6) + self.under_text.insert(tk.END, data_late_2) + self.under_text.insert(tk.END, data_late_2_1) + self.under_text.insert(tk.END, data_late_2_2) + self.under_text.insert(tk.END, data_late_2_3) + self.under_text.insert(tk.END, data_late_2_4) + self.number_late_2 += 1 + if self.num_end_x_3 == 5: + # time.sleep(1) + self.cv.after(12, self.show_data_move_3) + + elif self.num_end_x_3 == len(self.move_data): + self.right_under_text.delete(self.start_index, self.end_index) + self.right_under_text.insert(self.end_index, '3') + if self.move_number_last == 3: + self.cv.delete('envelop') + self.coord_Ture = False + self.detail_data = Detail_Show(cv=self.cv, img_detail=self.img_detail, move_data=self.move_data).show_detail() + return None + + # 在这里创建鼠标左键点击详情头位置显示数据 + def show_detail_all(self, event): + frist_X = event.x + frist_y = event.y + for item in self.detail_data: + if frist_X-10", self.show_detail_all) # 点击鼠标左键触发显示数据函数 + return Mouse + + +# 创建修改objshow列的函数 +def revise_objshow(send_host, reception_host): + '''在这个位置判断发送主机和接收主机的位置并修改其数据''' + if send_host == 'A': + if reception_host == 'B': + # 调用函数修改objshow列为 0 + reve_objshow() + # 建立一个经过对象的数组 + after_data = ['A', 'R1', 'B'] + # 调用函数reve_after来给对象重新赋值 + reve_after(after_data) + '''后面可能需要在建立一个重组对象数组的功能''' + elif reception_host == 'C': + reve_objshow() + after_data = ['A', 'R1', 'R2', 'R4', 'R5', 'C'] + reve_after(after_data) + elif reception_host == 'D': + reve_objshow() + after_data = ['A', 'R1', 'R2', 'R4', 'R5', 'D'] + reve_after(after_data) + elif send_host == 'B': + if reception_host == 'A': + reve_objshow() + after_data = ['B', 'R1', 'A'] + reve_after(after_data) + elif reception_host == 'C': + reve_objshow() + after_data = ['B', 'R1', 'R2', 'R4', 'R5', 'C'] + reve_after(after_data) + elif reception_host == 'D': + reve_objshow() + after_data = ['B', 'R1', 'R2', 'R4', 'R5', 'C'] + reve_after(after_data) + elif send_host == 'C': + if reception_host == 'A': + reve_objshow() + after_data = ['C', 'R5', 'R4', 'R2', 'R1', 'A'] + reve_after(after_data) + elif reception_host == 'B': + reve_objshow() + after_data = ['C', 'R5', 'R4', 'R2', 'R1', 'A'] + reve_after(after_data) + elif reception_host == 'D': + reve_objshow() + after_data = ['C', 'R5', 'D'] + reve_after(after_data) + elif send_host == 'D': + if reception_host == 'A': + reve_objshow() + after_data = ['D', 'R5', 'R4', 'R2', 'R1', 'A'] + reve_after(after_data) + elif reception_host == 'B': + reve_objshow() + after_data = ['D', 'R5', 'R4', 'R2', 'R1', 'B'] + reve_after(after_data) + elif reception_host == 'C': + reve_objshow() + after_data = ['D', 'R5', 'C'] + reve_after(after_data) + return after_data + + +# 将数组顺序倒换并返回倒序数组 +def order_array(array, send_host, reception_host): + if send_host == 'D': + if reception_host == 'A': + array = array[::-1] + elif reception_host == 'B': + ObjID_reception = select_ObjLable_ObjID(reception_host) + ObjID_send = select_ObjLable_ObjID(send_host) + array = array[::-1] + for item in array: + if item == ObjID_send: + index_move_send = array.index(ObjID_send) + array = [ObjID_send]+array[:index_move_send]+array[index_move_send+1:] + elif item == ObjID_reception: + index_move_reception = array.index(ObjID_reception) + array = array[:index_move_reception]+array[index_move_reception+1:]+[ObjID_reception] + else: + pass + elif reception_host == 'C': + ObjID_send = select_ObjLable_ObjID(send_host) + for item in array: + if item == ObjID_send: + index_move_send = array.index(ObjID_send) + array = [ObjID_send]+array[:index_move_send]+array[index_move_send+1:] + else: + pass + elif send_host == 'C': + if reception_host == 'A': + array = array[::-1] + elif reception_host == 'B': + ObjID_reception = select_ObjLable_ObjID(reception_host) + ObjID_send = select_ObjLable_ObjID(send_host) + array = array[::-1] + for item in array: + if item == ObjID_send: + index_move_send = array.index(ObjID_send) + array = [ObjID_send] + array[:index_move_send] + array[index_move_send + 1:] + elif item == ObjID_reception: + index_move_reception = array.index(ObjID_reception) + array = array[:index_move_reception] + array[index_move_reception + 1:] + [ObjID_reception] + else: + pass + elif reception_host == 'D': + ObjID_send = select_ObjLable_ObjID(send_host) + for item in array: + if item == ObjID_send: + index_move_send = array.index(ObjID_send) + array = [ObjID_send] + array[:index_move_send] + array[index_move_send + 1:] + else: + pass + elif send_host == 'B': + if reception_host == 'A': + array = array[::-1] + elif reception_host == 'C' or reception_host == 'D': + ObjID_send = select_ObjLable_ObjID(send_host) + for item in array: + if item == ObjID_send: + index_move_send = array.index(ObjID_send) + array = [ObjID_send] + array[:index_move_send] + array[index_move_send + 1:] + else: + pass + return array + + + +'''建立一个函数使获取信封循环次数并为每次添加编号''' +def add_number(number): + number_all = [] + for i in range(0,number): + number = 'envelop_'+str(i+1) + number_all.append(number) + return number_all + + diff --git a/Internet/data_line.py b/Internet/data_line.py new file mode 100644 index 0000000..621f5b3 --- /dev/null +++ b/Internet/data_line.py @@ -0,0 +1,76 @@ + + +# 创建一个画线的类 +class Line_Right(): + def __init__(self, cv, line_data): + self.cv = cv + self.line_data = line_data + + # 创建函数来画出需要的线 + def line_test(self): + # 将数据通过循环取出,使用下标的形式 + for i in range(0, len(self.line_data)): + '''需要进行判断下标i+1存在数据''' + if i + 1 != len(self.line_data): + x = self.line_data[i]['ObjX'] + y = self.line_data[i]['ObjY'] + next_x = self.line_data[i + 1]['ObjX'] + next_y = self.line_data[i + 1]['ObjY'] + self.cv.create_line(x, y, next_x, next_y, width=3, fill='#5B9BD5') + # print(i) + return None + + +# 创建一个用于画出永久固定的无用的线的类 +class Useless_line(): + def __init__(self, cv, Useless_line_data): + self.cv = cv + self.Useless_line_data = Useless_line_data + + + # 创建函数用来画出线 + def draw_line_less(self): + data_all_zero = self.data_handle() + # 通过循环判断获取的对象是谁,在给该对象画出线条 + for item in data_all_zero: + # 在这里添加判断 + if item['ID'] == 7: # 这个以后换一个判断信息 + # 在这里画出线 + self.cv.create_line(item['ObjX'],item['ObjY'],250,160,width=3, fill='#00B050') + if item['ID'] == 8: + # 在这里画出连接三条线 + self.cv.create_line(item['ObjX'],item['ObjY'],370,130,width=1, fill='#5B9BD5') + self.cv.create_line(item['ObjX'], item['ObjY'], 400, 200, width=1, fill='#5B9BD5') + self.cv.create_line(item['ObjX'], item['ObjY'], 480, 260, width=1, fill='#5B9BD5') + if item['ID'] == 9: + self.cv.create_line(item['ObjX'], item['ObjY'], 480, 260, width=2, fill='#5B9BD5') + return None + + # 建立函数用来处理获取的数据 + def data_handle(self): + data_ObjShow_zero_all = [] + for item in self.Useless_line_data: + # print(item) + if item['ObjShow'] == 0: + # print(item) + data_ObjShow_zero_all.append(item) + # print(data_ObjShow_zero_all) + return data_ObjShow_zero_all + + + +# 对获取的line_data进行处理 +def line_draw(ShowData): + line_data_all = [] # 定义一个数组用来存储所有数据 + # 将获取的数据循环获取需要的数据 + for item in ShowData: + # print(item) + ObjX = item['ObjX'] + ObjY = item['ObjY'] + line_data = { + 'ObjX': ObjX, + 'ObjY': ObjY + } + line_data_all.append(line_data) + # print(line_data_all) + return line_data_all diff --git a/Internet/internet.db b/Internet/internet.db new file mode 100644 index 0000000000000000000000000000000000000000..d1e1b74154fd5f17c5af94cf68d3c0a86ea9e4b5 GIT binary patch literal 12288 zcmeI0y^j(>6u@T&5S9c+3qvkg3>*bS-RvwZp4|aQ;+Zq23x!q}?$|rlJ3g}D2kl*A zt^a|Am9ew1vbVCeGWsW6Z8Y%>a4RH>T9{l+-X!b}Z+>}i_P5*2Yuwv%M~>L<`@O++T{J7zt-6@T;v!(=1EX$R zxV@2c;CN!-x!smG7KhGQTnmOLb;aYBx7TTTdDAKcb3?bgGff=44ktm!J?Kp;<)?5# zc+S4#IlVn+C?M474@Y^oT?pJq;pFOSG?h-%XV)h_X8i2N7L3e-fqDLclI`7xn;XB3 z7)y)*)*KHU^N-C|ehI-HM@*2p(*hY!jmQ-n=pf2fG z8dj8*3olSbW|#auN&1|8P*f=wTA)m3n={ISTpl@AR58aED9LO&qo5+}ee!%}h61Hb z(UjV|toYAolGjgFBB{>*5&nkoQ~rg2AYA7q4wRbbX?fc8L`hbDn(rvm~Z&gKHp8emBZ0nP6N$e%0+_l^Jn literal 0 HcmV?d00001 diff --git a/Internet/judgement_data.py b/Internet/judgement_data.py new file mode 100644 index 0000000..8e915b1 --- /dev/null +++ b/Internet/judgement_data.py @@ -0,0 +1,157 @@ +# 建立一个函数用来判断封包数据的正确性 +''' +在这里编写数据包正误判断 +在这里引入数据 +test: 先使用自身对比判断出错误环节,or与下一层产生的数据对比是否出错。 +判断是否要写成一个函数呢?在数据处理函数中直接判断会不会好一点呢? +目前想法是先判断自己吧。 +自己进行判断的话则不需要额外写外接函数。 +TRUE == 对自身获取的地址进行判断正误、判断格式。 +''' +import re + +# 定义一个正则表达式来判断ip地址的格式是否正确 + +zz_ip = '^(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[1-9])\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)$' +zz_mac = '([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})' +compile_ip = re.compile(zz_ip) +compile_mac = re.compile(zz_mac) + +# 判断是否符合ip地址格式要求 +def Judgement_Zz_IP(IP_Data): + if compile_ip.match(IP_Data): + return True + else: + return False + + +def Judgement_Zz_MAC(MAC_Data): + if compile_mac.match(MAC_Data): + return True + else: + return False + +# 判断AppData数据正误,地址是否存在,判断格式. +def Judgement_AppData(SourceAppAddr, TargetAppAddr): + ''' + 在这里添加判断数据正确性的代码 备注:test 目前 + 不知道需要对比的数据是啥所以先对比自身 + 不建议使用for循环,可以使用if嵌套 + ''' + # 将获取的数据进行切割 + SourceAppAddr = SourceAppAddr.split(':')[0] + TargetAppAddr = TargetAppAddr.split(':')[0] + # print(SourceAppAddr) + source = Judgement_Zz_IP(SourceAppAddr) # 发出数据IP判断 + if source != True: + print('SourceIP地址格式错误') + target = Judgement_Zz_IP(TargetAppAddr) # 接收数据IP判断 + if target != True: + print('TargetIP地址格式错误') + return None + +# 判断TransData数据正误 判断地址是否与上级地址是都一样。是否存在,外加判断端口号是否符合要求是否存在 +def Judgement_TransData(Old_SourceAppAddr,Old_TargetAppAddr,New_SourceAppAddr,New_TargetAppAddr,SentPort,RpctPort): + ''' + 在这里添加判断数据正确性的代码 备注:test 目前 + 不知道需要对比的数据是啥所以先对比自身 + 不建议使用for循环,可以使用if嵌套 + ''' + # 先判断地址是否符合格式在进行比较,先进行字符串的切割 + Old_SourceAppAddr = Old_SourceAppAddr.split(':')[0] + Old_TargetAppAddr = Old_TargetAppAddr.split(':')[0] + New_SourceAppAddr = New_SourceAppAddr.split(':')[0] + New_TargetAppAddr = New_TargetAppAddr.split(':')[0] + new_source = Judgement_Zz_IP(New_SourceAppAddr) + new_target = Judgement_Zz_IP(New_TargetAppAddr) + if new_source: + if Old_SourceAppAddr != New_SourceAppAddr: + print('新地址与原地址不相同') + else: + print('SourceIP地址格式错误') + if new_target: + if Old_TargetAppAddr != New_TargetAppAddr: + print('新地址与原地址不相同') + else: + print('TargetIP地址格式错误') + # 判断端口号是否符合要求 + if SentPort < 2048 or SentPort > 65535: + print('端口号不符合格式') + if RpctPort< 2048 or RpctPort > 65535: + print('端口号不符合格式') + return None + + + +# 判断IPData数据正误 +def Judgement_IPData(Old_SourceIP,Old_TargetIP,New_SourceIP,New_TargetIP): + ''' + 在这里添加判断数据正确性的代码 备注:test 目前 + 不知道需要对比的数据是啥所以先对比自身 + 不建议使用for循环,可以使用if嵌套 + ''' + new_sourceIP = Judgement_Zz_IP(New_SourceIP) + new_targetIP = Judgement_Zz_IP(New_TargetIP) + if new_sourceIP: + if Old_SourceIP != New_SourceIP: + print('新地址与原地址不相同') + else: + print('SourceIP地址格式错误') + if new_targetIP: + if Old_TargetIP != New_TargetIP: + print('新地址与原地址不相同') + else: + print('TargetIP地址格式错误') + return None + + + + +# 判断MACData数据正误 +def Judgement_MACData(Old_SourceIP,Old_TargetIP,New_SourceIP,New_TargetIP,SentMAC,RcptMAC): + ''' + 在这里添加判断数据正确性的代码 备注:test 目前 + 不知道需要对比的数据是啥所以先对比自身 + 不建议使用for循环,可以使用if嵌套 + ''' + new_sourceIP = Judgement_Zz_IP(New_SourceIP) + new_targetIP = Judgement_Zz_IP(New_TargetIP) + if new_sourceIP: + if Old_SourceIP != New_SourceIP: + print('新地址与原地址不相同') + else: + print('SourceIP地址格式错误') + if new_targetIP: + if Old_TargetIP != New_TargetIP: + print('新地址与原地址不相同') + else: + print('TargetIP地址格式错误') + sentmac = Judgement_Zz_MAC(SentMAC) + rcptmac = Judgement_Zz_MAC(RcptMAC) + if sentmac != True: + print('SentMAC地址格式错误') + if rcptmac != True: + print('RcptMAC地址格式错误') + return None + + + +if __name__ == '__main__': + # 在这里建立一组test数据用来比较 + # test: 测试 + # Judgement_AppData('SHO1','A','AppPack1',6144,'A-6144-Data','101.1.1.2:18010','201.21.1.2:18010',test_4) + # Judgement_TransData('ObjID','IDkey','TransPackID','TransSeq','TransTag','AppPackID','SentPort','RpctPort','SourceAppAddr','TargetAppAddr',TransPackedString) + # Judgement_IPData('ObjID','IDkey','IP_number','IPPackID','TransPackID','SourceIP','TargetIP','SourceAppAddr','TargetAppAddr',IPPackedString) + # Judgement_MACData('ObjID','IDkey','MAC_number','MacPackID','IPPackID','SentMAC','RcptMAC','SourceIP','TargetIP','SourceAppAddr','TargetAppAddr',MacPackedString) + ip_test = '127.0.0.1:18010' + ip_test2 = '196.168.2.1:18010' + ip_test_new = '196.168.1.1' + ip_test2_new = '196.168.3.1' + prot = 1395 + prot_1 = 65555 + test_mac = '00:1a:8c:10:ad:30' + test_mac1 = '10:00:00:90:fa:02:88:00' + # print(Judgement_Zz_IP(ip_test)) + # Judgement_AppData(ip_test,ip_test2) + # Judgement_TransData(Old_SourceAppAddr=ip_test,Old_TargetAppAddr=ip_test2,New_SourceAppAddr=ip_test_new,New_TargetAppAddr=ip_test2_new,SentPort=prot,RpctPort=prot_1) + Judgement_MACData(Old_SourceIP=ip_test_new,Old_TargetIP=ip_test2_new,New_SourceIP=ip_test2_new,New_TargetIP=ip_test_new,SentMAC=test_mac,RcptMAC=test_mac1) \ No newline at end of file diff --git a/Internet/main_X4.py b/Internet/main_X4.py new file mode 100644 index 0000000..d926f07 --- /dev/null +++ b/Internet/main_X4.py @@ -0,0 +1,381 @@ +# 导入模块 +import tkinter as tk +from tkinter import * +from tkinter import messagebox +from data_crud_sqlite import * +from data_line import Line_Right, line_draw, Useless_line +from data_dispose_CR import Show_Right_All +from data_envelop import EnvelopMove, revise_objshow, order_array + +# 图片常量 +# img_host = PhotoImage(file='../images/主机_2.png') +# img_router = PhotoImage(file='../images/路由器_2.png') +# img_envelop = PhotoImage(file='../images/信封_2.png') +# img_detail = PhotoImage(file='../images/详情头_2.png') + +# 创建父窗口函数 +class Main_Gui(): + def __init__(self, init_window_name): + self.init_window_name = init_window_name + + + # 创建窗口界面 + def Set_init_window(self): + init_window_name = self.init_window_name + '''头歌虚拟平台上的屏幕长宽大概为: 宽:1360;高:690''' + # root_width = init_window_name.winfo_screenwidth() # 获取window屏幕宽度 + root_width = 1360 + self.root_width = int(root_width / 4 * 3) # 设置父窗口界面宽度 + # print('父窗口界面宽度:'+str(self.root_width)) # 输出父窗口界面宽度 + # root_height = init_window_name.winfo_screenheight() # 获取window屏幕长度 + root_height = 690 + self.root_height = int(root_height / 4 * 3) # 设置父窗口界面长度 + # print('父窗口界面长度:'+str(self.root_height)) # 输出父窗口界面长度 + init_window_name.title('数据封包和解包模拟&X1-X4') # 标题 + # 将窗口固定在屏幕中央 + init_window_name.geometry(str(self.root_width)+'x'+str(self.root_height)+'+'+str(int((root_width-self.root_width)/2))+'+'+str(int((root_height-self.root_height)/2))) # 窗口大小 + '''创建搭载在父窗口上的菜单''' + main_menu = tk.Menu(init_window_name) + + filemenu = Menu(main_menu, tearoff=False) # 设置子菜单 + filemenu.add_command(label='启动模拟', command=self.similar_packet) #模拟函数未完成 + filemenu.add_command(label='启动X4模拟', command=self.similar_packet_X4) # 需要建立函数 + filemenu.add_command(label='查找', command=quit) # 寻址功能函数未完成 + filemenu.add_separator() # 画线 + filemenu.add_command(label='退出', command=quit) # 点击关闭页面 + main_menu.add_cascade(label='open', menu=filemenu) # 主界面 + + init_window_name.config(menu=main_menu) # 将菜单按钮挂载在画布上 + + + '''创建和父窗口同等大小的canvas画布''' + self.cv = tk.Canvas(init_window_name, + bg='#f0f0f0', + # bg='white', + width=self.root_width-250, + height=self.root_height-150) + self.cv.pack(side=tk.LEFT, anchor=tk.NW) + # self.cv.grid(row=0, column=0) + # self.cv.pack(anchor=tk.NW) + # 画出包含仿真对象图的方框图 + self.cv.create_rectangle(100, 40, self.root_width - 250, self.root_height - 150, width=3, + outline="#7f6000") # 这个位置可能需要修改 + # 创建固定在左侧的标识符图像 + self.cv.create_image(50, 80, image=img_host) # 固定在左侧的主机对象 + self.cv.create_text(50, 110, text='主机', font=('蔚然雅黑', 14, 'bold'), fill='black') + self.cv.create_image(50, 160, image=img_router) # 固定在该canvas画布上的对象 == 路由器 + self.cv.create_text(50, 190, text='路由器', font=('蔚然雅黑', 14, 'bold'), fill='black') + + '''创建窗口前先将数据表simhost的数据恢复原样''' + revise_objshow('A','D') + '''画出仿真移动对象的图''' + self.Show_Canvas_Right() # 未完成 + + '''这个位置开始右侧详情页面''' + self.right_show_all() # 正在测试 未完成 + + '''设置最下方显示控件''' + self.under_show_all() # 未完成 + + + def similar_packet_X4(self): + # 删除窗口中的所有数据 + self.right_on_text.delete('1.0', tk.END) + self.right_under_text.delete('1.0', tk.END) + self.under_text.delete('1.0', tk.END) + self.cv.delete('detail');self.cv.delete('line') + # self.cv.unbind("",self.Mouse) # 清楚鼠标点击事件,修改中还未完成 2023-7-25 + self.open_envelop = False # 好像忘记了这个的作用了 + self.packet_emu_X4 = tk.Toplevel() + self.packet_emu_X4.title('X4-启动模拟') + self.packet_emu_X4.geometry('300x200+800+200') + # 建立数据模拟数据的输入框字体 + label_emu_x4_1 = tk.Label(self.packet_emu_X4, text='发送主机:').grid(row=0, pady=5) + label_emu_x4_2 = tk.Label(self.packet_emu_X4, text='接收主机:').grid(row=1, pady=5) + label_emu_x4_3 = tk.Label(self.packet_emu_X4, text='数据内容:').grid(row=2, pady=5) + label_emu_x4_4 = tk.Label(self.packet_emu_X4, text='数据大小(kb):').grid(row=3, pady=5) + label_emu_x4_5 = tk.Label(self.packet_emu_X4, text='数据标签:').grid(row=4, pady=5) + # 建立输入框 + self.entry_emu_x4_1 = tk.Entry(self.packet_emu_X4) + self.entry_emu_x4_1.grid(row=0, column=1) + + self.entry_emu_x4_2 = tk.Entry(self.packet_emu_X4) + self.entry_emu_x4_2.grid(row=1, column=1) + + self.entry_emu_x4_3 = tk.Entry(self.packet_emu_X4) + self.entry_emu_x4_3.grid(row=2, column=1) + + self.entry_emu_x4_4 = tk.Entry(self.packet_emu_X4) + self.entry_emu_x4_4.grid(row=3, column=1) + + self.entry_emu_x4_5 = tk.Entry(self.packet_emu_X4) + self.entry_emu_x4_5.grid(row=4, column=1) + + button_emu_left_X4 = tk.Button(self.packet_emu_X4, text='开启模拟', command=self.openpack_btn_x4).grid(row=5) # 函数未完成 2023-7-25 + return None + + # 设置X4模拟点击按钮后的函数 + def openpack_btn_x4(self): + # 先获取点击按钮后输入框中的数据 + entry_emu_x4_data_1 = self.entry_emu_x4_1.get() + entry_emu_x4_data_2 = self.entry_emu_x4_2.get() + entry_emu_x4_data_3 = self.entry_emu_x4_3.get() + entry_emu_x4_data_4 = self.entry_emu_x4_4.get() + entry_emu_x4_data_5 = self.entry_emu_x4_5.get() + + select_objlable = Select_ObjShow() # 查询数据库索取所有数据 + if entry_emu_x4_data_1=='' or entry_emu_x4_data_2=='' or entry_emu_x4_data_3==''or entry_emu_x4_data_4=='' or entry_emu_x4_data_5=='': + self.packet_emu_X4.destroy() + messagebox.showinfo('Error', '数据不能为空') + '''这个地方还需要添加一些其他的判断条件,暂且搁置''' + else: + self.packet_emu_X4.destroy() # 关闭启动模拟窗口 + self.AppPackTag_Data_X4 = { + 'SendHost': entry_emu_x4_data_1, 'ReceHost': entry_emu_x4_data_2, 'AppPackID': entry_emu_x4_data_3, 'AppPackSize': entry_emu_x4_data_4, 'AppPackTag': entry_emu_x4_data_5 + } + # print(self.AppPackTag_Data_X4) + self.move_number_x4 = int(self.AppPackTag_Data_X4['AppPackSize']) / 2048 + if self.move_number_x4 > 0 and self.move_number_x4 < 1: + self.move_number_x4 = 1 + elif self.move_number_x4 % 1 != 0: + self.move_number_x4 = int(self.move_number_x4 + 1) + # print('需要拆分成的数据包数量:'+str(self.move_number_x4)) + '''这个位置添加一个函数,通过获取的发送主机和接收主机的地址来修改数据库中ObjShow列中的数据''' + self.revise_objshow = revise_objshow(send_host=self.AppPackTag_Data_X4['SendHost'], reception_host=self.AppPackTag_Data_X4['ReceHost']) + '''这个位置调用信封移动的函数试试 PS:如果对象是如D——>A的则需要修改对象''' + # 如果需要修改数据之类的 + self.envelop_move_x4() + return None + + def envelop_move_x4(self): + '''在移动信封的同时需要设置在最下方显示进度提示,在最右边显示完成进度''' + '''建立一个暂时的变量,可以替换''' + self.unpacket = 0 + self.location_all_x4 = [] # 定义用来存放对象的位置 + self.Select_ObjID = Select_ObjID(self.revise_objshow) + for item in self.Select_ObjID: + # print(item) + ObjX = item['ObjX'];ObjY = item['ObjY'];ObjID = item['ObjID'];ObjType = item['ObjType'] + location = (ObjX, ObjY, ObjID, ObjType) + self.location_all_x4.append(location) + '''这个位置需要添加一个判断来判断是否需要将数组倒序''' + self.location_all_x4 = order_array(self.location_all_x4,self.AppPackTag_Data_X4['SendHost'],self.AppPackTag_Data_X4['ReceHost']) + # print(self.location_all_x4) + # 实现信封移动,并在实现的同时使最下方和最右方的canvas中显示数据 + '''这个位置需要通过获取的对象来获取值''' + # self.ObjShow_1_data = Select_ObjShow() + self.show_envelop = EnvelopMove(cv=self.cv, img_host=img_host, img_router=img_router, img_envelop=img_envelop, + img_detail=img_detail, move_data=self.location_all_x4, unpacket=self.unpacket, + move_number=self.move_number_x4, right_on_text=self.right_on_text, + Objshow_data=self.Select_ObjID, AppPackTag_Data=self.AppPackTag_Data_X4, + right_under_text=self.right_under_text, under_text=self.under_text) + self.show_envelop.main_envelop() + self.Mouse = self.show_envelop.Mouse_Event() + # self.show_envelop.show_data_move() + # print(self.ObjShow_1_data) + # print(self.location_all) + return None + + + '''# 设置一个编写类封包函数''' + def similar_packet(self): + self.right_on_text.delete('1.0', tk.END) + self.right_under_text.delete('1.0', tk.END) + self.under_text.delete('1.0', tk.END) + self.cv.delete('detail');self.cv.delete('line') + # self.cv.unbind("", self.Mouse) + # 定义一个值用来处理信封移动事件的开启 + self.open_envelop = False + # 建立一个子窗口完成数据 + self.packet_emu = tk.Toplevel() + self.packet_emu.title('启动模拟') + self.packet_emu.geometry('300x140+800+200') + # 建立数据模拟数据的输入框字体 + label_emu_1 = tk.Label(self.packet_emu, text='数据内容:').grid(row=0, pady=5) + label_emu_2 = tk.Label(self.packet_emu, text='数据大小(kb):').grid(row=1, pady=5) + label_emu_3 = tk.Label(self.packet_emu, text='数据标签:').grid(row=2, pady=5) + # 建立输入框 + self.entry_emu_1 = tk.Entry(self.packet_emu) + self.entry_emu_1.grid(row=0, column=1) + self.entry_emu_2 = tk.Entry(self.packet_emu) + self.entry_emu_2.grid(row=1, column=1) + self.entry_emu_3 = tk.Entry(self.packet_emu) + self.entry_emu_3.grid(row=2, column=1) + + # 创建按钮来开始模拟 + button_emu_left = tk.Button(self.packet_emu, text='开启模拟', command=self.openpack_btn).grid(row=5) # 函数未完成 + return None + + + '''创建openpack_btn函数启动按钮''' + def openpack_btn(self): + # 在关闭窗口前获取其中的数据 + entry_emu_1_data = self.entry_emu_1.get() + entry_emu_2_data = self.entry_emu_2.get() + entry_emu_3_data = self.entry_emu_3.get() + '''外接函数来获取对象的数据''' + self.select_objlable = select_ObjLable() + # # 添加if判断 + if entry_emu_1_data == '' or entry_emu_2_data == '' or entry_emu_3_data == '': + self.packet_emu.destroy() + messagebox.showinfo('Error', '数据不能为空') + # elif entry_emu_4_data == '' or entry_emu_5_data == '': + # self.packet_emu.destroy() + # messagebox.showinfo('Error', '发送主机or接收主机不能为空') + # elif entry_emu_4_data == entry_emu_5_data and entry_emu_4_data != '': + # self.packet_emu.destroy() + # messagebox.showinfo('Error', '发送主机和接收主机不能相同') + # elif entry_emu_4_data not in self.select_objlable and entry_emu_5_data not in self.select_objlable: + # self.packet_emu.destroy() + # messagebox.showinfo('Error', '发送主机or接收主机不存在') + else: + self.packet_emu.destroy() # 关闭启动模拟窗口 + # 获取的模拟数据包信息 + self.AppPackTag_Data = { + 'AppPackID': entry_emu_1_data, + 'AppPackSize': entry_emu_2_data, + 'AppPackTag': entry_emu_3_data + } + # print(self.AppPackTag_Data) + '''这里获取需要循环发送信封的次数''' + self.move_number = int(self.AppPackTag_Data['AppPackSize']) / 2048 + if self.move_number > 0 and self.move_number < 1: + self.move_number = 1 + elif self.move_number % 1 != 0: + self.move_number = int(self.move_number + 1) + # print('需要拆分成的数据包数量:'+str(self.move_number)) + # print(self.host_date) + # '''首先先建立一个判断两个主机之间是否存在通信的可能''' + # 建立一个数组用来存储需要循环显示的数据 + # 需要在这个位置创建一个tcp类似的子窗口 + # self.Mock_TCP() + '''这里建立外接函数,在移动信封的同时需要设置在最下方显示进度提示,在最右边显示完成进度''' + self.envelop_move() + return None + + '''编写模拟信封传送至交换机''' + def envelop_move(self): # 移动信封的函数主体 + '''在移动信封的同时需要设置在最下方显示进度提示,在最右边显示完成进度''' + '''建立一个暂时的变量,可以替换''' + self.unpacket = 0 + self.location_all = [] # 定义用来存放对象的位置 + for item in self.ObjShow_1_data: + # print(item) + ObjX = item['ObjX'];ObjY = item['ObjY'];ObjID = item['ObjID'];ObjType = item['ObjType'] + location = (ObjX, ObjY, ObjID, ObjType) + self.location_all.append(location) + # print(self.location_all) + # 实现信封移动,并在实现的同时使最下方和最右方的canvas中显示数据 + self.show_envelop = EnvelopMove(cv=self.cv,img_host=img_host, img_router=img_router, img_envelop=img_envelop,img_detail=img_detail,move_data=self.location_all,unpacket=self.unpacket, + move_number=self.move_number,right_on_text=self.right_on_text,Objshow_data=self.ObjShow_1_data,AppPackTag_Data=self.AppPackTag_Data, + right_under_text=self.right_under_text,under_text=self.under_text) + self.show_envelop.main_envelop() + self.Mouse = self.show_envelop.Mouse_Event() + # self.show_envelop.show_data_move() + # print(self.ObjShow_1_data) + # print(self.location_all) + return None + + # 设置画出对象详情数据的图 + def Show_Canvas_Right(self): + self.simhost_all_data = get_simhost_alldata() # 获取simhost表中的所有数据 + # print(self.simhost_all_data) + self.ObjShow_1_data = Select_ObjShow() # 采集所有ObjShow为1的数据 + # print(self.ObjShow_1_data) + self.line_data = line_draw(self.ObjShow_1_data) + # print(self.line_data) + '''外接画线函数''' + self.show_line = Line_Right(cv=self.cv, line_data=self.line_data) + self.show_line.line_test() + '''这个位置需要添加一个固定的line存在,用来连接并不需要连通线的对象.''' + self.useless_line = Useless_line(cv=self.cv, Useless_line_data=self.simhost_all_data) + # 显示不需要连接的线 + self.useless_line.draw_line_less() + '''调用函数将对象显示在方框内''' + self.show_cr = Show_Right_All(cv=self.cv, all_data=self.simhost_all_data) + self.show_cr.Show_img(img_host=img_host, img_router=img_router) + return None + # 测试 在最左侧实现详情数据 + def right_show_all(self): + '''更换编写方式使用最原本的text特性''' + self.right_on_label = tk.Label(self.init_window_name, text='发送主机详情:',font=('蔚然雅黑', 12, 'bold')) + # self.right_on_label.pack(side=tk.TOP, fill=tk.Y, padx=10, pady=10) + self.right_on_label.pack(anchor=tk.NW, fill=tk.Y, padx=5, pady=5) + # self.right_on_text = tk.Text(self.init_window_name, width=29, height=13) + self.right_on_text = tk.Text(self.init_window_name, width=24, height=10) + self.right_on_text.pack(anchor=tk.NW, fill=tk.Y, padx=5, pady=5) + self.right_under_label = tk.Label(self.init_window_name, text='接收主机详情:', font=('蔚然雅黑', 12, 'bold')) + self.right_under_label.pack(anchor=tk.NW, fill=tk.Y, padx=5, pady=5) + # self.right_under_text = tk.Text(self.init_window_name, width=29, height=13) + self.right_under_text = tk.Text(self.init_window_name, width=24, height=10) + self.right_under_text.pack(anchor=tk.NW, fill=tk.Y, padx=5, pady=5) + self.right_on_text.configure(font=("TkDefaultFont", 12)) + self.right_under_text.configure(font=("TkDefaultFont", 12)) + # self.canvas_right_detail = tk.Canvas(self.cv, width=290, height=700, bg='white') + # self.cv.create_window(1290, 280, window=self.canvas_right_detail, width=290, height=705) + # self.canvas_right_detail.create_text(80, 90, text='发送主机 '+self.ObjShow_1_data[0]['ObjLable']+' 详情:', font=('蔚然雅黑', 12, 'bold'), fill='black') + # '''在该canvas画布下的子画布中创建两个frame组件''' + # self.right_on_frame = tk.Frame(self.canvas_right_detail, width=280, height=270, bg='lightgray') + # self.canvas_right_detail.create_window(145, 250, window=self.right_on_frame) + # # 接收主机的属性 + # self.canvas_right_detail.create_text(80, 400, text='接收主机 '+self.ObjShow_1_data[-1]['ObjLable']+' 详情:', font=('蔚然雅黑', 12, 'bold'), fill='black') + # self.right_under_frame = tk.Frame(self.canvas_right_detail, width=280, height=270, bg='lightgray') + # self.canvas_right_detail.create_window(145, 560, window=self.right_under_frame) + # ''' + # 接下来的目的: + # 1.在下面的两个frame组件中加入文本框组件 + # 2.可以实现分批次的显示数据 + # ''' + # self.canvas_on_ftext = tk.Text(self.right_on_frame, width=10, height=10) + # self.canvas_on_ftext.pack() + return None + + # 测试 在最下方设置操作输出框 + def under_show_all(self): + '''更换方式显示''' + scrollbar_y = tk.Scrollbar(self.init_window_name) + scrollbar_y.place(x=760, y=380,relheight=0.25) + # scrollbar_x = tk.Scrollbar(self.init_window_name, orient=tk.HORIZONTAL) + # scrollbar_x.pack(side=tk.BOTTOM, fill=tk.X) + self.under_label = tk.Label(self.init_window_name, text='数据传输: ', font=('蔚然雅黑', 12, 'bold')) + # self.under_label.pack(side=tk.BOTTOM, anchor=tk.SW) + self.under_label.place(x=10, y=375) + # self.under_text = tk.Text(self.init_window_name, width=82, height=8) + self.under_text = tk.Text(self.init_window_name, width=65, height=8) + # self.under_text.place(x=140, y=638, relheight=1) + self.under_text.place(x=100, y=375) + self.under_text.configure(font=("TkDefaultFont", 12)) + scrollbar_y.config(command=self.under_text.yview) + self.under_text.config(yscrollcommand=scrollbar_y.set) + # scrollbar_x.config(command=self.under_text.xview) + # # 设置子canvas画布 + # self.canvas_under_detail = tk.Canvas(self.cv,width=2000, height=177, bg='white') + # self.cv.create_window(450, 720, window=self.canvas_under_detail, width=2000, height=177) + # self.canvas_under_detail.create_text(750, 21,text='数据传输进度: ', font=('蔚然雅黑', 12, 'bold'), fill='black') + # '''创建在最下方的canvas画布中的详情显示frame''' + # self.canvas_under_frame = tk.Frame(self.canvas_under_detail, width=1500, height=143, bg='lightgray') + # self.canvas_under_detail.create_window(1250, 105, window=self.canvas_under_frame) + return None + + + + + +if __name__ == '__main__': + init_Windows = tk.Tk() # 创建一个父窗口 + create_simhost() + create_ipaddr() + insert_simhost() + insert_ipaddr() + img_host = PhotoImage(file='/data/workspace/myshixun/images/主机_2.png') + img_router = PhotoImage(file='/data/workspace/myshixun/images/路由器_2.png') + img_envelop = PhotoImage(file='/data/workspace/myshixun/images/信封_2.png') + img_detail = PhotoImage(file='/data/workspace/myshixun/images/详情头_2.png') + # img_host = PhotoImage(file='../images/主机_2.png') + # img_router = PhotoImage(file='../images/路由器_2.png') + # img_envelop = PhotoImage(file='../images/信封_2.png') + # img_detail = PhotoImage(file='../images/详情头_2.png') + Gui = Main_Gui(init_Windows) + Gui.Set_init_window() + print('程序运行成功!') + init_Windows.mainloop() diff --git a/Internet/pack_un_all.py b/Internet/pack_un_all.py new file mode 100644 index 0000000..a7b84e8 --- /dev/null +++ b/Internet/pack_un_all.py @@ -0,0 +1,189 @@ +# 这个函数用来实现模拟解包过程 + + +# 创建类用来处理解包函数 +class Unpack_All(): + # 获取需要的数据 + def __init__(self,MacPacketString, IPPacketString, TransPacketString, AppPacketString): + self.MacPacketString = MacPacketString + self.IPPacketString = IPPacketString + self.TransPacketString = TransPacketString + self.AppPacketString = AppPacketString + + # 建立函数用来处理MacPacketString中的数据 + def unpack_mac_data(self): + # print(self.MacPacketString) + MacData_All = [] + # 将获取的数据分解成macdata中 + for item in self.MacPacketString: + ObjID = item['ObjID'] + ObjLable = item['ObjLable'] + MacPackId = item['MacPackId'] + IPPackID = item['IPPackID'] + sentmac = item['sentmac'] + rcptmac = item['rcptmac'] + sourceip = item['sourceip'] + targetip = item['targetip'] + sourceAppAddr = item['sourceAppAddr'] + targetAppAddr = item['targetAppAddr'] + MacData = { + 'ObjID': ObjID, + 'ObjLable': ObjLable, + 'MacPackId': MacPackId, + 'IPPackID': IPPackID, + 'sentmac': sentmac, + 'rcptmac': rcptmac, + 'sourceip': sourceip, + 'targetip': targetip, + 'sourceAppAddr': sourceAppAddr, + 'targetAppAddr': targetAppAddr, + 'MacPacketString': item + } + MacData_All.append(MacData) + return MacData_All + + # 建立函数用来处理IPPacket中的数据 + def unpack_ip_data(self): + IPData_All = [] + for item in self.IPPacketString: + ObjID = item['ObjID'] + ObjLable = item['ObjLable'] + IPPackID = item['IPPackID'] + TransPackID = item['TransPackID'] + sourceip = item['sourceip'] + targetip = item['targetip'] + sourceAppAddr = item['sourceAppAddr'] + targetAppAddr = item['targetAppAddr'] + IPData = { + 'ObjID': ObjID, + 'ObjLable': ObjLable, + 'IPPackID': IPPackID, + 'TransPackID': TransPackID, + 'sourceip': sourceip, + 'targetip': targetip, + 'sourceAppAddr': sourceAppAddr, + 'targetAppAddr': targetAppAddr, + 'IPPacketString': item + } + IPData_All.append(IPData) + return IPData_All + + + # 建立一个函数用来处理Trans的解包 + def unpack_trans_data(self): + TransData_All = [] + for item in self.TransPacketString: + ObjID = item['ObjID'] + ObjLable = item['ObjLable'] + TransPackID = item['TransPackID'] + TransSeq = item['TransSeq'] + TransTag = item['TransTag'] + AppPackId = item['AppPackId'] + sentport = item['sentport'] + rpctport = item['rpctport'] + sourceAppAddr = item['sourceAppAddr'] + targetAppAddr = item['targetAppAddr'] + TransData = { + 'ObjID': ObjID, + 'ObjLable': ObjLable, + 'TransPackID': TransPackID, + 'TransSeq': TransSeq, + 'TransTag': TransTag, + 'AppPackId': AppPackId, + 'sentport': sentport, + 'rpctport': rpctport, + 'sourceAppAddr': sourceAppAddr, + 'targetAppAddr': targetAppAddr, + 'TransPacketString': item + } + TransData_All.append(TransData) + return TransData_All + + # 建立一个函数用来处理App的解包 + def unpack_app_data(self): + ObjID = self.AppPacketString['ObjID'] + ObjLable = self.AppPacketString['ObjLable'] + AppPackId = self.AppPacketString['AppPackId'] + AppPackSize = self.AppPacketString['AppPackSize'] + AppPackTag = self.AppPacketString['AppPackTag'] + sourceAppAddr = self.AppPacketString['sourceAppAddr'] + targetAppAddr = self.AppPacketString['targetAppAddr'] + AppData = { + 'ObjID': ObjID, + 'ObjLable': ObjLable, + 'AppPackId': AppPackId, + 'AppPackSize': AppPackSize, + 'AppPackTag': AppPackTag, + 'sourceAppAddr': sourceAppAddr, + 'targetAppAddr': targetAppAddr, + 'AppPacketString': self.AppPacketString + } + # print(AppData) + return AppData + + +if __name__ == '__main__': + MacPacketString = [ + {'ObjID': 'SHO1', + 'ObjLable': 'A', + 'MAC_number': 1, + 'MacPackId': 'MacPackID1', + 'IPPackID': 'IPPack1', + 'sentmac': '00:1a:8c:10:ad:30', + 'rcptmac': '00:1a:8c:10:ad:20', + 'sourceip': '196.168.1.1', + 'targetip': '196.168.3.1', + 'sourceAppAddr': '196.168.1.1:63179', + 'targetAppAddr': '196.168.3.1:17242' + }] + + IPPacketString = [ + {'ObjID': 'SHO1', + 'ObjLable': 'A', + 'number': 1, + 'IPPackID': 'IPPack1', + 'TransPackID': 'TransPack1', + 'sourceip': '196.168.1.1', + 'targetip': '196.168.3.1', + 'sourceAppAddr': '196.168.1.1:37486', + 'targetAppAddr': '196.168.3.1:13191', + 'Mac_data': '00:1a:8c:10:ad:30'}] + + TransPacketString = [ + {'ObjID': 'SHO1', + 'ObjLable': 'A', + 'TransPackID': 'TransPack1', + 'TransSeq': '1', + 'TransTag': 'A1', + 'AppPackId': '1', + 'sentport': '41749', + 'rpctport': '20712', + 'sourceAppAddr': '196.168.1.1:41749', + 'targetAppAddr': '196.168.3.1:20712', + 'timestamp': '15:25:59', + 'Mac_data': '00:1a:8c:10:ad:30'}] + + AppPacketString = { + 'ObjID': 'SHO1', + 'ObjLable': 'A', + 'AppPackId': '1', + 'AppPackSize': 1, + 'AppPackTag': '1', + 'sourceAppAddr': '196.168.1.1:47325', + 'timeStamp': '15:22:28', + 'Mac_data': '00:1a:8c:10:ad:30', + 'targetAppAddr': '196.168.3.1:14035'} + + test_line = Unpack_All(MacPacketString,IPPacketString,TransPacketString,AppPacketString) + # test_line.unpack_mac_data() + test = test_line.unpack_app_data() + print(test) + print(test_line.unpack_trans_data()) + print(test_line.unpack_ip_data()) + print(test_line.unpack_mac_data()) + ''' + {'ObjID': 'SHO1', 'ObjLable': 'A', 'AppPackId': '1', 'AppPackSize': 1, 'AppPackTag': '1', 'sourceAppAddr': '196.168.1.1:47325', 'targetAppAddr': '196.168.3.1:14035', 'AppPacketString': {'ObjID': 'SHO1', 'ObjLable': 'A', 'AppPackId': '1', 'AppPackSize': 1, 'AppPackTag': '1', 'sourceAppAddr': '196.168.1.1:47325', 'timeStamp': '15:22:28', 'Mac_data': '00:1a:8c:10:ad:30', 'targetAppAddr': '196.168.3.1:14035'}} + [{'ObjID': 'SHO1', 'ObjLable': 'A', 'TransPackID': 'TransPack1', 'TransSeq': '1', 'TransTag': 'A1', 'AppPackId': '1', 'sentport': '41749', 'rpctport': '20712', 'sourceAppAddr': '196.168.1.1:41749', 'targetAppAddr': '196.168.3.1:20712', 'TransPacketString': {'ObjID': 'SHO1', 'ObjLable': 'A', 'TransPackID': 'TransPack1', 'TransSeq': '1', 'TransTag': 'A1', 'AppPackId': '1', 'sentport': '41749', 'rpctport': '20712', 'sourceAppAddr': '196.168.1.1:41749', 'targetAppAddr': '196.168.3.1:20712', 'timestamp': '15:25:59', 'Mac_data': '00:1a:8c:10:ad:30'}}] + [{'ObjID': 'SHO1', 'ObjLable': 'A', 'IPPackID': 'IPPack1', 'TransPackID': 'TransPack1', 'sourceip': '196.168.1.1', 'targetip': '196.168.3.1', 'sourceAppAddr': '196.168.1.1:37486', 'targetAppAddr': '196.168.3.1:13191', 'IPPacketString': {'ObjID': 'SHO1', 'ObjLable': 'A', 'number': 1, 'IPPackID': 'IPPack1', 'TransPackID': 'TransPack1', 'sourceip': '196.168.1.1', 'targetip': '196.168.3.1', 'sourceAppAddr': '196.168.1.1:37486', 'targetAppAddr': '196.168.3.1:13191', 'Mac_data': '00:1a:8c:10:ad:30'}}] + [{'ObjID': 'SHO1', 'ObjLable': 'A', 'MacPackId': 'MacPackID1', 'IPPackID': 'IPPack1', 'sentmac': '00:1a:8c:10:ad:30', 'rcptmac': '00:1a:8c:10:ad:20', 'sourceip': '196.168.1.1', 'targetip': '196.168.3.1', 'sourceAppAddr': '196.168.1.1:63179', 'targetAppAddr': '196.168.3.1:17242', 'MacPacketString': {'ObjID': 'SHO1', 'ObjLable': 'A', 'MAC_number': 1, 'MacPackId': 'MacPackID1', 'IPPackID': 'IPPack1', 'sentmac': '00:1a:8c:10:ad:30', 'rcptmac': '00:1a:8c:10:ad:20', 'sourceip': '196.168.1.1', 'targetip': '196.168.3.1', 'sourceAppAddr': '196.168.1.1:63179', 'targetAppAddr': '196.168.3.1:17242'}}] + ''' diff --git a/Internet/packet_all.py b/Internet/packet_all.py new file mode 100644 index 0000000..7bf448d --- /dev/null +++ b/Internet/packet_all.py @@ -0,0 +1,285 @@ +# 封包处理函数 +import random +import datetime + + +# 建立一个类将所有的函数放入其中 +# 将所有的主机路由器详细数据存入一个字典列表中? +# 将主机路由器的ObjID存入一个数组中通过循环来判断下一级的RctpMAC. +# MACID = ['MacA','MacR1', 'MacR2', 'MacR4', 'MacR5', 'MacD'] +# 不能将所有的函数整合成一个类 + +# 建立一个全局变量IP_number +IP_number = 0 +MAC_number = 0 + + +class AllData(): + ''' + MACID: 这个数据将从数据库simhost获取所有的数据并将每条数据中以先后组成一个mac地址数组 + ShowData: 这个数据是将数据库simhost中的所有数据组成一个字典数组从里面 + AppPackTag: 这个数据是需要用户点击前端页面的封包模拟里面输入的数据 + ''' + def __init__(self, MACID, ShowData, AppPackTag_Data): + self.MACID = MACID + self.ShowData = ShowData + self.AppPackTag_Data = AppPackTag_Data + + + def AppData(self): + MACID = self.MACID + ShowData = self.ShowData + AppPackTag_Data = self.AppPackTag_Data + # 拿到前台传过来的数据并处理 + # 将收集的数据进行处理 + ''' + test: + 这里添加一个对字典列表ShowData的for循环 + 然后对字典列表里的['ObjID']进行判断,判断是否为开始主机 + ''' + # print(len(ShowData)) + AppPackedString = {} + for i in range(0,len(ShowData)): + # print(i) + if i == 0 and ShowData[i]['ObjType'] == 1: + ObjID = ShowData[i]['ObjID'] + ObjLable = ShowData[i]['ObjLable'] + AppPackId = AppPackTag_Data['AppPackID'] + AppPackSize = AppPackTag_Data['AppPackSize'] + AppPackTag = AppPackTag_Data['AppPackTag'] + sentport = random.randint(2048, 65535) + sourceAppAddr = ShowData[i]['IPAddr'] + ':' + str(sentport) + timeStamp = datetime.datetime.now().strftime('%H:%M:%S') + Mac_data = ShowData[i]['MACAddr'] + # 对字典进行添加 + AppPackedString['ObjID'] = ObjID + AppPackedString['ObjLable'] = ObjLable + AppPackedString['AppPackId'] = AppPackId + AppPackedString['AppPackSize'] = AppPackSize + AppPackedString['AppPackTag'] = AppPackTag + AppPackedString['sourceAppAddr'] = sourceAppAddr + AppPackedString['timeStamp'] = timeStamp + AppPackedString['Mac_data'] = Mac_data + if i == (len(ShowData)-1): + rpctport = random.randint(2048, 65535) + targetAppAddr = ShowData[i]['IPAddr'] + ':' + str(rpctport) + AppPackedString['targetAppAddr'] = targetAppAddr + return AppPackedString + + def TransData(self,AppPackedString): + ''' + 这里需要处理获取的信息 + ''' + # print(AppPackedString) + AppPackSize = AppPackedString['AppPackSize'] + page_true = Spilt_AppData(AppPackSize) + # 定义一个空列表存放所有TransPackedString + TransPackedString_All = [] + # 将数据包分为page_true个传输层数据包 + for i in range(0, page_true): + num = i + 1 + # 这里需要建立一个将Trans数据封包函数 + TransPackedString = insert_TransData(num, AppPackedString) + TransPackedString_All.append(TransPackedString) + # print(TransPackedString_All) + return TransPackedString_All + + + + + + # 这里建立一个IP层封包数据函数 + def IPData(self,TransPackedString): + # 将获取的字典数组进行拆分 + IPPackedString_All = [] + for item in TransPackedString: + global IP_number + IP_number = IP_number + 1 # IP_number为记录数据经过函数IPData的次数 + ObjID = item['ObjID'] + ObjLable = item['ObjLable'] + IPPackID = 'IPPack' + str(IP_number) + TransPackID = item['TransPackID'] + sourceip_true = item['sourceAppAddr'].split(':') + sourceip = sourceip_true[0] + targetip_true = item['targetAppAddr'].split(':') + targetip = targetip_true[0] + sourceAppAddr = item['sourceAppAddr'] + targetAppAddr = item['targetAppAddr'] + Mac_data = item['Mac_data'] + IPPackedString = { + 'ObjID': ObjID, + 'ObjLable': ObjLable, + 'number': IP_number, + 'IPPackID': IPPackID, + 'TransPackID': TransPackID, + 'sourceip': sourceip, + 'targetip': targetip, + 'sourceAppAddr': sourceAppAddr, + 'targetAppAddr': targetAppAddr, + 'Mac_data': Mac_data + } + IPPackedString_All.append(IPPackedString) + return IPPackedString_All + + + '''{'ObjID': 'SHO1', 'ObjLable': 'A', 'AppPackId': 'AppPack1', 'AppPackSize': 6144, 'AppPackTag': 'A-6144-Data', 'sourceAppAddr': '196.168.1.1:35239', 'timeStamp': '13:03:25', 'Mac_data': '00:1a:8c:10:ad:30', 'targetAppAddr': '196.168.3.1:45771'} + [{'ObjID': 'SHO1', 'ObjLable': 'A', 'TransPackID': 'TransPack1', 'TransSeq': '1', 'TransTag': 'A1', 'AppPackId': 'AppPack1', 'sentport': '35239', 'rpctport': '45771', 'sourceAppAddr': '196.168.1.1:35239', 'targetAppAddr': '196.168.3.1:45771', 'timestamp': '13:03:25', 'Mac_data': '00:1a:8c:10:ad:30'}, {'ObjID': 'SHO1', 'ObjLable': 'A', 'TransPackID': 'TransPack2', 'TransSeq': '2', 'TransTag': 'A2', 'AppPackId': 'AppPack1', 'sentport': '35239', 'rpctport': '45771', 'sourceAppAddr': '196.168.1.1:35239', 'targetAppAddr': '196.168.3.1:45771', 'timestamp': '13:03:25', 'Mac_data': '00:1a:8c:10:ad:30'}, {'ObjID': 'SHO1', 'ObjLable': 'A', 'TransPackID': 'TransPack3', 'TransSeq': '3', 'TransTag': 'A3', 'AppPackId': 'AppPack1', 'sentport': '35239', 'rpctport': '45771', 'sourceAppAddr': '196.168.1.1:35239', 'targetAppAddr': '196.168.3.1:45771', 'timestamp': '13:03:25', 'Mac_data': '00:1a:8c:10:ad:30'}] + [{'ObjID': 'SHO1', 'ObjLable': 'A', 'number': 1, 'IPPackID': 'IPPack1', 'TransPackID': 'TransPack1', 'sourceip': '196.168.1.1', 'targetip': '196.168.3.1', 'sourceAppAddr': '196.168.1.1:35239', 'targetAppAddr': '196.168.3.1:45771', 'Mac_data': '00:1a:8c:10:ad:30'}, {'ObjID': 'SHO1', 'ObjLable': 'A', 'number': 2, 'IPPackID': 'IPPack2', 'TransPackID': 'TransPack2', 'sourceip': '196.168.1.1', 'targetip': '196.168.3.1', 'sourceAppAddr': '196.168.1.1:35239', 'targetAppAddr': '196.168.3.1:45771', 'Mac_data': '00:1a:8c:10:ad:30'}, {'ObjID': 'SHO1', 'ObjLable': 'A', 'number': 3, 'IPPackID': 'IPPack3', 'TransPackID': 'TransPack3', 'sourceip': '196.168.1.1', 'targetip': '196.168.3.1', 'sourceAppAddr': '196.168.1.1:35239', 'targetAppAddr': '196.168.3.1:45771', 'Mac_data': '00:1a:8c:10:ad:30'}] + [{'ObjID': 'SHO1', 'ObjLable': 'A', 'MAC_number': 1, 'MacPackId': 'MacPackID1', 'IPPackID': 'IPPack1', 'sentmac': '00:1a:8c:10:ad:30', 'rcptmac': '00:1a:8c:10:ad:30', 'sourceip': '196.168.1.1', 'targetip': '196.168.3.1', 'sourceAppAddr': '196.168.1.1:35239', 'targetAppAddr': '196.168.3.1:45771'}, {'ObjID': 'SHO1', 'ObjLable': 'A', 'MAC_number': 2, 'MacPackId': 'MacPackID2', 'IPPackID': 'IPPack2', 'sentmac': '00:1a:8c:10:ad:30', 'rcptmac': '00:1a:8c:10:ad:30', 'sourceip': '196.168.1.1', 'targetip': '196.168.3.1', 'sourceAppAddr': '196.168.1.1:35239', 'targetAppAddr': '196.168.3.1:45771'}, {'ObjID': 'SHO1', 'ObjLable': 'A', 'MAC_number': 3, 'MacPackId': 'MacPackID3', 'IPPackID': 'IPPack3', 'sentmac': '00:1a:8c:10:ad:30', 'rcptmac': '00:1a:8c:10:ad:30', 'sourceip': '196.168.1.1', 'targetip': '196.168.3.1', 'sourceAppAddr': '196.168.1.1:35239', 'targetAppAddr': '196.168.3.1:45771'}] + ''' + + # 这里建立一个MAC层封包数据函数 + # def MACData(self,IPPackedString,MACID): + def MACData(self, IPPackedString): + # 建立一个空数组用来存放所有的数据 + MacPackedString_All = [] + for item in IPPackedString: + global MAC_number + rcptmac = '' + ObjID = item['ObjID'] + ObjLable = item['ObjLable'] + MAC_number = MAC_number + 1 + MacPackId = 'MacPackID' + str(MAC_number) + IPPackID = item['IPPackID'] + sentmac = item['Mac_data'] + # 循环MACID来获取下一级rcptmac + for i in range(len(self.MACID)-1): + if sentmac == self.MACID[i]: + rcptmac = self.MACID[i+1] + + + + sourceip = item['sourceip'] + targetip = item['targetip'] + sourceAppAddr = item['sourceAppAddr'] + targetAppAddr = item['targetAppAddr'] + MacPackedString = { + 'ObjID': ObjID, + 'ObjLable': ObjLable, + 'MAC_number': MAC_number, + 'MacPackId': MacPackId, + 'IPPackID': IPPackID, + 'sentmac': sentmac, + 'rcptmac': rcptmac, + 'sourceip': sourceip, + 'targetip': targetip, + 'sourceAppAddr': sourceAppAddr, + 'targetAppAddr': targetAppAddr + } + MacPackedString_All.append(MacPackedString) + return MacPackedString_All + + + +# 建立一个使应用层数据包进行拆分的函数 +def Spilt_AppData(AppPackSize): + # 将获取的数据包大小进行拆分 + page = int(AppPackSize) / 2048 + # 定义一个初始值 + page_true = 0 + if page < 1 and page != 0: + page_true = int(page) + 1 + elif page % 1 == 0: + page_true = int(page) + elif page % 1 > 0: + page_true = int(page) + 1 + return page_true + + +# 建立一个进行TransData数据封包函数 +def insert_TransData(num, AppPackedString): + TransPackID_Riget = num + ObjID = AppPackedString['ObjID'] + ObjLable = AppPackedString['ObjLable'] + TransPackID = 'TransPack'+str(TransPackID_Riget) + TransSeq = str(TransPackID_Riget) + TransTag = AppPackedString['ObjLable']+str(TransPackID_Riget) + AppPackId = AppPackedString['AppPackId'] + sentport_one = AppPackedString['sourceAppAddr'].split(':') + # print(sentport_one) + sentport = sentport_one[1] + # print(sentport) + rpctport_one = AppPackedString['targetAppAddr'].split(':') + rpctport = rpctport_one[1] + sourceAppAddr = AppPackedString['sourceAppAddr'] + targetAppAddr = AppPackedString['targetAppAddr'] + timestamp = datetime.datetime.now().strftime('%H:%M:%S') + Mac_data = AppPackedString['Mac_data'] + TransPackedString = { + 'ObjID': ObjID, + 'ObjLable': ObjLable, + 'TransPackID': TransPackID, + 'TransSeq': TransSeq, + 'TransTag': TransTag, + 'AppPackId': AppPackId, + 'sentport': sentport, + 'rpctport': rpctport, + 'sourceAppAddr': sourceAppAddr, + 'targetAppAddr': targetAppAddr, + 'timestamp': timestamp, + 'Mac_data': Mac_data + } + # print(TransPackedString) + return TransPackedString + + + + +if __name__ == '__main__': + # 建立一个列表来存放ObjID里的MAC地址 , test + MACID = ['00:1a:8c:10:ad:30', '00:1a:8c:10:ad:30'] + # MACID = { + # 'A': 'MacA', + # 'R1': 'MacR1', + # 'R2': 'MacR2', + # 'R4': 'MacR4', + # 'R5': 'MacR5', + # 'D': 'MacD' + # } + # 定义一个数据用来模拟前台发送过来的数据:字典类型最好, test + # 这个位置需要的使一个字典列表, 至少需要两个以上的字典 + ''' + ShowData为字典数组,进行到第三步需要将数据修改进行替换, + 此数据需要前端传入后端以json格式 + ''' + # port 好需要通过random来实现 + ShowData = [ + { + 'id': 1, + 'ObjID': 'SHO1', + 'ObjType':1, + 'ObjLable': 'A', + 'IPAddr': '196.168.1.1', # 起始IP地址 + 'ObjX': 210, + 'ObjY': 130, + 'MACAddr': '00:1a:8c:10:ad:30' # test用mac地址 + }, + { + 'id': 1, + 'ObjID': 'SRO1', + 'ObjType': 2, + 'ObjLable': 'R1', + 'IPAddr': '196.168.3.1', # 最终IP地址 + 'ObjX': 210, + 'ObjY':130, + 'MACAddr': '00:1a:8c:10:ad:30' + } + ] + AppPackTag_Data = { + 'AppPackID': 'AppPack1', + 'AppPackSize': 6144, + 'AppPackTag': 'A-6144-Data' + } + # 需要定义一个最终IP地址路由节点用来进行测试 test + # 测试主程序 + AllData = AllData(MACID, ShowData, AppPackTag_Data) + test = AllData.AppData() + print(test) + test_1 = AllData.TransData(test) + print(test_1) + test_2 = AllData.IPData(test_1) + print(test_2) + print(AllData.MACData(test_2)) + ''' + 封包函数数据以全部可以获取,现在进行主机和路由器之间的交互 + ''' \ No newline at end of file diff --git a/images/主机_1.png b/images/主机_1.png new file mode 100644 index 0000000000000000000000000000000000000000..8708a1fa8f3a5b50ccf44b308c7f45c9a840f547 GIT binary patch literal 4594 zcmVeZ`y@7{ZUpZoir-}(K{y|APuEon(hTGIa;iFexot+jdMjW@2Got;gjW>UuF9exgtP>802OY<`G?&ZS`FtKA z7L7*x4Z~<@)ElS(W-~d8D$eq=FQeuvRAH3Sy}v=~DlIKd4|H|)eDu8hEl2tSP=vP<#HL{_wjun0Il`HNw!VMbcopzhUd%lU34w) zz5E80CmDI_W`6&Z8^9|e04e2#zVAQzW{fl6CP-Fo*xH#VbiE8UUscSG_xkmTaH&+H zTCGwn7Egd`t&vh9gg^*!0$6K}p*4<#N}`X>ty^*1B_UUn8ry^R3J5Jg2!J;o(r+7Z z&Ue1Fa>q4a8rbkr<{rD9-{19B@`VDv?_-)K(P)%tG)g!e#8GMl5&@BbLCU38!1i$I^7nk(U0iuU&TFl-2a7}zV~Cyb(?tKnog`rfr&#;($?0> zC$GAS{{A&IH8r7>!f_lLjRxs-n*ICtlg(yNgfu{)p;{}kyeCXo0-C~ty+<>sdV{)L zm=1p6V_DV~A;hzEIL;9va-o$D3!u@3v_gzjb&LVrI??eXJ}}M@$qr8*(_4Z6Z7{t zEPxO`eh?;>9H6BI@)^kGM?ouuC(uG5ECVMV4vkMvUH5h8J6a0ycj`1ey(r+AZS&wm z4>6U?va){wEhL3Xkv-2p!+a(UQq$JmN^1f#=`?6XdwV;UWic``!meGrD3wYWhJj(6 z+$maXJkKK>jba;6bD>(T9sd_8B!LRJ`tzT|uw&eN=gz;}a^VO6Yxm<1?|WN;bLljz z*7WlaU;PTvP?X6+o_#OxXWK>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~m4G=AH9#Y^0Bs`>3s1}C!v26|SudX~YESB6fWg7R z!O6+V4b@8J8ija2Qg%3rB+CZ|Sikv9R-L(#*6uEB!$N2fmWehEGUXC()x{77P9%h3 zn+UCO42hvMhL8*$8scaF`9lU*_hZLmbho$C(bq@3IgFdnGIH<;V~3vO@JlH?*GEzY zp%->oGzbk68;OaK4FY_GG|-xH%d$S>y6#Cg@)otj77mA(*+%4C*R6gc(7|PX&`5@3 zak^KnVBOX&tlqqlmhK)b(3O*@~IU|xRnZyW#UA_grXs`sVR2f_b^r@#1)_U zbBfh6<40cM$l+ls=@~>g%DPo+aDq90{)1a7=kg#R5CW|%AV8uJ7zkm2^tE)@Ersz5 zx6=42kbYAhe%*tGpuN4lQweo(xm?`t)*4r!=rF=zqkGK&t2b|=f73>~mMmbi;w;a>4AyF69HN{ zpbQW$pfF&@G($g+#uN8#*%E#1fd`J%7sYToz<&&%OeW*ya(Qc`(fEMY`V+t!GaQ!5 zo^JX#oWU8JHnC!GkW_k>Bcr4EQgHsZ3rQrBq_Y`n%ENLTTI0<$g`-fb^8BL@vh&v4 z$fwgtX)HWL6&lU4-Z==K5GFqf+iGW}!fC(f@piuBVHk#Sp<`JWR$cc>1ZN=xp_T-~ z332g9F5|q5wi9k?!Lv;4a0qP*s+B6$e2L6-nwNL)=BayrLC|O*kq9l0Zv^Ir5O+$c z?ylE^2j7a3@5oy`8ZE-{@HRskSGe{1C0dKKm4fC(f>j&Wvv$kb^secrv#SdMj1P}+ z-<`kYm1mzt2#pXRg+#(W$8m0P!r^=8=jVss30vQGtyr-l6tS%L8iw(0fqWcjU`QQl zYt`%Cw^eUE|2$17qCsjyTG|k@Y#PQLp-||;_V)JJyKVnll?CW%@*G+dzQ4MB`s-5OIp&B cmh@KjKWb%Up*kMgvj6}907*qoM6N<$f;@D{xBvhE literal 0 HcmV?d00001 diff --git a/images/主机_2.png b/images/主机_2.png new file mode 100644 index 0000000000000000000000000000000000000000..abc553eace8335b1616bbc85642138e471b29591 G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USr*Y)9J``08Z|;JqJlEi zb7*x56<2V!-7sxLz66x-sWn_dgHz2TWN=tcib2Aj@=Fp;u8k;KrjD;kyv2(XsIt~C7y}JVh3uqTJ~*u`i8XDA}-=RKF*F1?v$qdrBrjv zVB6r3IkaU9BU`u9+S5Zc8bt{3Jdg3q<6J#=fwcpJjO^TjE5WPSPm<YbOJn#%LcIrnP+yp6hY$l~;M`si&DZbpj~` z5@`!5zbmCY1n%>$%jI{H_ st%>xup`oVq&zj|yZt0e8>Hn$z2mNP9w5*;8yZ`_I07*qoM6N<$f;M-dg8%>k literal 0 HcmV?d00001 diff --git a/images/信封_1.png b/images/信封_1.png new file mode 100644 index 0000000000000000000000000000000000000000..61da7181c3662e72f6910a72bf8a15fa7e39b431 GIT binary patch literal 1834 zcmV+_2i5qAP)4Tx0C=2ZU|>AK00b-s3=Fw>B}GB*P6`o`Q3?!5AThbPfB`pPWMKGq4MZ|9 zT-L>-4j14|Ni9wW(jS0Wr3h#_&`1#=TO=LA)&Q}SAZ!~DyS${J1jr5mv5P{2oPq2V zAX_6HiJgSRPA(_{sqX=@ZE|x;lM(J_;7QF34F=L2KrF*h%n-!j&ftXbfBqr{28*u@ z49pV{Vo5U@7`C@EFi6}&h^Z`KVBl|IVAysZA%+N(g2bXkun-FnGo__5Fnn6hz`z^H zz#x2qfq^R;77#exrT})EJ3~GYrZeO)qyj}e8S)sC8T5cGBL)KoLk2Sd9)CVoTA$8F z000HyNklS|A;>0EhD=Z=uMPY%EfX~3vERk670YGAl z(+Vx z@Bbe7zx6)fcWkdHb!WudYYw z$`>d$Mgms?0#P6W5Jn;Z6o?E8oJ1f%1O@??=>8R02m(~robJEP(Stbn>*1GP%9F{- z^W)3QQ9BZ=c#h#`zD$IZqwN&+YC%W_Kt#}aKsg2-RV*HS$okRrQ#y_U|Q>V721-&MnT5AEHz`r%WgXDk1ZT z6480NlfvlSeaiHAtdH;X4*iEBL1{R;bBn!tpSo_53q?Q#5eRdcuU92`I1%7m)!i{fuh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K#vpw#66 zs{yZ5ctK=DA`lQ25$s_aO}>Zz*HC;8}s>zO!<^TWy07*qoM6N<$g4N07asU7T literal 0 HcmV?d00001 diff --git a/images/详情头_2.png b/images/详情头_2.png new file mode 100644 index 0000000000000000000000000000000000000000..0f0b8a1fa200cb3b14280722b68e3b03f141f9a2 GIT binary patch literal 354 zcmV-o0iFJdP)P000UI0ssI2&dFi{0003gNkl*r}k8oIo>s}}P?)C6>d059srXFQudUF8px@LYqtxfo$3?)qcO!{Q|Jb*h`4 zNLQDy#b_lQA2|Om9?C;?a}gwfM7rkxL@gF`W=7Y6zu_e5hwzVn1OP&SLLh)33~$g9 zgtM%`y3r&`zPpj^X9%Jo1OdbcG@^DvRT5RfY+*hn^3ZFzWzAf-?FO!bg$R=netsrE zEovLg%G=k_d!ua0k2y<9UdKz#^w1iFZwP|O&Uj*Nz>l^FPZ&&nn#+1VE_OC07*qoM6N<$g69~S A@c;k- literal 0 HcmV?d00001 diff --git a/images/路由器_1.png b/images/路由器_1.png new file mode 100644 index 0000000000000000000000000000000000000000..33f020223c29ed31607aac4680f0fbef1ce8e65d GIT binary patch literal 4065 zcmV<74<7J|P)W~oRV&8ihsNh*s`GMPk-s3gXU zB$^mA6O2m|L}MmVL_`UZt(#4SfUFGy4ZZj4_wG5r`QyHB7&X!aCRJ0_->Oru-mQDj z{e92*?dL)ddeDO&^q>bl=s^$upFu?4b*;J@Z{oy$sdLNA3#zNnjlKJse}Y_Raxzu* z%PK0*Z)$8!59(ia^S-_NM&`n1JmVw8Q1Ofi9-@LehpM$UR8Rz{=v!XX*wp-JHk&!L zc=4kf=FFL6&!l{C1_&=-zTCg#jyo^fxOvNsZLO_+{J@`GQdCZ#Ui~O7E90zTgDEX3 zCmxiMOs7Z{CNSdD-kPDUwS`=^m4?Qn?ArY%Zy(xEef<#{8jpq@9qrGn;mD{F=R90f zyY^*udM5b(YY!bbJl8t8qN-|WP&H%_6UI(pV80=hmh~c@j1$_Bva&(+ zEgwp#V7%z1&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001 diff --git a/images/路由器_2.png b/images/路由器_2.png new file mode 100644 index 0000000000000000000000000000000000000000..b8c92779915f47cfb7843b988bd779f02df08818 GIT binary patch literal 2620 zcmV-C3d8k@P)5I{MkBbzNQow(L=)l`+^~X`s$h(0xnp8PW2~}L ziN;u3sL8lTg8~97QB($yWyB2;9ky8*hS~1c-RH}XJGeye#H~{Pn78UwSFhi5&iVR1 zUpEYBKm!`kfWFI8-{9U5FuJ6q`ml6w_M}X%%L-T_(2mwx*@8ig=NjJ^-}ovXjWl)j z^elqR7N8aI|1Z$9XU`7Q*FP~K7>=J~+kv{0!6kl2E9Ka6E+Z zgiI<;s&^mFtxfFMv4!nBwtLMjJDc|GZQGp5X6udHyFzQ#VvKzI&`K$ygUTjJ&RkSe zGvc(tC1n-Sc#s2XMiLDV!t-5}Wpl>q7m}!~!u3Ea@H~%y)Za_fM~xVhW^YFanM{sD zCLGDT?``oK8yjA4ZEb!c9xZ#ItE*|B$XA0esIg;l(4p&Vh8@;?*__|W;^#KXrN6jZ zii(OQ7AumV6BC6cwjGu$=iMb6HW*p|hRAEL_sXmbu9s-MT!4?;@ZsZR`SSN=?b=Sc z`<^8-<&;@oB$ix-Wu5q~0GF1Ij>n6KJbL2EKa)ov+bC}~ioCx?WX_!Vp8?t55{Vjl z@S#<*b*spN+aH!txaf1&45=O~i=W#jo8J^^Y!q3)At$%p_IDX|;KcS|B!0n{;j;TV z=k%mn=S`hDbH?1cH!^r|1=*}Yi>72y4Yk9@5sgKOM9NSYHg0;EmX;i)=DJy{-CWO%_V)H&g}`*7 z&Qw>|o`3etON)}_)nv0C8bPak;CN{XH6sruS#=PlgR3Ynt>l7PS5Q$gjNaZhUR?P! zxm<=3BPMe8d6%M`5WcoShfr1+!2$)A(P$J(AeVuok3NAZQ+{06-rh02zmYBk9jK|P zJz~t*gURMTb(!QR$9M`i2d?LmH9n~ufiDmY2N*MU zB90RVAQp=FDU{Y-w)B?z`Re zJy-!+KqDwDFdEB-_Py;adZwOqx(fy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