Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I want to install hyperion 2.2 on kali linux. This version of hyperion is different than previous: there is no .cpp files (now hyperion is C). So command
'i686-w64-mingw32-c++ Hyperion-1.2/Src/Crypter/*.cpp -o hyperion.exe'
doesn't work.
I've also tried:
mingw32-make
bash: mingw32-make: command not found
Please, help.
The following command worked for me to compile with no warnings or errors. Although I have not fully tested the resulting executable yet:
i686-w64-mingw32-gcc -ISrc/Payloads/Aes/c Src/Crypter/*.c Src/Payloads/Aes/c/*.c -o hyperion.exe
Running the file command on the resulting hyperion.exe gives:
hyperion.exe: PE32 executable (console) Intel 80386, for MS Windows
i686-w64-mingw32-gcc -I Hyperion-2.3.1/Src/Payloads/Aes/c Hyperion-2.3.1/Src/Crypter/.c Hyperion-2.3.1/Src/Payloads/Aes/c/.c -o hyperion.exe
this command works for kali 2020.3 mingw-w64 V.8 and Hyperion-2.3.1
make sure to separate -I from Hyperion-2.3.1 and make sure to include full file path i.e. Hyperion-2.3.1/Src/Payloads/Aes/c/
I am the author of Hyperion. Hyperion is a Windows application and I am not very familiar with cross compiling issues on Kali Linux. Nevertheless, I can give you two hints to point you into the right direction:
If you want to use the makefile: mingw32-make: command not found means, mingw32-make is not installed. You have to use apt to install it. Something like sudo apt-get install gcc-mingw-w64 or apt install mingw-w64 should solve the issue. You can also use apt search mingw to find the corresponding package.
If you want to build it by calling the compiler yourself: The AES dll was replaced by TinyAES. It can be found here: Src/Payloads/Aes/c/aes.c. So you have to add it to your source path as well.
Kind regards,
Christian
hyperion 2.2 and 2.3 has a makefile, I change compiler gcc to i686-w64-ming32-gcc, and modify CFLAGS, it can compile.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I'm writing a program about transparent proxy with Go, but syscall.SetsockoptInt(int(s), syscall.SOL_IP, syscall.IP_TRANSPARENT, 1)is only supported on amd64/linux (Other versions don't have constant syscall.SOL_IP and syscall.IP_TRANSPARENT).
So even if I run a parallel VM (arm64/linux) on M1, I still could not build my program successfully. Is there any way to solve it?
I'm not sure what's the essense of the question. IP_TRANSPARENT is specific to Linux (an OS kernel), so any code which makes use of it must run on Linux. Debugging (a running process) also must happen on Linux—for, I hope, reasons now obvious.
But that does not affect building: when building on Linux, that should work if your version of Go has IP_TRANSPARENT defined in its syscall package.
This means:
Running the program built for linux/amd64 making use of syscall.IP_TRANSPARENT on the VM with a Linux guest should work.
Building that program from the source code on the VM with a Linux guest should work.
But "plain" building on a non-native platform (which is darwin/arm64 in our case, if I understand correctly) will not work, and this might be the source of your confusion.
Basically, when you're building the source code on darwin/arm64, the compiler locates, reads and interprets all the sources expecting to produce an executable image file suitable for the platform it's working on; the syscall package, being highly OS-dependent, can be though of as being different for different GOOS/GOARCH combos.
Its "version" for darwin/arm64 simply cannot contain the symbol IP_TRANSPARENT because the darwin kernel does not "know" about it.
So, if your issue is merely building for linux/amd64 while working on darwin/arm64, the answer is cross-compilation.
With Go, it's done by making the toolchain see explicit settings for the GOOS and/or GOARCH environment variables—different from the assumed defaults.
In your case you could just do
$ GOOS=linux GOARCH=amd64 go build
and it will produce an executable image file ready for linux/amd64, and when processing the source code, the compiler will use the definitions for the target platform, not the platform it's running on.
You can then copy (or make availabe by other means) the produced executable image file to the guest's filesystem and run it there—it should work just fine.
You can make such changes "permanent" for the current Termial session by doing
$ export GOOS=linux
$ export GOARCH=amd64
TL;DR
To build for a non-native platform, use cross-compiling; you do not need any sort of VM.
Or you can build "natively" but then you need to install go into the guest running on a VM, and make the project's source code available there.
To run an executable for a non-native system you must use a VM (or some sort of emulator).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm in the process of porting all of our code to Apple M1 (ARM), and some of our products use FFmpeg.
Are there any library packages by FFmpeg that are built for the Apple Silicon M1, and where can I find them?
You can compile ffmpeg for Apple Silicon by yourself.
For this you will need Xcode, which comes with all the necessary tools.
You can download Xcode from the App Store, from Apple's website, or install the Xcode command line tools running xcode-select --install on the Terminal app.
After getting Xcode, you need to open it once to accept the terms and set up everything. You will be asked for your computer password.
After setting up Xcode, execute the following commands in that order, on the Terminal app, as a normal user (root is not necessary and not recommended). Lines beginning with # are comments and you should not execute them on the terminal.
# Create and go to a folder where you'll save the ffmpeg source code
mkdir -p /opt/local/src
cd /opt/local/src
# get the ffmpeg source code from the official source
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
# set up build and begin to compile
./configure --prefix=/opt/local
make
make install
# check that your compiled version of ffmpeg has arm64 (Apple Silicon) architecture
/opt/local/bin/ffmpeg -version
Looks like there's a working script and a built version now available at https://www.osxexperts.net
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I am developing a tool using the clang library on Linux and I would like to port this tool to Windows.
On Linux, I can install Clang from the LLVM repositories using apt-get clang-6.0-dev and simply link my tool with -lclang. I do not need to compile LLVM and Clang myself.
Is there a way to do something similar on Windows, or do I need to compile the Clang library myself?
All of the Clang-related posts I could find are about using clang as a tool, not as a library.
I have installed the pre-build executables for Clang and LLVM from the LLVM website, and these work nicely in combination with mingw. However, the download for Windows does not seem to include the Clang library as a separate file (DLL), and linking with -lclang results in a linker error.
If there is no pre-built library for Windows, what is the best way to proceed, preferably using mingw and not MSVC?
There are pre-built LLVM/clang binaries on Zig's github page:
https://github.com/ziglang/zig/wiki/Building-Zig-on-Windows
You can find libclang.dll in the bin folder.
The currently available versions are:
llvm+clang-6.0.0-win64-msvc-release.tar.xz
llvm+clang-7.0.0-win64-msvc-release.tar.xz
llvm+clang-8.0.0-win64-msvc-release.tar.xz
llvm+clang-9.0.0-win64-msvc-release.tar.xz
llvm+clang+lld-10.0.0-x86_64-windows-msvc-release-mt.tar.xz
There are also detailed build instructions, here.
For anyone coming to this question that's just looking to install libclang on their system, the choco llvm package appears to install libclang correctly. I can't speak to whether this is adequate for actually linking against this library for C/C++, but it worked for my case.
Just run this in an elevated command prompt or powershell:
choco install llvm
You may need to run refreshenv or open a new console for tools to pick this up.
In my case, and to help with future googlers (since I couldn't find a simple answer elsewhere) my issue was specifically while trying to compile a Rust project that made use of the onig_sys crate:
Compiling onig_sys v69.2.0
error: failed to run custom build command for `onig_sys v69.2.0`
Caused by:
process didn't exit successfully: `[redacted]\target\debug\build\onig_sys-b53394f57ee5e2c5\build-script-build` (exit code: 101)
--- stdout
cargo:warning=couldn't execute `llvm-config --prefix` (error: The system cannot find the file specified. (os error 2))
cargo:warning=set the LLVM_CONFIG_PATH environment variable to a valid `llvm-config` executable
--- stderr
thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any valid shared libraries matching: [\'clang.dll\', \'libclang.dll\'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', src\libcore\result.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
After installing llvm, the cargo build finished successfully
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I have downloaded Websphere Application Server Network Deployment trial version as a http download in 3 parts. After unzipping those files I am clueless about its installation.
What are steps to install it on Windows 7 64bit machine?
If there is any link which explains these steps, please let me know. I am tired of googling it but unable to find any clean explanation of installation steps.
Starting with WAS 8.0, WAS is installed with another program called IBM Installation Manager. The three files you downloaded are collectively a WAS ND "repository". The high level steps are the following.
Download WAS ND (you've done this).
Unzip the three files, creating disk1, disk2, etc. This is your repository.
Download IM.
Install IM.
Run IM.
Add your WAS ND repository to IM's set of repositories.
Install ND.
You can re-use the IM to apply fix packs, install other WebSphere related products, and remove these products.
The product documentation (infocenter) will tell you how to install it. - http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.nd.multiplatform.doc/ae/welc6productov.html
Though its an old thread but sometimes the IM gives lot of troubles for installing fix packs. So here is an alternative solution using command line that's pretty simple and to the point
Download the fix packs [eg: part1, part2].
Extract the packs in a single folder fix_packXX.
Go to <%WEBSHERE_HOME%>/AppServer/bin and check the version details of the WAS by running following command in CMD:
versionInfo.bat
Mark the following details[Especially the Package of WAS]:
Build Date 5/14/13
Package com.ibm.websphere.DEVELOPERS.v85_8.5.5000.20130514_1044
Go to
Windows: C:\Program Files\IBM\Installation Manager\eclipse\tools
Linux: opt/IBM/InstallationManager/eclipse/tools/
Run below command in CMD/BASH [Change the directory as per your path]:
Windows: imcl listAvailablePackages -repositories "C:/fix_packXX/repository.config"
Linux: ./imcl listAvailablePackages -repositories /fix_packXX/repository.config
Choose the suitable Package [eg: DEVELOPERS in this case] to install by checking the type we noted in steps above. Run the command below with the new Package and let the package installation complete
imcl install com.ibm.websphere.DEVELOPERS.v85_8.5.5012.20170627_1018 -repositories "C:/fix_packXX/repository.config" -installationDirectory "<%WEBSHERE_HOME%>/AppServer" -acceptLicense -sP
Done.
Hope that helps someone who is struggling with IBM Installation Manager.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
What is the equivalent of Linux's ldd on Windows?
Here is Dependency Walker.
http://dependencywalker.com/
The dumpbin command can be useful for many things, although in this case dependency walker is probably a little more verbose.
dumpbin /dependents some.dll
Example output:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Team Tools\Static Analysis Tools>dumpbin /dependents StanPolicy.dll
Dump of file StanPolicy.dll
File Type: DLL
Image has the following dependencies:
mscoree.dll
Summary
2000 .reloc
2000 .rsrc
1E000 .text
or the GNU tool :
i586-mingw32msvc-objdump -p *.exe | grep 'DLL Name:'
If you're using wine and not real Windows, you can use WINEDEBUG=+loaddll wine <program>.
Newer versions of Git on Windows come packaged with something called Git BASH, which emulates many useful Unix commands including ldd.
It appears that it reports only libraries that can be found. So you can use this to get an overview of where the used libraries are located, but not which are missing.
There is now an ldd in Cygwin. If you have a very old Cygwin version, you will have to use cygcheck.
I guess the Windows Developer way to do this is to use dumpbin /dependents source.exe. If you have Visual Studio installed you can find it here: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\dumpbin.exe.
For Windows 10 you can use Dependencies - An open-source modern Dependency Walker
https://github.com/lucasg/Dependencies
For windows 10, with visual studio 2017, I go in the search bar of windows and type:
"developer Command Prompt for VS 2017" ( a special cmd.exe for Visual studio developer)
This allows to get access to DUMPBIN that should be used with the /IMPORTS tag. For example, in the correct directory:
DUMPBIN /IMPORTS yourfile.exe (others extension may work too)
For me, this list the DLL and the functions used.
Alternatively, you can use the tag \ALL that is much more verbose.
see the microsoft explanation of DUMPBIN:
https://learn.microsoft.com/en-us/cpp/build/reference/imports-dumpbin?view=vs-2019
Example ( with only a part) of the content sended back by the command
On Windows I use the cmder as terminal for most things (and not powershell/pwsh). For cmder you can simply type "ldd my_executable.exe" and you will see the expected output.
Link to download cmder: https://cmder.net/