Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3998915
test1.xreate
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 9, 1:01 AM
Size
868 B
Mime Type
text/plain
Expires
Sat, Jul 11, 1:01 AM (1 d, 8 h)
Engine
blob
Format
Raw Data
Handle
272888
Attached To
rXR Xreate
test1.xreate
View Options
interface(extern-c){
xml2 = library:: pkgconfig("libxml-2.0").
include {
xml2 = ["scripts/exploitation/test1.h"]
}.
}
import raw ("scripts/exploitation/exploitation.lp").
import raw ("scripts/exploitation/test1.assembly.lp").
guard:: explInitRealImpl {
openFile = function(filePrev:: FILE_P):: FILE_P {
fopen("/tmp/test", "w")::FILE_P
}
}
guard:: explInitBogusImpl {
openFile = function(filePrev:: FILE_P):: FILE_P {
filePrev::int
}
}
test = function::int; entry {
seq
{ f0 = undef:: FILE_P. f0 }
{ f1 = openFile(f0):: FILE_P; expl_init(r1). f1 /*first attempt to open file*/}
{ f2 = openFile(f1):: FILE_P; expl_init(r1). f2 /*second attempt to open file*/}
{ sizeWritten = fwrite("WriteAttempt", 12, 1, f2):: int; expl_user(r1). sizeWritten }
{ fclose(f2)::int; expl_use(r1)}
{ sizeWritten :: int}
}
Event Timeline
Log In to Comment