[Logo] JCVSForum - Community Support For JCVS Users and Developers
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Issue: empty password  XML
Forum Index » JCVS Developers
Author Message
Anonymous



Issue: Can not connect to sourceforge using empty password
================================================
System out gives:
================================================

Opening server '2401@cvs.sourceforge.net'...
Authenticating 'anonymous@cvs.sourceforge.net'...
Authentication of 'anonymous@cvs.sourceforge.net' failed.
Reason 'cvs [pserver aborted]: descramble: unknown scrambling method'.

================================================
Code:
================================================
import com.ice.cvsc.*;

public class Jcvs_co {
public static final String module = "gaim";
public static final String userName = "anonymous";
public static final String password = "";
public static final String localRoot = "./kalle";
public static final String cvsRoot = "/cvsroot/gaim";
public static final String cvsServer = "cvs.sourceforge.net";

public static void main(String[] a) {
/* SETUP THE CLIENT AND PROJECT AREA */
CVSClient client = new CVSClient(cvsServer, CVSClient.DEFAULT_CVS_PORT);
CVSProject proj = new CVSProject(client);
proj.setUserName(userName);
proj.setPassword(password != "" ? CVSScramble.scramblePassword(password,
'A') : "");
proj.setTempDirectory("/tmp");
proj.setRepository(module);
proj.setRootDirectory(cvsRoot);
proj.setLocalRootDirectory(localRoot);
proj.setPServer(true);
proj.setConnectionMethod(CVSRequest.METHOD_INETD);
proj.setAllowsGzipFileMode(false);
proj.setGzipStreamLevel(0);
proj.establishRootEntry(cvsRoot);
/* SETUP THE PROJECT DEFINITION (USED WHEN RECURSIVELY DESCENDING AND
CREATING LOCAL CVS ADMIN DIRECTORIES AND ENTRIES) */
proj.setProjectDef(new CVSProjectDef(0, true, false, cvsServer,
userName, cvsRoot, module));
/* SETUP THE CVS REQUEST (COMMAND) ACTIONS */
CVSRequest request = new CVSRequest();
request.setPServer(true);
request.setUserName(proj.getUserName());
request.setPassword(proj.getPassword());
request.setConnectionMethod(proj.getConnectionMethod());
request.setServerCommand(proj.getServerCommand());
request.setRshProcess(proj.getRshProcess());
request.setPort(CVSClient.DEFAULT_CVS_PORT);
request.setHostName(cvsServer);
request.setRepository(module);
request.setLocalDirectory(proj.getLocalRootDirectory());
request.setRootDirectory(proj.getRootDirectory());
request.setRootRepository(proj.getRootDirectory());
request.setSetVariables(proj.getSetVariables());
request.setCommand("co");
/* SETUP OTHER REQUEST FLAGS */
request.sendModule = false;
request.sendArguments = true;
request.sendEntries = false;
request.handleUpdated = true;
request.allowOverWrites = true;
request.queueResponse = false;
request.responseHandler = proj;
request.includeNotifies = true;
request.handleEntries = true;
boolean debugprotocol = true;
request.traceRequest = debugprotocol;
request.traceResponse = debugprotocol;
request.traceTCPData = debugprotocol;
request.traceProcessing = debugprotocol;
request.allowGzipFileMode = false;
request.setGzipStreamLevel(0);
/* ADDITIONAL REQUEST INFORMATION */
CVSEntryVector entries = new CVSEntryVector();
request.setEntries(entries);
CVSArgumentVector args = new CVSArgumentVector();
args.appendArgument(module);
request.appendArguments(args);
/* USER INTERFACE FOR STATUS LOGGING */
Jcvs_ui ui = new Jcvs_ui();
request.setUserInterface(ui);
/* PROCESS THE REQUEST AND RESPONSE */
CVSResponse response = client.processCVSRequest(request);
proj.processCVSResponse(request, response);
}
}
[b]
Anonymous



Have you tried changing the code to scramble the empty password?

In other words, change:
proj.setPassword(password != "" ? CVSScramble.scramblePassword(password,
'A') : "");

to:

proj.setPassword( CVSScramble.scramblePassword(password, 'A') );
time


[Avatar]

Joined: 05/06/2004 18:09:23
Messages: 367
Location: Bangkok
Offline

BTW That does seem to work for me.
[Email] [WWW]
 
Forum Index » JCVS Developers
Go to:   
Powered by JForum 2.1.9 © JForum Team