Github messages for voidlinux
 help / color / mirror / Atom feed
From: yoshiyoshyosh <yoshiyoshyosh@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: stegseek-0.6
Date: Sun, 10 Sep 2023 22:26:01 +0200	[thread overview]
Message-ID: <20230910202601.umF10P9DE1kUY-yYVdyBFilscwcofu1FimTLNkbKj4A@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-45998@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 707 bytes --]

There is an updated pull request by yoshiyoshyosh against master on the void-packages repository

https://github.com/yoshiyoshyosh/void-packages stegseek
https://github.com/void-linux/void-packages/pull/45998

New package: stegseek-0.6
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64-glibc`)
- `x86_64-musl`
- `i686`


A patch file from https://github.com/void-linux/void-packages/pull/45998.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-stegseek-45998.patch --]
[-- Type: text/x-diff, Size: 4329 bytes --]

From ce8da4ed7e3f1db1b77e1e083f283312f814e95e Mon Sep 17 00:00:00 2001
From: yosh <yosh-git@riseup.net>
Date: Sat, 9 Sep 2023 16:25:38 -0400
Subject: [PATCH] New package: stegseek-0.6

---
 srcpkgs/stegseek/patches/portable-types.patch | 74 +++++++++++++++++++
 srcpkgs/stegseek/template                     | 12 +++
 2 files changed, 86 insertions(+)
 create mode 100644 srcpkgs/stegseek/patches/portable-types.patch
 create mode 100644 srcpkgs/stegseek/template

diff --git a/srcpkgs/stegseek/patches/portable-types.patch b/srcpkgs/stegseek/patches/portable-types.patch
new file mode 100644
index 0000000000000..b68c7480b2f8c
--- /dev/null
+++ b/srcpkgs/stegseek/patches/portable-types.patch
@@ -0,0 +1,74 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4a404f8..9bb968f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2,6 +2,11 @@ cmake_minimum_required(VERSION 3.5)
+ 
+ project(stegseek VERSION 0.6)
+ 
++if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
++  # Update if necessary
++  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long")
++endif()
++
+ add_subdirectory("src")
+ 
+ # Testing only available if this is the main app
+diff --git a/src/Cracker.cc b/src/Cracker.cc
+index 8c5a646..88a2b09 100644
+--- a/src/Cracker.cc
++++ b/src/Cracker.cc
+@@ -189,7 +189,7 @@ bool Cracker::verifyMagic(UWORD32 seed) {
+             short currentBit = (ev >> k) & 1;
+             int bitsSeen = i * bitsPerEmbValue + k;
+             // Add an extra check to make sure we don't touch bit 26, even if bitsPerEmbValue > 1
+-            if (currentBit != ((magic >> bitsSeen) & 1) && bitsSeen < 25) {
++            if (currentBit != (short)((magic >> bitsSeen) & 1) && bitsSeen < 25) {
+                 return false;
+             }
+         }
+diff --git a/src/PasswordCracker.cc b/src/PasswordCracker.cc
+index 58fc3a8..e91ef1a 100644
+--- a/src/PasswordCracker.cc
++++ b/src/PasswordCracker.cc
+@@ -58,7 +58,11 @@ void PasswordCracker::crack() {
+     // Add n worker threads
+     // A part must have at least len 1, otherwise no words will be read when
+     // threads > size
+-    unsigned long part = std::max(wordlistStats.st_size / threads, 1L);
++    unsigned long part = ((unsigned long)wordlistStats.st_size) / threads;
++    if (part <= 0) {
++        part = 1;
++    }
++
+     for (unsigned int i = 0; i < threads; i++) {
+         ThreadPool.push_back(std::thread([this, i, part, metricsEnabled] {
+             consume(i * part, (i + 1) * part, metricsEnabled);
+@@ -138,8 +142,13 @@ void PasswordCracker::consume(unsigned long i, unsigned long stop, bool metricsE
+             batchProgess = 0;
+         }
+ 
++        // Get out current position in the wordlist, make sure it is non-negative, so
++        // we are safe to cast it to unsigned in the next compare.
++        long pos = ftell(pWordList);
++        myassert(pos >= 0);
++
+         // If we've overshot the end of our section (by one word), we can stop
+-        if (ftell(pWordList) > stop) {
++        if ((unsigned long)ftell(pWordList) > stop) {
+             break;
+         }
+     }
+diff --git a/src/SeedCracker.cc b/src/SeedCracker.cc
+index 3308753..36f3c1a 100644
+--- a/src/SeedCracker.cc
++++ b/src/SeedCracker.cc
+@@ -128,7 +128,7 @@ Result SeedCracker::trySeed(UWORD32 seed) {
+             int bitsSeen = i * bitsPerEmbValue + k;
+             // Check magic
+             if (bitsSeen < 25) {
+-                if (((magic >> bitsSeen) & 1) != currentBit) {
++                if ((short)((magic >> bitsSeen) & 1) != currentBit) {
+                     return Result{};
+                 }
+             }
diff --git a/srcpkgs/stegseek/template b/srcpkgs/stegseek/template
new file mode 100644
index 0000000000000..fd78008a08d3a
--- /dev/null
+++ b/srcpkgs/stegseek/template
@@ -0,0 +1,12 @@
+# Template file for 'stegseek'
+pkgname=stegseek
+version=0.6
+revision=1
+build_style=cmake
+makedepends="mhash-devel libmcrypt-devel libjpeg-turbo-devel zlib-devel"
+short_desc="Worlds fastest steghide cracker"
+maintainer="yosh <yosh-git@riseup.net>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/RickdeJager/stegseek"
+distfiles="https://github.com/RickdeJager/stegseek/archive/refs/tags/v${version}.tar.gz"
+checksum=66cdd8e4e4b815d7fe368843e7df2f0416af0304df35e4f22db9f16c7ae6c771

  parent reply	other threads:[~2023-09-10 20:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-09 20:28 [PR PATCH] " yoshiyoshyosh
2023-09-09 20:40 ` yoshiyoshyosh
2023-09-09 20:42 ` yoshiyoshyosh
2023-09-09 20:45 ` yoshiyoshyosh
2023-09-09 20:47 ` yoshiyoshyosh
2023-09-09 20:47 ` yoshiyoshyosh
2023-09-09 21:12 ` yoshiyoshyosh
2023-09-09 21:13 ` yoshiyoshyosh
2023-09-10 15:57 ` yoshiyoshyosh
2023-09-10 18:16 ` yoshiyoshyosh
2023-09-10 20:26 ` yoshiyoshyosh [this message]
2023-12-10  1:48 ` github-actions
2023-12-10  1:53 ` yoshiyoshyosh
2024-03-11  1:44 ` github-actions
2024-03-12  6:25 ` yoshiyoshyosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230910202601.umF10P9DE1kUY-yYVdyBFilscwcofu1FimTLNkbKj4A@z \
    --to=yoshiyoshyosh@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).