forked from openwall/john
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: run regular procedures dom 22 dez 2024 14:45:45 -03
- Loading branch information
1 parent
f351721
commit a02c902
Showing
25 changed files
with
2,053 additions
and
657 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
############################################################################### | ||
# _ _ _ _ _____ _ | ||
# | | | | | | | | | __ \(_) | ||
# | | ___ | |__ _ __ | |_| |__ ___ | |__) |_ _ __ _ __ ___ _ __ | ||
# _ | |/ _ \| '_ \| '_ \ | __| '_ \ / _ \ | _ /| | '_ \| '_ \ / _ \ '__| | ||
# | |__| | (_) | | | | | | | | |_| | | | __/ | | \ \| | |_) | |_) | __/ | | ||
# \____/ \___/|_| |_|_| |_| \__|_| |_|\___| |_| \_\_| .__/| .__/ \___|_| | ||
# | | | | | ||
# |_| |_| | ||
# | ||
# Copyright (c) 2019 Claudio André <claudioandre.br at gmail.com> | ||
# | ||
# This program comes with ABSOLUTELY NO WARRANTY; express or implied. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, as expressed in version 2, seen at | ||
# http://www.gnu.org/licenses/gpl-2.0.html | ||
############################################################################### | ||
steps: | ||
- script: git config --global core.autocrlf false | ||
displayName: 'Fix Checkout' | ||
name: fixCheckout | ||
|
||
- checkout: self | ||
clean: false | ||
fetchDepth: 5 | ||
path: JtR | ||
|
||
# For a fast build run, uncomment #### | ||
# - script: | | ||
# cd $(Build.SourcesDirectory)\src | ||
# del *plug.c | ||
# ###################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
############################################################################### | ||
# _ _ _ _ _____ _ | ||
# | | | | | | | | | __ \(_) | ||
# | | ___ | |__ _ __ | |_| |__ ___ | |__) |_ _ __ _ __ ___ _ __ | ||
# _ | |/ _ \| '_ \| '_ \ | __| '_ \ / _ \ | _ /| | '_ \| '_ \ / _ \ '__| | ||
# | |__| | (_) | | | | | | | | |_| | | | __/ | | \ \| | |_) | |_) | __/ | | ||
# \____/ \___/|_| |_|_| |_| \__|_| |_|\___| |_| \_\_| .__/| .__/ \___|_| | ||
# | | | | | ||
# |_| |_| | ||
# | ||
# Copyright (c) 2019 Claudio André <claudioandre.br at gmail.com> | ||
# | ||
# This program comes with ABSOLUTELY NO WARRANTY; express or implied. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, as expressed in version 2, seen at | ||
# http://www.gnu.org/licenses/gpl-2.0.html | ||
############################################################################### | ||
steps: | ||
- bash: | | ||
.ci/tests-ci.sh $TARGET_ARCH BUILD | ||
displayName: 'Building JtR' | ||
- bash: | | ||
.ci/tests-ci.sh $TARGET_ARCH TEST | ||
displayName: 'Testing JtR' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
############################################################################### | ||
# _ _ _ _ _____ _ | ||
# | | | | | | | | | __ \(_) | ||
# | | ___ | |__ _ __ | |_| |__ ___ | |__) |_ _ __ _ __ ___ _ __ | ||
# _ | |/ _ \| '_ \| '_ \ | __| '_ \ / _ \ | _ /| | '_ \| '_ \ / _ \ '__| | ||
# | |__| | (_) | | | | | | | | |_| | | | __/ | | \ \| | |_) | |_) | __/ | | ||
# \____/ \___/|_| |_|_| |_| \__|_| |_|\___| |_| \_\_| .__/| .__/ \___|_| | ||
# | | | | | ||
# |_| |_| | ||
# | ||
# Copyright (c) 2019 Claudio André <claudioandre.br at gmail.com> | ||
# | ||
# This program comes with ABSOLUTELY NO WARRANTY; express or implied. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, as expressed in version 2, seen at | ||
# http://www.gnu.org/licenses/gpl-2.0.html | ||
############################################################################### | ||
steps: | ||
- template: linux-system-info.yml | ||
- template: linux-build-and-test-steps.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
############################################################################### | ||
# _ _ _ _ _____ _ | ||
# | | | | | | | | | __ \(_) | ||
# | | ___ | |__ _ __ | |_| |__ ___ | |__) |_ _ __ _ __ ___ _ __ | ||
# _ | |/ _ \| '_ \| '_ \ | __| '_ \ / _ \ | _ /| | '_ \| '_ \ / _ \ '__| | ||
# | |__| | (_) | | | | | | | | |_| | | | __/ | | \ \| | |_) | |_) | __/ | | ||
# \____/ \___/|_| |_|_| |_| \__|_| |_|\___| |_| \_\_| .__/| .__/ \___|_| | ||
# | | | | | ||
# |_| |_| | ||
# | ||
# Copyright (c) 2019 Claudio André <claudioandre.br at gmail.com> | ||
# | ||
# This program comes with ABSOLUTELY NO WARRANTY; express or implied. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, as expressed in version 2, seen at | ||
# http://www.gnu.org/licenses/gpl-2.0.html | ||
############################################################################### | ||
steps: | ||
- script: | | ||
wget https://raw.githubusercontent.com/openwall/john-packages/release/scripts/show_info.sh -O show_info.sh | ||
chmod a+x show_info.sh | ||
./show_info.sh | ||
displayName: 'System Information' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
############################################################################### | ||
# _ _ _ _ _____ _ | ||
# | | | | | | | | | __ \(_) | ||
# | | ___ | |__ _ __ | |_| |__ ___ | |__) |_ _ __ _ __ ___ _ __ | ||
# _ | |/ _ \| '_ \| '_ \ | __| '_ \ / _ \ | _ /| | '_ \| '_ \ / _ \ '__| | ||
# | |__| | (_) | | | | | | | | |_| | | | __/ | | \ \| | |_) | |_) | __/ | | ||
# \____/ \___/|_| |_|_| |_| \__|_| |_|\___| |_| \_\_| .__/| .__/ \___|_| | ||
# | | | | | ||
# |_| |_| | ||
# | ||
# Copyright (c) 2019 Claudio André <claudioandre.br at gmail.com> | ||
# | ||
# This program comes with ABSOLUTELY NO WARRANTY; express or implied. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, as expressed in version 2, seen at | ||
# http://www.gnu.org/licenses/gpl-2.0.html | ||
############################################################################### | ||
steps: | ||
- powershell: | | ||
# Setup image environment ############################################## | ||
$cygwinFolder = "C:\$env:cygwinPath" | ||
cd $env:BUILD_FOLDER | ||
git describe --dirty=+ --always | ||
echo '--------------------------------' | ||
# Windows 2012 does not have Chocolatey installed | ||
if ($env:SYSTEM_PHASENAME -eq "Windows_2012") { | ||
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | ||
choco install -y 7zip.install | ||
} | ||
# If needed (CygWin is not installed) or as a workaround (CygWin update is required) | ||
if ($env:Cygwin -eq "install") { | ||
choco install -y cygwin cyg-get | ||
cyg-get libssl-devel libbz2-devel libgmp-devel zlib-devel gcc-core libOpenCL-devel libcrypt-devel make wget rebase perl | ||
} | ||
# Powershell shell "Bash" run ########################################## | ||
$posixBuildFolder = $env:BUILD_FOLDER -Replace '\\', '/' | ||
function shell($command, $dieOnError = $true) { | ||
Write-Host "Executing '$command'" | ||
& "$cygwinFolder\bash" -lc ". /etc/profile && cd $posixBuildFolder && $command" | ||
if ($LASTEXITCODE -ne 0) { | ||
Write-Host "'$command' failed with exit code $LASTEXITCODE! " -ForegroundColor Red -NoNewline | ||
if ($dieOnError) { | ||
exit $LASTEXITCODE | ||
} | ||
} | ||
} | ||
# Apply patch(es) ###################################################### | ||
wget "https://raw.githubusercontent.com/openwall/john-packages/main/patches/Remove-peflags-from-the-default-target.patch" -O 0001.patch | ||
git apply 0001.patch | ||
# 1. Remove peflags from the default target on Windows | ||
# Build ################################################################ | ||
Write-Host "--------------------------------------------------------" | ||
Write-Host " ===== Building ===== " -ForegroundColor White | ||
Write-Host "--------------------------------------------------------" | ||
echo 'Compiler version' | ||
shell "gcc --version" | ||
echo '--------------------------------' | ||
shell "gcc -dM -E -x c /dev/null" | ||
echo '--------------------------------' | ||
# #### | ||
# Redirect strderr to stdout. | ||
# Otherwise it fails because of prints to stderr | ||
# + CategoryInfo : NotSpecified: (ar: creating aes.a:String) [], RemoteException | ||
# + FullyQualifiedErrorId : NativeCommandError | ||
# #### | ||
shell "./configure --enable-werror --disable-opencl --enable-simd=avx2 && make -s clean && make -sj2 2>&1 && make -s strip && mv ../run/john ../run/john-best" | ||
$EXE_NAME = "john-best.exe" | ||
# The "windows-package" make target depends on default, | ||
# - So it needs the john.exe I built above | ||
shell "cp ../run/$EXE_NAME ../run/john.exe" | ||
# Make this a Windows package | ||
shell "make -s windows-package" | ||
# Use symlink.c to produce a tiny john.exe that executes the best SIMD | ||
shell "make windows-tiny-link-to-john MAIN_NAME=$EXE_NAME " | ||
######################################################################## | ||
# I should strip the tiny john.exe at some time in the future | ||
# - But I can't call a make target that depends on default | ||
# - So, I can't run a make strip here | ||
######################################################################## | ||
# Required dlls (Tested on Windows 7 32 bits and Windows 10 64 bits) | ||
xcopy $cygwinFolder\cygwin1.dll ..\run\ | ||
xcopy $cygwinFolder\cygbz2-1.dll ..\run\ | ||
xcopy $cygwinFolder\cygcrypto-3.dll ..\run\ | ||
xcopy $cygwinFolder\cyggomp-1.dll ..\run\ | ||
xcopy $cygwinFolder\cyggmp-10.dll ..\run\ | ||
xcopy $cygwinFolder\cygz.dll ..\run\ | ||
xcopy $cygwinFolder\cygcrypt-2.dll ..\run\ | ||
xcopy $cygwinFolder\cygOpenCL-1.dll ..\run\ | ||
xcopy $cygwinFolder\cyggcc_s-seh-1.dll ..\run\ | ||
# Save CygWin Dlls | ||
mkdir ..\lib | ||
xcopy $cygwinFolder\*.dll ..\lib\ | ||
# The after_build ###################################################### | ||
cd $env:JTR_FOLDER\run | ||
# Build info | ||
./john --list=build-info | ||
displayName: 'Build JtR' | ||
# Clean up ################################################################# | ||
- script: | | ||
REM # Setup worker environment | ||
SET PATH=%PATH%;C:\ProgramData\chocolatey\bin | ||
cd $(Build.SourcesDirectory) | ||
REM # Save John the Ripper zip file | ||
if exist "%JTR_FOLDER%\run\john.exe" 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=128m -ms=on "win_x%bits%.7z" "%JTR_FOLDER%" | ||
move "win_x%bits%.7z" c:\ | ||
displayName: 'Clean Up the Package' | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
pathtoPublish: "c:\\win_x$(Bits).7z" | ||
artifactName: "tmp-win_x$(Bits).7z" |
Oops, something went wrong.