---
name: "sc_attach"
section: "1"
platform: "linux"
package: "scamper"
version: "20211212-1.2+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_attach"
---

# sc\_attach(1)

simple scamper driver.

## NAME

**sc\_attach** – simple scamper driver.

## SYNOPSIS

**sc\_attach** \[**-?dDv**\] \[**-c** *command*\] \[**-i** *infile*\] \[**-o** *outfile*\] \[**-O** *options*\] \[**-p** *\[ip:\]port*\] \[**-P** *priority*\] \[**-R** *unix-domain*\] \[**-U** *unix-domain*\]

## DESCRIPTION

The **sc\_attach** utility provides the ability to connect to a running [scamper(1)](/scamper/1.md) instance, have a set of commands defined in a file be executed, and the output be written into a single file, in warts format. The options are as follows:

- **-**?

  prints a list of command line options and a synopsis of each.

- **-d**

  prints each command sent to [scamper(1)](/scamper/1.md) on stderr.

- **-D**

  causes **sc\_attach** to operate as a daemon.

- **-v**

  prints the current revision of **sc\_attach** and exits.

- **-c** *command*

  specifies the [scamper(1)](/scamper/1.md) command to prepend to each address in the input file.

- **-i** *infile*

  specifies the name of the input file which consists of a sequence of [scamper(1)](/scamper/1.md) commands or addresses (with the -c option), one per line. If '-' is specified, commands are read from stdin.

- **-o** *outfile*

  specifies the name of the output file to be written. The output file will use the warts format. If '-' is specified, output will be sent to stdout.

- **-O** *options*

  allows the behavior of **sc\_attach** to be further tailored. The current choices for this option are:

  - **random:** shuffle the input commands randomly.

  - **impatient:** send commands to scamper without waiting for scamper to ask for them.

- **-p** *\[ip:\]port*

  specifies the IP address and port where a [scamper(1)](/scamper/1.md) is accepting control socket connections. If an IP address is not specified, **sc\_attach** connects to the specified port on the local host.

- **-P** *priority*

  specifies the mixing priority [scamper(1)](/scamper/1.md) should assign to the source.

- **-R** *unix-domain*

  specifies the unix domain socket on the local host where a remote [scamper(1)](/scamper/1.md) instance is accepting commands.

- **-U** *unix-domain*

  specifies the unix domain socket on the local host where a local [scamper(1)](/scamper/1.md) isntance is accepting commands.

## EXAMPLES

Given a set of commands in a file named infile.txt:

```
tbit -M 1280 -u 'http://www.example.com/' 2620:0:2d0:200::10
trace -P udp-paris -M 192.0.2.1
ping -P icmp-echo 192.0.32.10
```

and a [scamper(1)](/scamper/1.md) daemon listening on port 31337, then these commands can be executed using:

sc\_attach -i infile.txt -o outfile.warts -p 31337

Given a set of addresses in a file named infile2.txt:

```
2620:0:2d0:200::10
192.0.2.1
192.0.32.10
```

these addresses can be pinged with **sc\_attach** operating as a daemon with:

sc\_attach -D -c 'ping' -i infile2.txt -o outfile2.warts -p 31337

## SEE ALSO

[scamper(1)](/scamper/1.md), [sc\_wartsdump(1)](/sc_wartsdump/1.md), [sc\_warts2json(1)](/sc_warts2json/1.md)

## AUTHORS

**sc\_attach** was written by Matthew Luckie \<mjl@luckie.org.nz\>.
