Commit 95d3813 1 parent 15f1ba3 commit 95d3813 Copy full SHA for 95d3813
File tree 3 files changed +14
-5
lines changed
3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 1
1
[project ]
2
2
name = " vagd"
3
- version = " 1.4.4 "
3
+ version = " 1.4.5 "
4
4
authors = [{ name = " 0x6fe1be2" }]
5
5
description = " VirtuAlization GDb integrations in pwntools"
6
6
readme = " README.md"
Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ def template(
119
119
local : Optional [bool ] = typer .Option (
120
120
False , "--local" , help = "create local template"
121
121
),
122
+ ataka : Optional [bool ] = typer .Option (
123
+ False , "--ataka" , help = "create an ataka compatible template"
124
+ ),
122
125
):
123
126
"""
124
127
creates a template
@@ -189,16 +192,20 @@ def template(
189
192
190
193
template = "" .join (templateChunks ).format (
191
194
"{}" ,
195
+ dependencies = ", " .join (dependencies ),
192
196
aliases = aliases ,
193
197
binary = binary ,
194
198
ip = ip ,
195
199
port = str (port ),
196
200
env = env ,
201
+ ataka_env = "# ataka envs\n IP = os.getenv('TARGET_IP', IP)\n EXTRA = json.loads(os.getenv('TARGET_EXTRA', '[]'))"
202
+ if ataka
203
+ else "" ,
204
+ vms = ("\n " + " " * 4 ).join (vms ),
197
205
libc = libc ,
198
206
aslr = aslr ,
199
207
is_local = True if local else "args.LOCAL" ,
200
- dependencies = ", " .join (dependencies ),
201
- vms = ("\n " + " " * 4 ).join (vms ),
208
+ is_ataka = " or os.getenv('TARGET_IP')" if ataka else "" ,
202
209
)
203
210
204
211
if output_exploit :
Original file line number Diff line number Diff line change 15
15
context .binary = exe = ELF (BINARY , checksec = False )
16
16
context .aslr = {aslr }
17
17
18
+ {ataka_env }
19
+
18
20
{aliases }
19
21
20
22
def setup ():
21
23
global vm
22
- if args .REMOTE or {is_local }:
24
+ if args .REMOTE or {is_local }{ is_ataka } :
23
25
return
24
26
25
27
try :
@@ -34,7 +36,7 @@ def setup():
34
36
35
37
vm = None
36
38
def get_target (** kw ) -> tubes .tube :
37
- if args .REMOTE :
39
+ if args .REMOTE { is_ataka } :
38
40
# context.log_level = 'debug'
39
41
return remote (IP , PORT )
40
42
You can’t perform that action at this time.
0 commit comments