shc icon indicating copy to clipboard operation
shc copied to clipboard

Argument list too long: /bin/bash

Open lomalaspina opened this issue 6 years ago • 11 comments

I am getting the warning that call sysconf(_SC_ARG_MAX) returns -1 bytes when ARG_MAX is 4611686018427387903. My script is is 133040 bytes length and its not running.

lomalaspina avatar Oct 11 '18 10:10 lomalaspina

Hey, could you post the output of getconf -a | grep LONG please.

catb0t avatar Nov 20 '18 15:11 catb0t

Hi, I also had a problem with the script size 230790 bytes.

./myscript.bin: Argument list too long: / bin / bash

$ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.6 (stretch) Release: 9.6 Codename: stretch

$ getconf -a | grep LONG LONG_BIT 64 ULONG_MAX 18446744073709551615

What is the reason for this error and how can it be corrected?

CHERTS avatar Jan 17 '19 08:01 CHERTS

Hey, could you post the output of getconf -a | grep LONG please.

Hello there,

Sorry I didn't see you requested, here it is the output:

LONG_BIT 64 ULONG_MAX 18446744073709551615

lomalaspina avatar Jan 18 '19 09:01 lomalaspina

Hi, I have the similar problem.

If I run the shell, its OK. after compile using shc ./shc -r -T -f xxxx.sh

Argument list too long: /bin/ksh

[root@db1 shc-3.8.9b]# getconf -a | grep LONG LONG_BIT 64 ULONG_MAX 18446744073709551615

Any workaround?

ramivis avatar Mar 04 '19 19:03 ramivis

with strace,

execve("/bin/ksh", ["xxxxxxxx"..., "-c", " "..., "xxxxxxxxxx/"...], [/* 27 vars */]) = -1 E2BIG (Argument list too long)

@ramivis

ramivis avatar Mar 04 '19 19:03 ramivis

Hi,

Did anyone get a workaround on this?

shredtmp avatar Jul 19 '19 10:07 shredtmp

Solution is the pending https://github.com/neurobin/shc/issues/51

suntong avatar Jun 20 '20 23:06 suntong

Did this every get resolved ? I have the same issue.

MadTomT avatar Mar 30 '23 08:03 MadTomT

shc have limit size with text that can obfuscate.

willstore69 avatar May 22 '23 11:05 willstore69

I am struggling with this one too. Any help would be much appreciated.

anandslab avatar Nov 13 '23 20:11 anandslab

@htpcBeginner Take a look at my variant which uses pipe instead of command line: https://github.com/liberize/ssc

liberize avatar Jan 17 '24 15:01 liberize