Client API Reference
SightHouseAnalysis
SightHouseAnalysis(url: str, username: str, password: str, logger: LoggingSighthouse, verify_host: bool = True, force_submission: bool = False, options: AnalysisOptions = None)
Parameters:
-
(urlstr) –URL of Sighthouse server
-
(usernamestr) –username to connect to server
-
(passwordstr) –password to connect to server
-
(loggerLoggingSighthouse) –A Sighthouse Logging linked to SRE
-
(verify_hostbool, default:True) –Option to enable or disable certificate verification
-
(force_submissionbool, default:False) –Delete cached information on the server side if any before starting a new analysis
-
(optionsAnalysisOptions | None, default:None) –Options for the analysis
Methods:
-
add_tag–Add a tag on the SRE
-
get_current_arch–get current architecture and translate to ghidra one
-
get_current_binary–Retrieve the current binaries in bytes
-
get_functions–get functions
-
get_hash_program–get hash of program
-
get_program_name–Get program name
-
get_sections–Get sections
-
run–Run the complete analysis
-
update_progress–show an update progress
-
wait–Some analyzers will need to handle sleeping differently.
Source code in sighthouse/client/SightHouseClient.py
733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 | |
add_tag
Add a tag on the SRE
Parameters:
-
(addressint) –address where put the tag
-
(tagstr) –tag of message
-
(messagestr) –message to show
Source code in sighthouse/client/SightHouseClient.py
787 788 789 790 791 792 793 794 795 | |
get_current_arch
get_current_arch() -> None
get current architecture and translate to ghidra one
Source code in sighthouse/client/SightHouseClient.py
767 768 769 | |
get_current_binary
get_current_binary() -> bytes
Retrieve the current binaries in bytes
Returns:
-
bytes(bytes) –the content in bytes of the current binaries
Source code in sighthouse/client/SightHouseClient.py
779 780 781 782 783 784 785 | |
get_functions
get functions
Parameters:
-
(sectionSection) –section
Returns:
-
List[Function]–List[Function]: list of function inside the section
Source code in sighthouse/client/SightHouseClient.py
813 814 815 816 817 818 819 820 821 822 | |
get_hash_program
get_hash_program() -> str
get hash of program
Returns:
-
str(str) –sha256 string
Source code in sighthouse/client/SightHouseClient.py
824 825 826 827 828 829 830 | |
get_program_name
get_program_name() -> str
Get program name
Returns:
-
str(str) –the program name
Source code in sighthouse/client/SightHouseClient.py
797 798 799 800 801 802 803 | |
get_sections
get_sections() -> List[Section]
Get sections
Returns:
-
List[Section]–List[Section]: list sections
Source code in sighthouse/client/SightHouseClient.py
805 806 807 808 809 810 811 | |
run
run() -> bool
Run the complete analysis
Source code in sighthouse/client/SightHouseClient.py
841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 | |
update_progress
update_progress(message: str) -> None
show an update progress
Parameters:
-
(messagestr) –message to show
Source code in sighthouse/client/SightHouseClient.py
771 772 773 774 775 776 777 | |
wait
wait(seconds: int = 10) -> None
Some analyzers will need to handle sleeping differently. The default implementation rely on time.sleep.
Parameters:
-
(secondsint, default:10) –The number of seconds to wait for
Source code in sighthouse/client/SightHouseClient.py
832 833 834 835 836 837 838 839 | |
Section
Section(name: str, start: int, end: int, fileoffset: int, perms: str, kind: str, id: int = -1)
Bases: object
Manipulate Section object
-
For Developers
API Reference
Client API Reference
SightHouseAnalysisget_sections
-
For Developers
API Reference
Client API Reference
SightHouseAnalysisget_functions
Source code in sighthouse/client/SightHouseClient.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
Function
Function(name: str, offset: int, details: dict = None)
Bases: object
Manipulate Function object
-
For Developers
API Reference
Client API Reference
SightHouseAnalysisget_functions
Source code in sighthouse/client/SightHouseClient.py
85 86 87 88 89 90 | |
Match
Match(executable: str, function: str, score: float, nb_match: int)
Bases: object
Show match
-
For Developers
API Reference
Client API Reference
Signature
Source code in sighthouse/client/SightHouseClient.py
38 39 40 41 42 43 44 45 46 47 48 | |
Signature
Signature(function: str, address: int, matches: list[Match])
Bases: object
show signature
Source code in sighthouse/client/SightHouseClient.py
96 97 98 99 | |
LoggingSighthouse
LoggingSighthouse()
Bases: object
Initialize logging class
-
For Developers
API Reference
Client API Reference
SightHouseAnalysis
Methods:
Source code in sighthouse/client/SightHouseClient.py
702 703 704 | |
error
error(message: str)
Show an error message
Parameters:
-
(messagestr) –The message to show
Source code in sighthouse/client/SightHouseClient.py
706 707 708 709 710 711 712 | |
info
info(message: str)
Show an info message
Parameters:
-
(messagestr) –The message to show
Source code in sighthouse/client/SightHouseClient.py
722 723 724 725 726 727 728 | |
warning
warning(message: str)
Show an warning message
Parameters:
-
(messagestr) –The message to show
Source code in sighthouse/client/SightHouseClient.py
714 715 716 717 718 719 720 | |