long2ip

long2ip Commit Details


Date:2016-04-24 14:20:50 (8 years 7 months ago)
Author:Natalie Adams
Branch:master
Commit:c0c1cf7302ca2a2046a803907cae7b8c80c599d8
Message:initial commit

Changes:

File differences

build.bat
1
2
call "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
cl.exe /clr long2ip.cpp
long2ip.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <iostream>
#include <exception>
#include <string>
using namespace std;
int main(int argc,char *argv[])
{
int oct1, oct2, oct3, oct4;
unsigned int addr;
string nlopt = "";
if (argc == 2)
nlopt = argv[1];
try
{
cin >> addr;
oct4 = addr & 0xFF;
oct3 = ( addr >> 8 ) & 0xFF;
oct2 = ( addr >> 16 ) & 0xFF;
oct1 = ( addr >> 24 ) & 0xFF;
cout << oct1 << "." << oct2 << "." << oct3 << "." << oct4;
if (argc == 2 && nlopt == "-n")
cout << endl;
} catch (exception& e) {
cout << e.what() << endl;
}
return 0;
}
long2ip/DEBIAN/control
1
2
3
4
5
6
7
8
Package: long2ip
Version: 1
Section: base
Priority: optional
Architecture: all
Depends: bash
Maintainer: adamsna@datanethost.net
Description: Converts an long to an IP

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.05222s using 14 queries.