text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>ions.Generic
open B2R2
/// Represents symbolic memory indexed by concrete addresses.
type SymbMemory(mem: IDictionary<Addr, SymbExpr>) =
let mem = Dictionary<Addr, SymbExpr>(mem)
new() = SymbMemory(Dictionary<_, _>() :> IDictionary<Addr, SymbExpr>)
interface ISymbMemory with
member _.ByteRea... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>rs: (RegisterID * SymbExpr)[]) =
this.PC <- pc
registers |> Array.iter (fun (rid, value) -> this.SetReg(rid, value))
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obt... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab<|fim_suffix|>.TryGet k =
match vars.TryGetValue k with
| true, v -> Ok v
| false, _ -> Error ErrorCase.InvalidRegister
member _.Get k = vars[k]
member _.Set(k, v) = vars[k] <- v
member _.Unset k = vars.Rem... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*)
namespace B2R2.RearEnd.BinDisasm
open B2R2.FrontEnd
open B2R2.FrontEnd.BinFile
///// Represents an interface f... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>asCode sec then dumpOneSection codeprn name ptr
elif (opts: BinDisasmOpts).OnlyDisasm then dumpOneSection codeprn name ptr
else dumpData hdl opts ptr name
let private dumpOneSectionOfName (hdl: BinHandle) opts codeprn tableprn name =
match hdl.File with
| :? ELFBinFile as elf ->
elf.TryFindSe... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> >>= getCallGraph
let private getInternalFunctions (brew: BinaryBrew<_, _>) =
brew.Functions.Sequence
|> Seq.filter (fun fn -> not fn.IsExternal)
|> Seq.sortBy (fun fn -> fn.EntryPoint)
|> Seq.toArray
|> Ok
let private getExternalFunctions (brew: BinaryBrew<_, _>) =
brew.F... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>th
| true, brew -> currentBinary <- brew; Some brew
| false, _ -> None
and IBrewLoadable<'FnCtx, 'GlCtx when 'FnCtx :> IResettable
and 'FnCtx: (new: unit -> 'FnCtx)
and 'GlCtx: (new: unit -> 'GlCtx)> =
abstract ... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the <|fim_suffix|>ut candidates
| _ ->
let count = s... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>or e ->
ICmd.buildErrorOutput e
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"),... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>extra =
"Print <cnt> disassembled instructions starting from the given\n\
address. When the <cnt> argument is not given, it will print one\n\
instruction."
ColoredString()
.Append(NoColor, "Usage: ")
.Append(DarkCyan, $"{CmdName}")
.Append(NoColor, "... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>args, arbiter.GetBinaryBrew() with
| "functions" :: _, Ok brew
| "funcs" :: _, Ok brew ->
listFunctions brew
|> Array.map OutputNormal
| "segments" :: _, Ok brew
| "segs" :: _, Ok brew ->
listSegments brew.BinHandle
|> Array.map OutputNormal
| ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>ColoredString()
.Append(NoColor, "Usage: ")
.Append(DarkCyan, $"{CmdName}")
.Append(NoColor, " <cmd> [options]\n\n")
.Append(NoColor, $"{Desc}\n\n{extra}")
member _.SubCommands = []
member this.CallBack(arbiter, args) =
match arbiter.GetBinaryBrew() with
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*)
[<AutoOpen>]
module internal B2R2.RearEnd.BinExplore.Config
let encoding = System.Text.Encoding.UTF8
let [<Literal>] DefaultPrompt = "B2R2> "
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec L... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>ant.Dark
else
this.RequestedThemeVariant <- Styling.ThemeVariant.Light
override this.OnFrameworkInitializationCompleted() =
match this.ApplicationLifetime with
| :? IClassicDesktopStyleApplicationLifetime as desktopLifetime ->
desktopLifetime.MainWindow <- MainWindow(arbiter, us... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Gene<|fim_suffix|>e following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMI... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>Row = 16
AddressDigits = numDigits
IsSelecting = false
HoveredByte = None
ScrollGuard = NoScrollGuard }
[<RequireQualifiedAccess>]
module HexDocument =
let ofBytes baseAddress (bytes: byte[]) =
{ BaseAddress = baseAddress
Length = bytes.LongLength
Bytes = bytes }... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>iven
/// address, and false otherwise.
abstract IsAddressInFunction: fnAddr: Addr * queryAddr: Addr -> bool
/// Returns the name of the section containing the given address, if any.
abstract TryGetSectionName: Addr -> string option<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>ay<float> items.Count
let tops = ResizeArray<float> items.Count
let mutable top = 0.0
for i = 0 to items.Count - 1 do
let itemHeight = measureItemHeight defaultItemHeight items[i]
tops.Add top
heights.Add itemHeight
top <- top + itemHeight
{ ItemHeights = heights
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>gePolylines: Point[][]
NodeRects: Rect[] }
[<RequireQualifiedAccess>]
module MinimapStaticCache =
let [<Literal>] private MaxSize = 220.0
let private computeDimension viewportWidth viewportHeight gWidth gHeight =
let referenceWidth = max gWidth viewportWidth |> max 1.0
let referenceHeigh... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation fi<|fim_suffix|> | SetSyncEnabled of bool
/// Message to update the status ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>eID -> Pane.tryFindLeaf paneID model.RootPane
| None -> None
let getFocusedPaneOrDefault model =
match tryGetFocusedPane model with
| Some pane -> pane
| None ->
match tryFindFirstLeaf model.RootPane with
| Some(_, pane) -> pane
| None -> failwith "No leaf pane exists ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>
let rec tryFindLeafByTabID tabID = function
| Leaf(id, state) ->
let visibleTabs =
match state.PreviewTab with
| Some preview -> preview :: state.OpenTabs
| None -> state.OpenTabs
if visibleTabs |> List.exists (fun tab -> tab.ID = tabID) then Some id
else ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> THE
SOFTWARE.
*)
namespace B2R2.RearEnd.BinExplore.GUI
/// Represents the state of the status bar in the main view.
type StatusBarState =
| EmptyStatus
| MessageOnly of msg: string
| FileLoaded of path: string * fmt: string
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Cop... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (t<|fim_suffix|>t, which can be not loaded,
/// currently loading, or f... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> | Custom themeId ->
customThemes |> Map.tryFind themeId |> Option.defaultValue defaultTheme
let modeName = function
| Builtin Dark -> "Dark"
| Builtin Light -> "Light"
| Custom(ThemeId id) -> id
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>sents builtin theme presets.
and BuiltinTheme =
| Dark
| Light<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentati... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>erty =
AvaloniaProperty.Register<HexdumpRenderLayer, HexdumpState option>(
nameof Unchecked.defaultof<HexdumpRenderLayer>.CurrentState, None
)
static let themeProperty =
AvaloniaProperty.Register<HexdumpRenderLayer, Theme>(
nameof Unchecked.defaultof<HexdumpRenderLayer>.CurrentT... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and<|fim_suffix|> fontFamily, fontSize, foreground, secondary =
ensureCacheSignature state theme
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>dispatch
StatusBar.view model
mainArea tokenContextProvider model dispatch
]
]
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this soft... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> match (e: KeyEventArgs).Key with
| Key.Escape ->
clearSearch model dispatch localState
| Key.Down when count > 0 ->
let newIdx = min (localState.SelectedIdx.Current + 1) (count - 1)
localState.SelectedIdx.Set newIdx
scrollToItem localState newIdx
e.Handled <- true
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>e
files
|> Seq.tryHead
|> Option.map (fun f -> f.Path.LocalPath)
let private onDragOver (e: DragEventArgs) =
e.DragEffects <-
if e.DataTransfer.Contains DataFormat.File then DragDropEffects.Copy
else DragDropEffects.None
e.Handled <- true
let private onDrop dispatch (e: DragEvent... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>yParse parts[0] with
| true, paneID -> Some(paneID, parts[1])
| _ -> None
let private getVisibleTabs pane =
match pane.PreviewTab with
| Some preview -> preview :: pane.OpenTabs
| None -> pane.OpenTabs
let private onTabClick paneID tabID dispatch (e: PointerPressedEventArgs) =
if ori... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>y}"
None
let readIfExists path =
if File.Exists path then Some(File.ReadAllBytes(path))
else None
let handleWebRequest (req: HttpListenerRequest) resp arbiter =
match req.Url.LocalPath.Remove(0, 1) with (* Remove the first '/' *)
| "api/" ->
invokeAPI req arbiter
|> answer resp
| _... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and assoc<|fim_suffix|>resents a command that can be invoked within BinExplore's CLI.
type ICmd =
/// Th... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
<|fim_suffix|>NGS IN THE
SOFTWARE.
*)
namespace B2R2.RearEnd.BinQL
/// Represents a function that can be applied to arguments.
type IFunctionApplicable =
/// Applies the function to the given list of arguments.
abstract Apply: (bigint * NumberType * int) list
-> Result<bigint * NumberT... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ <|fim_suffix|>luding without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, su... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>o.TestTools.UnitTesting
open B2R2.RearEnd.BinQL
[<TestClass>]
type ASTTests() =
let parser = Parser()
let (<=>) str (expected: string) =
match parser.Run str with
| Ok e ->
Assert.AreEqual<string>(expected, Expr.ToString e)
| Error e ->
System.Console.WriteLine $"{e}"
A... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|><| parser.Run "0x1020304"
[<TestMethod>]
member _.``Binary number parsing tests``() =
testNum Bin [| 0x5uy |] <| parser.Run "0b0101"
testNum Bin [| 0x5fuy |] <| parser.Run "0b01011111"
testNum Bin [| 0x44uy; 0x43uy; 0x42uy; 0x41uy |]
<| parser.Run "0b01000001010000100100001101000100"
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>/ ELF-specific item.
| DisplayELF of ELFDisplayItem
/// PE-specific item.
| DisplayPE of PEDisplayItem
/// Mach-specific item.
| DisplayMach of MachDisplayItem
/// Display items for ELF.
and ELFDisplayItem =
| ELFProgHeader
| ELFPLT
| ELFEHFrame
| ELFGccExceptTbl
| ELFNotes
| ELFDeb... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>tils =
/// Raises an exception when accessing a wrong file format.
let badAccess _ _ =
raise InvalidFileFormatException
let normalizeEmpty s =
if System.String.IsNullOrEmpty s then "(n/a)" else s
let toNBytes (v: uint64) =
v.ToString() + " bytes"
let columnWidthOfAddr (file: IBinF... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> ldinfo.RebaseSize.ToString() |]
printsr [| "BindOff:"; ldinfo.BindOff.ToString() |]
printsr [| "BindSize:"; ldinfo.BindSize.ToString() |]
printsr [| "WeakBindOff:"; ldinfo.WeakBindOff.ToString() |]
printsr [| "WeakBindSize:"; ldinfo.WeakBindSize.ToString() |]
printsr [| "LazyBindOff:"; ldinfo.L... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>| makeSectionHeadersTableHeaderVerbose ()
printSingleHorizontalRule ()
for i in 0 .. pe.SectionHeaders.Length - 1 do
let s = pe.SectionHeaders[i]
let startAddr = pe.BaseAddress + uint64 s.VirtualAddress
let size = uint64 (selectSize s)
let characteristics = uint64 s.SectionCharacterist... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> MachViewer.dumpFunctions
let private dumpExceptionTable hdl (file: IBinFile) =
dumpSpecific hdl file "Exception Table"
ELFViewer.dumpExceptionTable
PEViewer.dumpExceptionTable
MachViewer.dumpExceptionTable
let private dumpDynamicSection (opts: BinScanOpts) (file: IBinFile) =
dumpSpec... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission<|fim_suffix|>Color, " (a.k.a. bindisasm)")
printsn """
This is a linear-sweep disassembler similar to objdump, although
this app is more powerful and versatile. To learn more about the
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> |> ROPPayload.mergeAny p1
| None -> None
let private shellWithSystem rop =
match tryFindPlt rop "system", getOrWriteStr rop "sh" with
| Some e, Some(p1, shAddr) ->
[| ROPExpr.ofUInt32 shAddr |]
|> funCall rop (ROPExpr.ofUInt32 e.TableAddress)
|> ROPPayload.mergeAny p1
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>(Set.add cur falseSet, acc)
let pickAll chooser gadgets =
Array.fold (pickHelper chooser) (Set.empty, []) gadgets |> snd
let sort gadgets =
Array.map snd gadgets |> Array.sortBy (fun g -> List.length g.Instrs)
let tryFind = Array.tryFind
<|fim_prefix|>(*
B2R2 - the Next-Generation Rever... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>ent.NewLine)
sb.ToString()
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
... | fim | B2R2-org/B2R2 | fsharp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.