Click here to Skip to main content
16,005,090 members
Home / Discussions / Work Issues
   

Work Issues

 
Generalgetcontext implementation Pin
kokabgujjar19-Jul-04 23:14
kokabgujjar19-Jul-04 23:14 
GeneralRe: getcontext implementation Pin
RB@Emphasys10-Aug-04 9:36
RB@Emphasys10-Aug-04 9:36 
GeneralRe: getcontext implementation Pin
kokabgujjar11-Aug-04 21:14
kokabgujjar11-Aug-04 21:14 
GeneralRe: getcontext implementation Pin
RB@Emphasys16-Aug-04 2:54
RB@Emphasys16-Aug-04 2:54 
QuestionHow we print registers Pin
kokabgujjar19-Jul-04 23:09
kokabgujjar19-Jul-04 23:09 
GeneralReading Data from one Jar from another jar file Pin
Nalamati8-Jul-04 22:15
Nalamati8-Jul-04 22:15 
GeneralRe: Reading Data from one Jar from another jar file Pin
RB@Emphasys10-Aug-04 9:39
RB@Emphasys10-Aug-04 9:39 
GeneralWorking with Rexec Pin
sivart14448-Jul-04 13:03
susssivart14448-Jul-04 13:03 
hi,
I'm working with Rexec in visual C++. I don't know any C++ so the going is slow. My task was to change the service, edit security so only certain ip's could remote execute. I succeded but, it only works in the debug mode used when -d is passed instead of -i and then allowing it to interact with the desktop. So when running as a Service it no longer does anything. I open a file and read data from it for the security addition and i'm wondering if that is the reason it doesn't work. can services do file manipulation? Any help is much appreciated, advice also welcomed because i'm a newb.

here is the code i added, it shouldn't have an affect anywhere else:
CAsyncSocket SrvSock;
SrvSock.Create(9987);
SrvSock.Listen();
CAsyncSocket CliSock;
// struct sockaddr addr;
struct sockaddr_in from;

//putting all hosts.txt values in an array for faster more effecient check

int count = 0;
int i = 0;
string ip;
string ipArray[MAX_IP];
ifstream openFile("hosts.txt");
while(openFile.peek() != EOF)
{
openFile >> ip;
openFile.ignore(255, '\n');
ipArray[count] = ip;
count++;
}
printf("array initialized with %d values\n", count);
openFile.close();



int nSize = sizeof(SOCKADDR);
// Loop to maintain the search while the application is running.
while (!m_pStop->Lock(0))
{
// Check to see if a connection is being attempted.
if(SrvSock.Accept(CliSock, (struct sockaddr*)&from, &nSize))
{


printf("Remote Address %s \n", inet_ntoa(from.sin_addr));//andrew: to print ip


SOCKET hSock = CliSock.m_hSocket;
CliSock.Detach();


while(ip != "")
{
ip = ipArray[i];


if(inet_ntoa(from.sin_addr) == ip) //.compare(ip) == 0)
{
printf("MATCH Verified\nACCESS GRANTED!\n\n");
//Let a seperate thread handle the individual connections:
AfxBeginThread(ProcConnectionFunc, (LPVOID)hSock);
i = 0;
break;
}
if(ipArray[i+1] == "")
{
printf("Verification Failed\nACCESS DENIED!\n");
ip = "";
i = 0;
}
i++;
}
ip = " ";

// openFile.close();
}
Sleep(1);
}
// Clean up...
SrvSock.Close();
}
GeneralRe: Working with Rexec Pin
RB@Emphasys10-Aug-04 9:41
RB@Emphasys10-Aug-04 9:41 
GeneralMCAD/MCSD Pin
tanstaafl282-Jul-04 11:56
tanstaafl282-Jul-04 11:56 
GeneralRe: MCAD/MCSD Pin
Steve Maier2-Jul-04 12:22
professionalSteve Maier2-Jul-04 12:22 
GeneralRe: MCAD/MCSD Pin
RB@Emphasys30-Jul-04 8:01
RB@Emphasys30-Jul-04 8:01 
GeneralRe: MCAD/MCSD Pin
Steve Maier30-Jul-04 16:52
professionalSteve Maier30-Jul-04 16:52 
GeneralRe: MCAD/MCSD Pin
RB@Emphasys2-Aug-04 4:57
RB@Emphasys2-Aug-04 4:57 
GeneralRe: MCAD/MCSD Pin
Steve Maier2-Aug-04 6:31
professionalSteve Maier2-Aug-04 6:31 
GeneralRe: MCAD/MCSD Pin
exhaulted2-Aug-04 22:22
exhaulted2-Aug-04 22:22 
GeneralRe: MCAD/MCSD Pin
Steve Maier3-Aug-04 4:28
professionalSteve Maier3-Aug-04 4:28 
GeneralRe: MCAD/MCSD Pin
exhaulted3-Aug-04 5:08
exhaulted3-Aug-04 5:08 
GeneralVC++ 6.0 developer neaded Pin
Irek Zielinski18-Jun-04 8:55
Irek Zielinski18-Jun-04 8:55 
GeneralRe: VC++ 6.0 developer neaded Pin
Mahendran RajaGopal23-Jul-04 0:24
Mahendran RajaGopal23-Jul-04 0:24 
GeneralRe: VC++ 6.0 developer neaded Pin
Mahendran RajaGopal23-Jul-04 0:25
Mahendran RajaGopal23-Jul-04 0:25 
GeneralOutlook question Pin
Tartampion18-Jun-04 3:06
Tartampion18-Jun-04 3:06 
GeneralBlue Tooth Pin
David C. Keith15-Jun-04 17:47
David C. Keith15-Jun-04 17:47 
GeneralRe: Blue Tooth Pin
Roger Stewart17-Jun-04 3:08
professionalRoger Stewart17-Jun-04 3:08 
GeneralRe: Blue Tooth Pin
David C. Keith17-Jun-04 5:52
David C. Keith17-Jun-04 5:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.