IRC : Command to get the channels that I joined - irc

Is there an IRC command to know the channels that I am currently in?

There is no such command directly.
You could use WHOIS then look for numeric reply RPL_WHOISCHANNELS (numbered 319), splitting the text at spaces to determine your channel list.
See: https://www.rfc-editor.org/rfc/rfc1459#section-4.5.2

Related

Snort: Reporting packet numbers

I am making use of snort to match packets in pcap file against a set of rules. I want to log the results. I looked at the log file produced at var/log/snort but I want to know that which packet numbers corresponding to the original wireshark pcap file have reported matches. Which command will do that?
You can use the test logger. When running from the command line, add the option '-A test'. The alert's output will have the format
(packet_number) (gid) (sid) (rev).
packet_number corresponds to the pcap's packet number. You can use the other three pieces of information to determine the rule which was triggered.

Send Ctrl+Z to serial port via command line

I am trying to send the following to the COM1 serial port via command line using ECHO or similar (I've also tried downloading a small program called serialsend, but I am stuck with how to send the equivalent of CTRL+Z. This is to send a SMS message via a Siemens TC35 GAM module. I am able to do it via Hyperterminal as a test and it works fine, but I cannot figure out how to send the CTRL+Z at the end to confirm the ned of the message.
This is what I have:
AT
AT+CMGF=1
AT+CMSG="+xxxxxxxxxxx"
HELLO
Now, after Hello, which is the message I want to send, I have to send CTRL+Z. But cannot figure out how to do it, I have tried this:
AT
AT+CMGF=1
AT+CMSG="+xxxxxxxxxxx"
HELLO
\x1A
As I read somehwere that this would be the equivalent of doing it, but it hasnt worked.
Can anyone help me with this? I have found solutions, but they are not command line, which is what I need.
I have also tried using this format:
ECHO AT > COM1:
But as I don't know how to send CTRL+Z I don't know if it is working.
I wrote the free command line program SerialSend that you mentioned. Since this question was originally posted, I've added an extra feature that allows arbitrary byte values to be included (in hex format) in the text you're sending via the serial port. For example, to send Ctrl-Z (26 decimal, 0x1A hex), just use the following command:
SerialSend /hex "\x1a"
Port name/number, baudrate, etc can be configured with additional command line arguments. For example,
SerialSend /baudrate 9600 /devnum 2 /hex "\x1a"
For more details, see the SerialSend home page.
Hope that helps!
Ted
Use this:
port.Write(txt_msgbox.Text + char.ConvertFromUtf32(26));
It works :)
type this command Serial.println((char)26); in Arduino code ... one square box will appear on serial monitor. Copy that square and paste in Notepad++. It will be displayed as SUB with black background. wheneever you want to type cntrl+z, just copy this SUB and paste in serial monitor. It works.

Powershell - MS Exchange E-mail Autoresponder

We've currently got an issue where we're receiving a lot of bounced e-mails (from an auto generated e-mail) back from people where a specified e-mail address is not valid (failure notice). I need to identify certain messages in the mailbox and respond automatically to them - as a newbie to Powershell I'm struggling a bit! I think I understand how to check for the occurrence of a string but I don't know how to iterate through an inbox to look at/get a handle on each message in turn and I don't know how to extract the subject or body text in order to analyse the contents and perform a string comparison. I fear this should be easy - but I can't find anything on the web that might do the job - can anyone help?
So just to clarify what you're looking for.
Mailbox A receives a large number of failure notice/bounce messages.
You'ld like your powershell script to search Mailbox A for every instance where the Subject line (or message body) contains "String X" and if there is a match, take some action?
Also, what version of Exchange are you using? You need to be at least on 2007 to use Exchange Command Shell. You'll then want to look over the Command Shell commands that can be run.
Look at the Exchange Message Tracking Log, and Pipe the results from one command you run to the next. Think of it like this...
(Run a command) | (Run another command on the results of the first command) | (Run a last command on the results of the second).
You can view an example on my website at:
http://www.technoctopus.com/?p=223
While not exactly the same, it might get you moving in the right direction.

pexpect parse router output

I've got a couple of pexpect lines to log onto a cisco router, and issue the show arp command. I then exit the router, having stored the data into the variable myARP (myARP=child.before)
When I then try and loop over the object (for lines in myARP: print(lines), the info is displayed 1 character per line
l
i
k
e
t
h
i
s
Apologies as this is probably a very basic question, but why can't I display as it is shown if I issue the command manually? Is it to do with the streaming nature of the telnet connection? How can this be resolved???
OK fixed - due to pexpects handling of line endings (/n/r) I think. Read Noahs usage docs for more info

Pipe multiple tagged messages to program from within mutt

I understand how to pipe the contents of a single message through |. Also I understand how to tag messages in multiple different ways, as described in the help accessible through ?.
What I don't know:
How can you pipe the contents of a list of tagged messages to a program?
Is there a way to pipe a single message to a single program call?
Is there also a way to pipe the concatenated contents of all messages to a single program call?
From the documentation:
pipe-message (default: |)
Asks for an external Unix command and pipes the current or tagged message
(s) to it. The variables $pipe_decode, $pipe_split, $pipe_sep and $wait_key
control the exact behavior of this function.
So, depending on the 3 settings ($pipe_decode, $pipe_split and $pipe_sep), you can accomplish your use cases.
actually, on my mutt (1.10.1), the | pipes ONLY the current message, not all tagged. I tink, thats the same problem the thread starter had