5:21 PM
-3
Q: ASCII banner not showing up

zachlickstech123Hi I am building a reverse shell program and I am trying to put a ASCII banner on the attacker's side when it connects to the client. I have looked through articles and can not figure out why this isn't working. import socket SERVER_HOST = "0.0.0.0" SERVER_PORT = 11585 BUFFER_SIZE = 1024 * 128 #...

 
Or remove the function definition and just execute its code directly.
 
First, you need to send each line by line. Like this sock.send("__________"\r\n). repeat next line and so on.
@Barmar. No. Send each line by line
 
@toyotaSupra Why? Sockets don't care about lines.
Of course, the banner has to be sent to the socket, not printed locally.
 
@Barmar. Take a look of image ibb.co/QKpLqfV
hello
Why u din't care about socket
It is recommend by RFC 1459
 
I did care about socket. I said "Of course the banner has to be sent to the socket". But it doesn't have to be line by line. You can do sock.send(font)
 
5:22 PM
Did u read rfc?
 
Which RFC?
 
I used mirc color code
 
The question isn't about IRC, it's a reverse shell.
 
Request For Comment
I know
But u have to understandabout socvket
 
But even so. TCP is a stream protocol, it doesn't preserve message boundaries. So how you split the data into multiple send calls is irrelevant.
 
5:25 PM
Did u see socket send like this lashnet.org 372 neetu :- ___ _ _ _ _ ___ _____
 
Yes. So what?
Try doing it in one calls: sock.send(font.encode()) and you should get the same result.
 
T he way it worked
No
Otherwise the other receiver canoot display message
 
Just because it works when you send it line by line doesn't mean the separate calls are required.
 
Actually u have to read rfc1459
 
Do you mean "IRC messages are always lines of characters terminated with a CR-LF
(Carriage Return - Line Feed) pair,"?
 
5:29 PM
How will u know some other receiver doesn't have foont format
YEs
that is correct
 
So you need to do font.replace('\n', '\r\n') to put the correct newlines in the message. But it doesn't have to be split into separate calls to send().
 
Hopefully you understood
yes
 
sock.send(font.replace('\n', '\r\n').encode())
 
socket always used linefeed
 
but it doesn't have to be sent line by line.
The CRLF sequences define the messages, not how you call send()
 
5:31 PM
sock.send(font.replace( message, '\r\n').encode())
 
What is message?
 
You will get garbage message
 
font is the variable holding the greeting message.
 
message like methgod
method
 
There's nothing named message in the code in the question.
 
5:33 PM
def privmsg_channel(self, data: str) -> str:
    try:
        sender, command, channel, *args = data.split(" ")
        _nick = str(sender).split('!')[0].split(':')[1]
        data = ' '.join(args)[1:]
        _data = (f'<{_nick}>{data}')
        self.jc.channel_window('*', _nick, _data)
    except:
        pass
        #_nick = str(sender).split('!')[0].split(':')[1]
        #self.jc.channel_window('*', _nick, _data)
    return data
wait
 
The question isn't about IRC. Why is any of this relevant?
 
def data_arrival(self):
    while self.is_connected and (recv := self.irc_sock.recv(8196)):
        lines = recv.splitlines()
This is what I received from server
 
What does this have to do with the OP's question?
 
OP doesn't know RFC
 
OP isn't doing IRC!
 
5:36 PM
OP could reead RFC
 
Why would he read that RFC when it's not related to what they're doing?
 
It doesn't matter server/ clinent or irc
But u have to read how to send
Actuall, If OP wanted to be server. He will have to do like that
 
If you're talking about the message format, it definitely matters. Every application has its own requirements.
 
He can write mirc font/color, etc
 
Only an IRC client would understand that. They're not using an IRC client. You don't know what you're talking about.
They're not trying to send fonts or colors, just a plain ASCII string.
 
5:40 PM
How will I know what font is he using. He probably will have to create own server/client using standalone
 
Why do you need to know a font. It's just being displayed normally on the terminal, like when you do print("foo")
 
He can write owned font by using pyinstaller that fine with me
 
This font stuff has nothing to do with the question. It's just plain ordinary text.
 
I been doing this for past 30 years
 
And I've been doing it for 40 years.
 
5:42 PM
thank
 
There's nothing about fonts and colors in the question.
I'm out of here.
 
I know