Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Finding My Public IP


techb's Avatar
Member
0 0

I want to find my public ip address with out going to whatsmyip.com My problem is; at work we have a computer in the back, internet access is blocked. It however doesn't block telnet or irc servers running on port 6667. I want to transfer files via irc to the work computer from the bot running on mine. MP3's and whatnot. One of the DCC commands argument is my public ip.

Is there a way to find it in the cmd? ipconfig gives me the privet ip for the network, but not the public.


Twinkee's Avatar
Member
0 0

MoshBat wrote:

Also, if it's a local network, wouldn't the local IP suffice? No experience here, just guessing

That's what I would think too. Idk anything about IRC, however.


ghost's Avatar
0 0

techb wrote: One of the DCC commands argument is my public ip.

DCC also takes an IRC nick as a parameter, is there a reason you can't simply have the bot do:

DCC SEND <yournick> /path/to/music.mp3

techb's Avatar
Member
0 0

I've tried with no success, I think I'm sending the command wrong or something.

irc.send("PRIVMSG #BotRoom :DCC SEND techb C:\Users\owner\Desktop\Insane\music.mp3")```

Is that wrong?
[This](http://irc.deware.com/common/irc/ctcpdcc.html) is what told me I need the ip address. 

spyware's Avatar
Banned
0 0

techb wrote: I've tried with no success, I think I'm sending the command wrong or something.

irc.send("PRIVMSG #BotRoom :DCC SEND techb C:\Users\owner\Desktop\Insane\music.mp3")```

Is that wrong?
[This](http://irc.deware.com/common/irc/ctcpdcc.html) is what told me I need the ip address. 

Try backward slashes.

techb's Avatar
Member
0 0

Still nothing. markup"PRIVMSG #BotRoom :DCC SEND techb C:/Users/owner/Desktop/Insane/music.mp3"


ghost's Avatar
0 0

"PRIVMSG #BotRoom :DCC SEND techb C:/Users/owner/Desktop/Insane/music.mp3"

I may be wrong/being pedantic here, but I think there's supposed to be a space between the colon(:) and DCC

Corrected to be:

"PRIVMSG #BotRoom : DCC SEND techb C:/Users/owner/Desktop/Insane/music.mp3"

stealth-'s Avatar
Ninja Extreme
0 0

I'm assuming you've done the necessary port forwarding/firewall port opening, right?


techb's Avatar
Member
0 0

There shouldn't be any port forwarding issues. The DCC command in something like mIRC worked, I just can't seem to command right or something.

And I tried it with a space between ':' and 'DCC SEND' still nothing…

I did notice I needed the '\r\n' after the command, I felt stupid lol.


ghost's Avatar
0 0

Out of curiosity, why are you appending # to the nick you want to DCC to? I haven't seen that format before and it doesn't really fit with the way the rest of the protocol. '#' is used to denote a channelname


techb's Avatar
Member
0 0

Like you said, the channel name. techb is the nickname I'm sending the file to. Its after the DCC SEND command.

Or should I send it to the person as a "privet chat";

irc.send("PRIVMSG techb : DCC SEND path\to\file")```

?

ghost's Avatar
0 0

DCC is meant to transfer files between users, not to entire channels (afaik.) I'd say give it a try directed at a user, rather than a channel.


stealth-'s Avatar
Ninja Extreme
0 0

CTCP (Client to Client Protocol) requests, which DCC generally relies on, require a ^A (\001) character surrounding the request. Maybe try that?

Example: markupirc.send("PRIVMSG #techb :\001DCC SEND path\to\file\001\r\n")


stealth-'s Avatar
Ninja Extreme
0 0

Alrighty, nevermind, I know what's going on. I actually looked up the code from my old IRC bot and the DCC requests are actually a lot more complicated than they seem.

markupPRIVMSG stealth- :\x01DCC SEND Filename LongIP Port filesize SomeIncrementingNumber\x01

LongIP - Your IP in long format Port - Duh Filesize - In bytes SomeIncrementingNumber - I have not the slightest clue what I was doing when I coded this, but it's a number starting at 100 that increments with every new connection

Unfortunately, I pretty much gave up mid-way through coding the DCC feature, as I really was only doing it for the fun of it (it wasn't related to the bots real purpose), so I don't really know a whole lot, but enough to say that if you have port 6667 access, just port forward that port at home and manually send everything over sockets. If you can get a IRC client at your office, I'm sure you can get a small python script.

I hope this helped, somehow >.>


techb's Avatar
Member
0 0

It was a nice idea; but like you it was for a side project and is loosing my interest real fast.

I decided to go a different route with my IRC bot. It is something that has never been done before. I will post a write up on what I did after I document everything.

I work at Sub Way btw lol. My office is a prep table. Like I said before, they have the computer in the backed locked down. I forgot the name of the program, but I found the MD5 hashes for the firewalls login info; haven't gotten around to cracking them yet. Anyway…. Thanks for trying to help out.

@Mosh: Irrelevant == Interesting.


stealth-'s Avatar
Ninja Extreme
0 0

No problem man. I'll look forward to this new app, it sounds interesting :)


techb's Avatar
Member
0 0

And here is the link to the write up. The video is best viewed full screen to see whats going on.


stealth-'s Avatar
Ninja Extreme
0 0

LOL :D

That's a sweet idea. It's well documented and looks simple enough for beginners, too (unlike a lot of the writeups for hardware hacks out there).

Nicely done