Package Details: shc 4.0.1-1

Git Clone URL: https://aur.archlinux.org/shc.git (read-only)
Package Base: shc
Description: Converts shell script to C source code, and then compiles it. Do NOT use this to encrypt your scripts as it is not meant to be used for that.
Upstream URL: https://github.com/neurobin/shc
Licenses: GPL
Provides: shc
Submitter: None
Maintainer: severach (onefire)
Last Packager: severach
Votes: 27
Popularity: 0.000156
First Submitted: 2005-07-05 00:13
Last Updated: 2018-11-24 18:59

Dependencies (0)

Required by (1)

Sources (2)

Latest Comments

1 2 Next › Last »

severach commented on 2016-09-27 20:50

We know it's not your glibc because my generated executable links to your glibc and works. The solution comes in two steps. First work with your compiler until you can compile the generated C source into a working executable. gcc -s -o pub.sh.x pub.sh.x.c
Once you have that working your compiler should be able to produce a working shc package.
% pacman -Qs gcc-multilib
local/gcc-multilib 6.2.1-1 (multilib-devel)
The compiler version shouldn't be a problem. There were no complaints when gcc53 was the latest.

sacarde commented on 2016-09-27 18:49

I receive your files

1) your bin pub.sh.x works OK
2) I installed your shc pkg.tar.gz
3) using your pub.sh
I build it in my system (shc -f pub.sh)

- your and my pub.sh.x.c are equal
- but my pub.sh.x not works (cpu 100%)



p.s.
I have: glibc-2.24-2 lib32-glibc-2.24-2

sacarde commented on 2016-09-27 09:22

I uncommenti line in PKGBUILD only:

patch -p0 -c < '../disableencryption.diff'

and rebuild shc




p.s.
can you share your shc-3.9.3-1-any.pkg.tar.xz ?

severach commented on 2016-09-27 09:13

Your link has the same file as before.

sacarde commented on 2016-09-27 08:58

I build shc enabling patch,

http://digilander.libero.it/sacarde/np/PKGBUILD

and this is result:

http://digilander.libero.it/sacarde/np/pub.sh.x.c




p.s.
which version of gcc are you using?

sacarde commented on 2016-09-26 07:07

I use:
- gcc-libs-multilib 5.3.0-3
- gcc-multilib 5.3.0-3
- lib32-gcc-libs 5.3.0-3

with:
http://digilander.libero.it/sacarde/np/makepkg.conf


p.s.
I will try build with:
patch -p0 -c < '../disableencryption.diff'




thanks

severach commented on 2016-09-25 20:13

When I compile your generated source file it prints garbage instead of locking up. My generated source works correctly whether shc compiles it or I compile it manually. This tells me that your shc is producing a bad source file and your gcc is compiling it wrong.
For me shc works on 3 x64 systems and one i686 system. Something on your system is causing the problem. I suspect an errant CFLAGS in your .bashrc. To help debug this I've added a patch which disables the layout randomization, the arc4 encryption, and shows the C source in some text instead of all octal. This makes the generated source readable and comparable between your system and mine.
You might be able to figure out the problem just by looking at the unencrypted generated source. If not you can send me an unencrypted generated source and I can compare with mine.
The patch is disabled. You need to enable it in PKGBUILD.

sacarde commented on 2016-09-24 18:29

I create pub.sh

#!/bin/sh
echo "Hello World"

I build it with: shc -f pub.sh

I have binary: pub.sh.x
but if I run it nothing appear, and cpu 100%

are these:
http://digilander.libero.it/sacarde/np/pub.sh.x.c
http://digilander.libero.it/sacarde/np/pub.sh.x

severach commented on 2016-09-24 16:33

I just compiled and run a shell script with a single echo in it. Can you work your shell script down to a simple test case and submit upstream?

sacarde commented on 2016-09-24 15:55

hi,
using this version, after run binary, I dont view anythings... and CPU is 100%

- I try build 3.8.9b from:
http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9b.tgz

and this works OK


thanks