Skip to content

Commit 6608d13

Browse files
author
Bryan Worrell
committed
removed unnecessary code
1 parent 384ee52 commit 6608d13

File tree

2 files changed

+1
-148
lines changed

2 files changed

+1
-148
lines changed

stix/bindings/stix_core.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,6 @@
2121

2222
XML_NS = "http://stix.mitre.org/stix-1"
2323

24-
#
25-
#DEFAULT_XML_NS_MAP = {'http://stix.mitre.org/stix-1' : 'stix',
26-
# 'http://stix.mitre.org/common-1' : 'stixCommon',
27-
# 'http://stix.mitre.org/Incident-1' : 'incident',
28-
# 'http://stix.mitre.org/Indicator-2' : 'indicator',
29-
# 'http://stix.mitre.org/ExploitTarget-1' : 'et',
30-
# 'http://data-marking.mitre.org/Marking-1' : 'marking',
31-
# 'http://stix.mitre.org/CourseOfAction-1' : 'coa',
32-
# 'http://stix.mitre.org/Campaign-1' : 'campaign',
33-
# 'http://stix.mitre.org/ThreatActor-1' : 'ta',
34-
# 'http://stix.mitre.org/TTP-1' : 'ttp',
35-
# 'http://stix.mitre.org/extensions/Address#CIQAddress3.0-1' : 'ciqAddress',
36-
# 'http://stix.mitre.org/extensions/AP#CAPEC2.5-1' : 'capecInstance',
37-
# 'http://stix.mitre.org/extensions/Identity#CIQIdentity3.0-1': 'ciqIdentity',
38-
# 'http://stix.mitre.org/extensions/Malware#MAEC4.0-1' : 'maecInstance',
39-
# 'http://data-marking.mitre.org/extensions/MarkingStructure#Simple-1' : 'simpleMarking',
40-
# 'http://data-marking.mitre.org/extensions/MarkingStructure#TLP-1' : 'tlpMarking',
41-
# 'http://stix.mitre.org/extensions/StructuredCOA#Generic-1' : 'genericStructuredCOA',
42-
# 'http://stix.mitre.org/extensions/TestMechanism#Generic-1' : 'genericTM',
43-
# 'http://stix.mitre.org/extensions/TestMechanism#OpenIOC2010-1' : 'openiocTM',
44-
# 'http://stix.mitre.org/extensions/TestMechanism#OVAL5.10-1' : 'ovalTM',
45-
# 'http://stix.mitre.org/extensions/TestMechanism#Snort-1' : 'snortTM',
46-
# 'http://stix.mitre.org/extensions/TestMechanism#YARA-1' : 'yaraTM',
47-
# 'http://stix.mitre.org/extensions/Vulnerability#CVRF-1' : 'cvrfVuln',
48-
# 'http://cybox.mitre.org/cybox-2' : 'cybox',
49-
# 'http://cybox.mitre.org/common-2' : 'cyboxCommon',
50-
# 'http://www.w3.org/2001/XMLSchema-instance' : 'xsi'}
51-
5224
DEFAULT_XML_NS_MAP = { 'http://capec.mitre.org/capec-2': 'capec',
5325
'http://cpe.mitre.org/language/2.0': 'cpe',
5426
'http://cybox.mitre.org/common-2': 'cyboxCommon',

stix/core/stix_package.py

Lines changed: 1 addition & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -155,128 +155,9 @@ def from_xml(cls, xml_file):
155155
def to_xml(self):
156156
'''Overrides the stix.to_xml() method. Namespace definitions are hardcoded--this is only temporary'''
157157
s = StringIO()
158-
nsmap = dict(stix_core_binding.DEFAULT_XML_NS_MAP)
159-
160158
obj = self.to_obj()
161159
obj.export(s, 0, stix_core_binding.DEFAULT_XML_NS_MAP)
162-
163-
# self.to_obj().export(s, 0, name_="STIX_Package",
164-
# namespacedef_='xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\
165-
# xmlns:WinRegistryKeyObj="http://cybox.mitre.org/objects#WinRegistryKeyObject"\
166-
# xmlns:WinMutexObj="http://cybox.mitre.org/objects#WinMutexObject"\
167-
# xmlns:campaign="http://stix.mitre.org/Campaign"\
168-
# xmlns:PortObj="http://cybox.mitre.org/objects#PortObject"\
169-
# xmlns:CodeObj="http://cybox.mitre.org/objects#CodeObject"\
170-
# xmlns:UnixPipeObj="http://cybox.mitre.org/objects#UnixPipeObject"\
171-
# xmlns:ProcessObj="http://cybox.mitre.org/objects#ProcessObject"\
172-
# xmlns:xlink="http://www.w3.org/1999/xlink"\
173-
# xmlns:COA="http://stix.mitre.org/COA"\
174-
# xmlns:WinProcessObj="http://cybox.mitre.org/objects#WinProcessObject"\
175-
# xmlns:WinEventLogObj="http://cybox.mitre.org/objects#WinEventLogObject"\
176-
# xmlns:UserSessionObj="http://cybox.mitre.org/objects#UserSessionObject"\
177-
# xmlns:xs="http://www.w3.org/2001/XMLSchema"\
178-
# xmlns:LibraryObj="http://cybox.mitre.org/objects#LibraryObject"\
179-
# xmlns:sch="http://purl.oclc.org/dsdl/schematron"\
180-
# xmlns:WinSystemObj="http://cybox.mitre.org/XMLSchema/objects#WinSystemObject"\
181-
# xmlns:indicator="http://stix.mitre.org/Indicator"\
182-
# xmlns:DNSCacheObj="http://cybox.mitre.org/objects#DNSCacheObject"\
183-
# xmlns:maecBundle="http://maec.mitre.org/XMLSchema/maec-bundle-3"\
184-
# xmlns:AccountObj="http://cybox.mitre.org/objects#AccountObject"\
185-
# xmlns:ProductObj="http://cybox.mitre.org/objects#ProductObject"\
186-
# xmlns:stixCommon="http://stix.mitre.org/Common"\
187-
# xmlns:WinUserAccountObj="http://cybox.mitre.org/objects#WinUserAccountObject"\
188-
# xmlns:X509CertificateObj="http://cybox.mitre.org/objects#X509CertificateObject"\
189-
# xmlns:GUIDialogboxObj="http://cybox.mitre.org/objects#GUIDialogboxObject"\
190-
# xmlns:capec="http://capec.mitre.org/capec_v1"\
191-
# xmlns:Incident="http://stix.mitre.org/Incident"\
192-
# xmlns:WinServiceObj="http://cybox.mitre.org/objects#WinServiceObject"\
193-
# xmlns:xal="urn:oasis:names:tc:ciq:xal:3"\
194-
# xmlns:maecPackage="http://maec.mitre.org/XMLSchema/maec-package-1"\
195-
# xmlns:UnixVolumeObj="http://cybox.mitre.org/objects#UnixVolumeObject"\
196-
# xmlns:WinFileObj="http://cybox.mitre.org/objects#WinFileObject"\
197-
# xmlns:ExpTgt="http://stix.mitre.org/ExploitTarget"\
198-
# xmlns:a="urn:oasis:names:tc:ciq:xal:3"\
199-
# xmlns:xsd="http://www.w3.org/2001/XMLSchema"\
200-
# xmlns:WinEventObj="http://cybox.mitre.org/objects#WinEventObject"\
201-
# xmlns:WinKernelHookObj="http://cybox.mitre.org/objects#WinKernelHookObject"\
202-
# xmlns:UnixFileObj="http://cybox.mitre.org/objects#UnixFileObject"\
203-
# xmlns:VolumeObj="http://cybox.mitre.org/objects#VolumeObject"\
204-
# xmlns:cvrf-common="http://www.icasi.org/CVRF/schema/common/1.1"\
205-
# xmlns:dc="http://purl.org/dc/elements/1.1/"\
206-
# xmlns:APIObj="http://cybox.mitre.org/objects#APIObject"\
207-
# xmlns:x509CertificateObj="http://cybox.mitre.org/objects#X509CertificateObject"\
208-
# xmlns:EmailMessageObj="http://cybox.mitre.org/objects#EmailMessageObject"\
209-
# xmlns:DeviceObj="http://cybox.mitre.org/objects#DeviceObject"\
210-
# xmlns:WinSystemRestoreObj="http://cybox.mitre.org/objects#WinSystemRestoreObject"\
211-
# xmlns:ns1="http://cybox.mitre.org/objects#FileObject"\
212-
# xmlns:SystemObj="http://cybox.mitre.org/objects#SystemObject"\
213-
# xmlns:common="http://cybox.mitre.org/Common_v1"\
214-
# xmlns:NetworkConnectionObj="http://cybox.mitre.org/objects#NetworkConnectionObject"\
215-
# xmlns:WinComputerAccountObj="http://cybox.mitre.org/objects#WinComputerAccountObject"\
216-
# xmlns:WinThreadObj="http://cybox.mitre.org/objects#WinThreadObject"\
217-
# xmlns:WinExecutableFileObj="http://cybox.mitre.org/objects#WinExecutableFileObject"\
218-
# xmlns:WinMemoryPageRegionObj="http://cybox.mitre.org/objects#WinMemoryPageRegionObject"\
219-
# xmlns:WinKernelObj="http://cybox.mitre.org/objects#WinKernelObject"\
220-
# xmlns:iodef="urn:ietf:params:xml:ns:iodef-1.0"\
221-
# xmlns:WinNetworkRouteEntryObj="http://cybox.mitre.org/objects#WinNetworkRouteEntryObject"\
222-
# xmlns:WinPrefetchObj="http://cybox.mitre.org/objects#WinPrefetchObject"\
223-
# xmlns:n="urn:oasis:names:tc:ciq:xnl:3"\
224-
# xmlns:cvrf="http://www.icasi.org/CVRF/schema/cvrf/1.1"\
225-
# xmlns:SemaphoreObj="http://cybox.mitre.org/objects#SemaphoreObject"\
226-
# xmlns:ciq="urn:oasis:names:tc:ciq:xpil:3"\
227-
# xmlns:SocketObj="http://cybox.mitre.org/objects#SocketObject"\
228-
# xmlns:HTTPSessionObj="http://cybox.mitre.org/objects#HTTPSessionObject"\
229-
# xmlns:GUIObj="http://cybox.mitre.org/objects#GUIObject"\
230-
# xmlns:metadata="http://xml/metadataSharing.xsd"\
231-
# xmlns:WinCriticalSectionObj="http://cybox.mitre.org/objects#WinCriticalSectionObject"\
232-
# xmlns:DNSRecordObj="http://cybox.mitre.org/objects#DNSRecordObject"\
233-
# xmlns:UserAccountObj="http://cybox.mitre.org/objects#UserAccountObject"\
234-
# xmlns:WinNetworkShareObj="http://cybox.mitre.org/objects#WinNetworkShareObject"\
235-
# xmlns:cyboxCommon="http://cybox.mitre.org/Common_v1"\
236-
# xmlns:None="urn:oasis:names:tc:ciq:xpil:3"\
237-
# xmlns:aciq="urn:oasis:names:tc:ciq:xal:3"\
238-
# xmlns:WinWaitableTimerObj="http://cybox.mitre.org/objects#WinWaitableTimerObject"\
239-
# xmlns:vuln="http://www.icasi.org/CVRF/schema/vuln/1.1"\
240-
# xmlns:ct="urn:oasis:names:tc:ciq:ct:3"\
241-
# xmlns:DNSQueryObj="http://cybox.mitre.org/objects#DNSQueryObject"\
242-
# xmlns:FileObj="http://cybox.mitre.org/objects#FileObject"\
243-
# xmlns:WinVolumeObj="http://cybox.mitre.org/objects#WinVolumeObject"\
244-
# xmlns:PipeObj="http://cybox.mitre.org/objects#PipeObject"\
245-
# xmlns:AddressObj="http://cybox.mitre.org/objects#AddressObject"\
246-
# xmlns:ArtifactObj="http://cybox.mitre.org/objects#ArtifactObject"\
247-
# xmlns:marking="http://data-marking.mitre.org"\
248-
# xmlns:DiskObj="http://cybox.mitre.org/objects#DiskObject"\
249-
# xmlns:HandleObj="http://cybox.mitre.org/objects#HandleObject"\
250-
# xmlns:TTP="http://stix.mitre.org/TTP"\
251-
# xmlns:UnixProcessObj="http://cybox.mitre.org/objects#UnixProcessObject"\
252-
# xmlns:NetworkRouteObj="http://cybox.mitre.org/objects#NetworkRouteObject"\
253-
# xmlns:GUIWindowObj="http://cybox.mitre.org/objects#GUIWindowObject"\
254-
# xmlns:NetworkRouteEntryObj="http://cybox.mitre.org/objects#NetworkRouteEntryObject"\
255-
# xmlns:stix="http://stix.mitre.org"\
256-
# xmlns:prod="http://www.icasi.org/CVRF/schema/prod/1.1"\
257-
# xmlns:TA="http://stix.mitre.org/ThreatActor"\
258-
# xmlns:URIObj="http://cybox.mitre.org/objects#URIObject"\
259-
# xmlns:WinMailslotObj="http://cybox.mitre.org/objects#WinMailslotObject"\
260-
# xmlns:PacketObj="http://cybox.mitre.org/objects#PacketObject"\
261-
# xmlns:UnixNetworkRouteEntryObj="http://cybox.mitre.org/objects#UnixNetworkRouteEntryObject"\
262-
# xmlns:WinDriverObj="http://cybox.mitre.org/objects#WinDriverObject"\
263-
# xmlns:NetworkSubnetObj="http://cybox.mitre.org/objects#NetworkSubnetObject"\
264-
# xmlns:DiskPartitionObj="http://cybox.mitre.org/objects#DiskPartitionObject"\
265-
# xmlns:WhoisObj="http://cybox.mitre.org/objects#WhoisObject"\
266-
# xmlns:incident="http://stix.mitre.org/Incident"\
267-
# xmlns:Common="http://cybox.mitre.org/Common_v1"\
268-
# xmlns:UnixUserAccountObj="http://cybox.mitre.org/objects#UnixUserAccountObject"\
269-
# xmlns:NetFlowObj="http://cybox.mitre.org/objects#NetworkFlowObject"\
270-
# xmlns:MutexObj="http://cybox.mitre.org/objects#MutexObject"\
271-
# xmlns:MemoryObj="http://cybox.mitre.org/objects#MemoryObject"\
272-
# xmlns:WinHandleObj="http://cybox.mitre.org/objects#WinHandleObject"\
273-
# xmlns:WinTaskObj="http://cybox.mitre.org/objects#WinTaskObject"\
274-
# xmlns:LinuxPackageObj="http://cybox.mitre.org/objects#LinuxPackageObject"\
275-
# xmlns:maecContainer="http://maec.mitre.org/XMLSchema/maec-container-1"\
276-
# xmlns:cybox="http://cybox.mitre.org/cybox_v1"\
277-
# xmlns:WinSemaphoreObj="http://cybox.mitre.org/objects#WinSemaphoreObject"\
278-
# xmlns:WinPipeObj="http://cybox.mitre.org/objects#WinPipeObject"\
279-
# xmlns:xnl="urn:oasis:names:tc:ciq:xnl:3"')
160+
280161
return s.getvalue()
281162

282163

0 commit comments

Comments
 (0)