Bradford_Dissolvable_Agent.sh dependency problems

You have a problem with Salix? Post here and we'll do what we can to help.
atticuh
Posts: 5
Joined: 17. Mar 2010, 08:46

Bradford_Dissolvable_Agent.sh dependency problems

Post by atticuh »

I'm having serious issues running the script. Apparently, one of the dependencies is lsb_release and the only form of it that I could really find is in .deb. Unfortunately, I have no clue how to build .deb packages on a Slackware based distro. Additionally, I lsb_release comes in .rpm packages; however, I can't find a working link to download the release for x86_64 arch.

Any suggestions? Without running this stupid auth script, I won't be able to use my school's dorm network. 8(
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Bradford_Dissolvable_Agent.sh dependency problems

Post by Shador »

lsb_release seems to be a tool required to obtain information about a distribution. Therefore I'm not quite sure whether it could work on Slackware systems. However, I think it shouldn't be of great importance to the problematic script. Could you possibly upload it somewhere (e.g. http://pastebin.org), so I (and maybe others) could have a look at it. I think it might be possible to avoid calling lsb_release, either by just commenting it out or some cheating. :)
Image
atticuh
Posts: 5
Joined: 17. Mar 2010, 08:46

Re: Bradford_Dissolvable_Agent.sh dependency problems

Post by atticuh »

Actually, I was mistaken. The file is actually a binary file (Bradford_Dissolvable_Agent.bin).

http://pastebin.org/116472
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Bradford_Dissolvable_Agent.sh dependency problems

Post by Shador »

Can you try it like this: http://pastebin.org/116511
BTW, why does the script self-destroy itself? :?
Image
atticuh
Posts: 5
Joined: 17. Mar 2010, 08:46

Re: Bradford_Dissolvable_Agent.sh dependency problems

Post by atticuh »

All it does is connects to the school authentication server and notifies the network admins that my box is free of potential virii as well as the distro version. After it executes itself, it destroys itself, because its no longer necessary.

I'll try running the modified .bin file and I'll let you know of the results.

EDIT: Running the modified binary returned the following::

Code: Select all

root[Download]# ./Bradford_Dissolvable_Agent.bin 

./Bradford_Dissolvable_Agent.bin: line 156: ././Bradford_Dissolvable_Agent.bin.bin: cannot execute binary file
Bradford_Dissolvable_Agent.bin :: 

root[Download]# 
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Bradford_Dissolvable_Agent.sh dependency problems

Post by Shador »

You could try putting something like this into an executable lsb_release file somewhere in your PATH:

Code: Select all

#!/bin/sh

if [ "$1" == "-v" ]; then
  echo "core-3.x-ia32"
fi

echo "Slackware 13.0"
It's admittedly dirty and not what your admins expect, but if they rely on a possibly vulnerable script they cannot control. :mrgreen:

EDIT:
Oh, and use the original binary again.
Image
atticuh
Posts: 5
Joined: 17. Mar 2010, 08:46

Re: Bradford_Dissolvable_Agent.sh dependency problems

Post by atticuh »

Alright.

I created the lsb_release binary and placed it in the PATH found from the Bradford binary /usr/bin.

Now running the original BDA binary returns:

Code: Select all

root[Download]# ./Bradford_Dissolvable_Agent.bin

./Bradford_Dissolvable_Agent.bin: line 78: ././Bradford_Dissolvable_Agent.bin.bin: cannot execute binary file
Bradford_Dissolvable_Agent.bin ::

root[Download]# 
I tried changing the syntax on line 78 of the .bin from:

Code: Select all

   error_message="$("$thedir/./$thefile")"
to:

Code: Select all

   error_message="$("$thedir/$thefile")"
Unfortunately, trying to change the syntax only causes the BDA .bin to keep executing itself until my PC crashes. Any suggestions?
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Bradford_Dissolvable_Agent.sh dependency problems

Post by Shador »

Sorry, then there's something going wrong with your admins script there. Is the binary part still untouched in the file?
Because the script extracts that part writes it to a file, makes that file executable and finally executes it (the failing line).
Image
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: Bradford_Dissolvable_Agent.sh dependency problems

Post by thenktor »

If you open the file in an editor it could mess up the binary part!
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
atticuh
Posts: 5
Joined: 17. Mar 2010, 08:46

Re: Bradford_Dissolvable_Agent.sh dependency problems

Post by atticuh »

thenktor wrote:If you open the file in an editor it could mess up the binary part!
I can download another copy of the binary from the school network.

It looks like the script is failing right here, because the if statement is not passing the requirement and executing the binary portion of the file:

Code: Select all

$lsb_release -v | grep -E "core-(3|4)\..-(ia32|x86_64)" >/dev/null
    if [ $? -eq 0 ]
    then
        SKIP=`awk '/^#__BEGIN_BINARY__/ { print NR +1; exit 0; }' "$0"`
The error from line 78 is due to the temp file not being created which is done by the binary. Any suggestions?

EDIT: Additionally, has anyone built LSB packages on salix os?
Post Reply