forked from ASLM-LIS/instrumentsimulations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
geneXpert.py
41 lines (37 loc) · 4.46 KB
/
geneXpert.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# below is a extract from a sample exploit that
# interfaces with a tcp socket
from netcat import Netcat
# start a new Netcat() instance
nc = Netcat('127.0.0.1', 5150)
# [ENQ]
nc.write('\005')
# [ACK]
nc.read_until('\006')
# STX-CR-ETX-CR-LF
# 2 STX (Ctrl-B) START OF TEXT
# 3 ETX (Ctrl-C) END OF TEXT
# 4 EOT (Ctrl-D) END OF TRANSMISSION
# 5 ENQ (Ctrl-E) ENQUIRY
# 10 LF (Ctrl-J) LINE FEED
# 11 VT (Ctrl-K) VERTICAL TAB
# 12 FF (Ctrl-L) FORM FEED
# 13 CR (Ctrl-M) CARRIAGE RETURN
# 14 SO (Ctrl-N) SHIFT OUT
# 15 SI (Ctrl-O) SHIFT IN
# 16 DLE (Ctrl-P) DATA LINK ESCAPE
# 17 DC1 (Ctrl-Q) DEVICE CONTROL 1 (XON)
# 18 DC2 (Ctrl-R) DEVICE CONTROL 2
# 19 DC3 (Ctrl-S) DEVICE CONTROL 3 (XOFF)
# 20 DC4 (Ctrl-T) DEVICE CONTROL 4
# 21 NAK (Ctrl-U) NEGATIVE ACKNOWLEDGE
# 22 SYN (Ctrl-V) SYNCHRONOUS IDLE
# 23 ETB (Ctrl-W) END OF TRANSMISSION BLOCK
# 24 CAN (Ctrl-X) CANCEL
# 25 EM (Ctrl-Y) END OF MEDIUM
# 26 SUB (Ctrl-Z) SUBSTITUTE
# 27 ESC (Ctrl-[) ESCAPE
# 28 FS (Ctrl-\) FILE SEPARATOR
# 29 GS (Ctrl-]) GROUP SEPARATOR
# 30 RS (Ctrl-^) RECORD SEPARATOR
# 31 US (Ctrl-_) UNIT SEPARATOR
nc.write('\0021MSH|^~\&|NTRLUG A010 F3 Version 1.0 Effective date 26/05/15^GeneXpert^4.8||Cepheid-3031JF9||20180317152150||ORU^R32^ORU_R30|URM-e/K6zIWA-12|P|2.5\015\012PID|1||TC 89599||^^^^|||||\015\012ORC|RE|1|||||||20180315115852\015\012OBR|1|||MTB-RIF|||||||||||||||||||||F\023\0022TQ1|||||||20180315115852|20180315133903|R\015\012OBX|1|ST|MTB-RIF&MTB&Xpert MTB-RIF Assay G4&5|MTB|NOT DETECTED^||||||F|||||^Isaac Newton Okeba||20190804~23011~512223738~612679~707992~Cepheid-3031JF9\015\012NTE|1|L|Notes^^MGIT CIULTURE ID TEST\015\012OBX|2|ST|\023\0023MTB-RIF&MTB|Probe D|NEG^|||\015\012OBX|3|ST|MTB-RIF&MTB|Probe D&Ct|^0.0||\015\012OBX|4|ST|MTB-RIF&MTB|Probe D&EndPt|^2.0||\015\012OBX|5|ST|MTB-RIF&MTB|Probe C|NEG^|||\015\012OBX|6|ST|MTB-RIF&MTB|Probe C&Ct|^0.0||\015\012OBX|7|ST|MTB-RIF&MTB|Probe C&EndPt|^12.0||\015\012OBX|8|ST|MTB\023\0024-RIF&MTB|Probe E|NEG^|||\015\012OBX|9|ST|MTB-RIF&MTB|Probe E&Ct|^0.0||\015\012OBX|10|ST|MTB-RIF&MTB|Probe E&EndPt|^-3.0||\015\012OBX|11|ST|MTB-RIF&MTB|Probe B|NEG^|||\015\012OBX|12|ST|MTB-RIF&MTB|Probe B&Ct|^0.0||\015\012OBX|13|ST|MTB-RIF&MTB|Probe B&EndPt|^8.0||\015\012OBX|14|ST|M\023\0025TB-RIF&MTB|Probe A|POS^|||\015\012OBX|15|ST|MTB-RIF&MTB|Probe A&Ct|^32.0||\015\012OBX|16|ST|MTB-RIF&MTB|Probe A&EndPt|^96.0||\015\012OBX|17|ST|MTB-RIF&MTB|SPC|NA^|||\015\012OBX|18|ST|MTB-RIF&MTB|SPC&Ct|^24.3||\015\012OBX|19|ST|MTB-RIF&MTB|SPC&EndPt|^267.0||\015\012OBX|20|ST|MTB-RIF\023\0026&Rif Resistance&Xpert MTB-RIF Assay G4&5|Rif Resistance|^||||||F|||||^Isaac Newton Okeba||20190804~23011~512223738~612679~707992~Cepheid-3031JF9\015\012NTE|1|L|Notes^^MGIT CIULTURE ID TEST\015\012OBX|21|ST|MTB-RIF&Rif Resistance|Probe D|NEG^|||\015\012OBX|22|ST\023\0027|MTB-RIF&Rif Resistance|Probe D&Ct|^0.0||\015\012OBX|23|ST|MTB-RIF&Rif Resistance|Probe D&EndPt|^2.0||\015\012OBX|24|ST|MTB-RIF&Rif Resistance|Probe C|NEG^|||\015\012OBX|25|ST|MTB-RIF&Rif Resistance|Probe C&Ct|^0.0||\015\012OBX|26|ST|MTB-RIF&Rif Resistance|Probe C&End\023\0020Pt|^12.0||\015\012OBX|27|ST|MTB-RIF&Rif Resistance|Probe E|NEG^|||\015\012OBX|28|ST|MTB-RIF&Rif Resistance|Probe E&Ct|^0.0||\015\012OBX|29|ST|MTB-RIF&Rif Resistance|Probe E&EndPt|^-3.0||\015\012OBX|30|ST|MTB-RIF&Rif Resistance|Probe B|NEG^|||\015\012OBX|31|ST|MTB-RIF&Rif Res\023\0021istance|Probe B&Ct|^0.0||\015\012OBX|32|ST|MTB-RIF&Rif Resistance|Probe B&EndPt|^8.0||\015\012OBX|33|ST|MTB-RIF&Rif Resistance|Probe A|POS^|||\015\012OBX|34|ST|MTB-RIF&Rif Resistance|Probe A&Ct|^32.0||\015\012OBX|35|ST|MTB-RIF&Rif Resistance|Probe A&EndPt|^96.0||\015\012OBX|\023\002236|ST|MTB-RIF&Rif Resistance|SPC|NA^|||\015\012OBX|37|ST|MTB-RIF&Rif Resistance|SPC&Ct|^24.3||\015\012OBX|38|ST|MTB-RIF&Rif Resistance|SPC&EndPt|^267.0||\015\012OBX|39|ST|MTB-RIF&QC Check&Xpert MTB-RIF Assay G4&5|QC Check|^||||||F|||||^Isaac Newton Okeba||20190\023\0023804~23011~512223738~612679~707992~Cepheid-3031JF9\015\012NTE|1|L|Notes^^MGIT CIULTURE ID TEST\015\012OBX|40|ST|MTB-RIF&QC Check|QC-1|NEG^|||\015\012OBX|41|ST|MTB-RIF&QC Check|QC-1&Ct|^0.0||\015\012OBX|42|ST|MTB-RIF&QC Check|QC-1&EndPt|^0.0||\015\012OBX|43|ST|MTB-RIF&QC Check\023\0024|QC-2|NEG^|||\015\012OBX|44|ST|MTB-RIF&QC Check|QC-2&Ct|^0.0||\015\012OBX|45|ST|MTB-RIF&QC Check|QC-2&EndPt|^0.0||\015\012SPM|1|TC 89599^||ORH|||||||P\015\012\003\004')