diff options
author | Emile <HanEmile@users.noreply.github.com> | 2023-04-10 20:20:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-10 20:20:12 +0200 |
commit | 3c59964278f427ca0eb5f96b77eb3e3c62a9aacd (patch) | |
tree | 38f5b6452818948ebd5d4f1798c734b229a2ad37 | |
parent | dcb608342f25af8dfdccdd7cee7a1689017717ec (diff) | |
parent | 7cc6f9372271cd6c19af5d8d3c8a459495f3e196 (diff) |
Merge pull request #2 from pesco/notsource
rename Source to Code
-rw-r--r-- | main.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main.go b/main.go index bccb022..2a742f7 100644 --- a/main.go +++ b/main.go @@ -46,8 +46,8 @@ type Bot struct { // Path defines the path to the source of the bot Path string - // Source defines the source of the bot after being compiled with rasm2 - Source string + // Code holds the assembled code of the bot as generated by rasm2 + Code string // Addr defines the initial address the bot is placed at Addr int @@ -164,9 +164,9 @@ func buildBot(i int, config *Config) { // rasm2 to compile the bot botPath := config.Bots[i].Path radareCommand := fmt.Sprintf("rasm2 -a %s -b %d -f %s", config.Arch, config.Bits, botPath) - botSource := r2cmd(r2p1, radareCommand) + botCode := r2cmd(r2p1, radareCommand) - config.Bots[i].Source = botSource + config.Bots[i].Code = botCode } // init initializes the arena @@ -312,7 +312,7 @@ func genRandomOffsets(config *Config) { // place the bot in the arena at the given address func placeBot(r2p *r2pipe.Pipe, bot Bot, address int) { - _ = r2cmd(r2p, fmt.Sprintf("wx %s @ %d", bot.Source, address)) + _ = r2cmd(r2p, fmt.Sprintf("wx %s @ %d", bot.Code, address)) } func placeBots(r2p *r2pipe.Pipe, config *Config) { |