MS Source Server: significance of srcsrv.ini variable - version-control

The MS source server technology uses an initialization file named srcsrv.ini. One of the values identifies the source server location(s), e.g.,
MYSERVER=\\machine\foobar
The docs leave much unanswered about this value. To start with, I haven't been able to find the significance of the value name, i.e., what's on the left side--and I don't see it used anywhere else. Hewardt & Pravat in Advanced Windows Debugging say "The left side ... represents the project name", but that doesn't seem to jibe with MS's "MYSERVER" example.
What is the significance of the left side? Where else is it used? Does the value reference a server or a project, and is there one per server, or one per project?

For anyone looking into this in the future, I received the following information from MS:
The name on the left side is the logical name of a version
control server. The name is also used in the source-indexed symbol files
(pdb). For example, a symbol file may contain this string value: MYSERVER=mymachine1.sys-mygroup.corp.microsoft.com:2003and the source files are referenced like this in pdb: *MYSERVER*/base/myfolder/mycode.cWhen SrcSrv starts, it looks at Srcsrv.ini for values; these values override the information contained in the .pdb file: "MYSERVER=mymachine.sys-mygroup.corp.microsoft.com:1666" overrides
"MYSERVER=mymachine1.sys-mygroup.corp.microsoft.com:2003"This enables users to configure a debugger to use an alternative source control server at debug time. The info is documented at http://msdn.microsoft.com/en-us/library/ms680641.aspx.
So, it is a logical name for a source server, and its value can be changed at debug time to reference a different server than the one originally used when the PDBs were created.

The way the debugger retrieves your source is by srcsrv using some command line utility. The utility program itself and the command line used varies depending on which type of repository hosts your code. One of the issues preventing retrieval is that when that command line program is invoked it fails.
To find out why use the command !sym noisy in WinDBG. It is mostly helpful in diagnosing symbol server issues but for source indexed PDB it also will show the actual command line WinDBG used. Copy the command from the command log window and run it in CMD.EXE to get more details on the failure.

Related

How to set WinDbg cache* local symbol path

This is my WinDbg target launch link.
From
"E:\software\Windows Kits\10\Debuggers\x86\windbg.exe" -y SRV*
E:\symbol*http://msdl.microsoft.com/download/symbols -b -k com:port=//./pipe/com_1,baud=115200,pipe
to
"E:\software\Windows Kits\10\Debuggers\x86\windbg.exe" -y SRV*[cache*]E:\symbol;D:\projects*http://msdl.microsoft.com/download/symbols -b -k com:port=//./pipe/com_1,baud=115200,pipe
My local symbolic address is D:\projects, The local pdb file is always locked.
You are mixing the HTTP server SRV* with the cache cache*. And all in all I wonder why you actually need a cache. It doesn't look like you want one. You may have a larger misunderstanding of how a symbol path works. This answer will not go into all details as well.
Microsoft symbols
Let's begin with the Microsoft symbol server:
SRV*E:\symbol*http://msdl.microsoft.com/download/symbols
srv says that this is a HTTP server.
E:\symbol says where those symbols shall be stored
http://... says where to get the symbols from
the individual parts of that definition are separated by *
Your own symbols
What you probably want is to have your local symbols (PDB files on your disk) available. You do that with just
D:\projects
and nothing else, where D:\projects is a directory which directly contains the PDB files, which is often the case when you build the project locally on your machine.
If your company has a network share, you simply add the network share:
srv to say it's a online resource
C:\netsymbols as your local directory
\\ourserver\symbols for the network share
the individual parts of that definition are separated by * (like before)
If you have a company symbol server via HTTP (like TFS offers), you would use
srv to be a HTTP server.
E:\oursymbols says where those symbols shall be stored (don't put that directory near your source code, e.g. don't use D:\projects, because that likely contains your projects, not symbols)
http://tfs.example.com/myproject for your company's server.
the individual parts of that definition are separated by * (like before)
Combination of different symbol paths
You can combine different symbol paths using ;. You typically want to do that in the order of latency and throughput, i.e.
Your local hard disk (like D:\projects)
Your local network (like srv*C:\netsymbols*\\ourserver\symbols or local HTTP servers)
Internet (like Microsoft HTTP server)
D:\projects;srv*C:\netsymbols*\\ourserver\symbols;srv*E:\oursymbols*http://tfs.example.com/myproject;SRV*E:\symbol*http://msdl.microsoft.com/download/symbols
The cache
Now, the symbol cache is a harder to grasp concept. It is defined by
cache*E:\symbolcache
cache is the indicator that you want a cache
E:\symbolcache is where you want the cache to be on hard disk
the individual parts of that definition are separated by * (like before)
The cache will store everything which is right of it. So typically you put that first, giving
cache*E:\symbolcache;D:\projects;srv*C:\netsymbols*\\ourserver\symbols;srv*E:\oursymbols*http://tfs.example.com/myproject;SRV*E:\symbol*http://msdl.microsoft.com/download/symbols
I never used a cache, because I prefer to have individual locations for the different symbols. The cache may be useful if you don't specify HDD locations for each individual part.
Commands
If you're not sure how to construct a symbol path, take a look at .symfix and .sympath+. These will help you get a correct Microsoft symbol server as well as combine other paths correctly. See this answer for more examples on symbol paths and how they work.

Social Engineering Toolkit Errors

I'm trying to use the Infectious Media Generator to practice some pen-testing with a USB. As I go through the process, after I put the port number I get this:
set:payloads> Port to connect back on [443]:443
[-] Generating fileformat exploit...
[*] Payload creation complete.
[*] All payloads get sent to the /root/.set/template.pdf directory
[!] Something went wrong, printing the error: name 'src' is not defined
I saw something that said to update, however when I run ./seupdate it erases everything about SET and says it needs a directory to specify where it's pulling information from. I initially tried routing to github but that didn't work.
There is also the issue that the user manual specifies using the ./set-update command however I can't find that executable anywhere in my directory.
I also tried running the command on SET's website to install SET but that didn't work either which is why I downloaded the .zip and extracted it. Anyone run into these errors?

error 404 on hitting http://<host>:8080/cs/REST/

I had successfully configured Oracle webcenter on some of my VM.
To access it from my local machine I did some changes in firewell setting.
Then after the home page is not accessible and i get 404 error.
i.e.,
http://:8080/cs/REST/ is not accessible where as some other REST URLs are accessible such as :
http://:8080/cs/REST/types/
http://:8080/cs/REST/sites/
http://:8080/cs/REST/sites/FirstSiteII/
I think something wrong with my asset type configuration. How to resolve?
Any idea would work for me.
You should be looking at log files which can be generated by the content server.
The “View Server Output” menu provides access to the most recent server output logs.
Iirc, you can set different levels of tracing and you should select the option(s) which are relevant to you issue - otherwise the trace log file will generate a huge amount of text - much of it irrelevant to you & making it particularly hard to read.
The log file is timestamped but it would be better served if you have a single-user make a single attempt to land on your URL(s).
Server output also contains tracing output if enabled. Tracing is typically enabled while
debugging errors. If server output is being captured in a file, the file could grow large if tracing options are enabled. Consider disabling all server tracing options (especially if “verbose” option is checked), to keep server output file size in check.
I don't believe that there's anything served at /cs/REST/ - what would you expect to see?

Creating a simple command line interface (CLI) using a python server (TCP sock) and few scripts

I have a Linux box and I want to be able to telnet into it (port 77557) and run few required commands without having to access to the whole Linux box. So, I have a server listening on that port, and echos the entered command on the screen. (for now)
Telnet 192.168.1.100 77557
Trying 192.168.1.100...
Connected to 192.168.1.100.
Escape character is '^]'.
hello<br />
You typed: "hello"<br />
NOW:
I want to create lot of commands that each take some args and have error codes.
Anyone has done this before?
It would be great if I can have the server upon initialization go through each directory
and execute the init.py file and in turn, the init.py file of each command call
into a main template lib API (e.g. RegisterMe()) and register themselves with the server as function call backs.
At least this is how I would do it in C/C++.
But I want the best Pythonic way of doing this.
/cmd/
/cmd/myreboot/
/cmd/myreboot/ini.py (note underscore don't show for some reason)
/cmd/mylist/
/cmd/mylist/init.py
... etc
IN: /cmd/myreboot/__ini__.py:
from myMainCommand import RegisterMe
RegisterMe(name="reboot",args=Arglist, usage="Use this to reboot the box", desc="blabla")
So, repeating this creates a list of commands and when you enter the command in the telnet session, then the server goes through the list, matches the command and passed the args to that command and the command does the job and print the success or failure to stdout.
Thx
I would build this app using combination of cmd2 and RPyC modules.
Twisted's web server does something kinda-sorta like what you're looking to do. The general approach used is to have a loadable python file define an object of a specific name in the loaded module's global namespace. Upon loading the module, the server checks for this object, makes sure that it derives from the proper type (and hence has the needed interface) then uses it to handle the requested URL. In your case, the same approach would probably work pretty well.
Upon seeing a command name, import the module on the fly (check the built-in import function's documentation for how to do this), look for an instance of "command", and then use it to parse your argument list, do the processing, and return the result code.
There likely wouldn't be much need to pre-process the directory on startup though you certainly could do this if you prefer it to on-the-fly loading.

Deploying SQL Anywhere 10 Runtime Engine

I'm trying to deploy the Sybase SQL Anywhere 10 Runtime Engine, but I'm having some problems. When I run my application, I get an error:
SQLSTATE = IM003
Specified driver could not be loaded due to system error 193 (cinema_ConfigurationDriver).
According to my research, this is indicative of a missing DLL. I am looking at documentation on what and how to deploy. That documentation is from the Sybase SyBooks Online site
I have copied the indicated file into my application directory. I have also created the registry entries as indicated with two changes. Instead of calling the driver SQL Anywhere 10.0 I have called it cinema_ConfigurationDriver.
And I did not create the DSN entry; I am using a DSN-less connection in my PowerBuilder 11.5 code.
I know zilch about PowerBuilder, and I have no idea what "cinema" refers to, but I do know that there are no error messages in SQL Anywhere that contain "cinema". However, "Unable to start specified database" is definitely a SQL Anywhere error message. Can you post the full contents of your connection string? (You can either update your question or add a comment to this answer.)
Edit after OP comment:
You don't need to specify the -ga switch, since the client library will add it for you (unless you use the AUTOSTOP=NO connection parameter), and you shouldn't add the -n switch to the START line, since that's what the ENG parameter is for. Neither of these will cause your problem however. The obvious thing to check is that you've specified the correct path to the .db file and that you have permission to modify the file. If that's OK, you could add the LOG=<filename> parameter to the connection string, and then check the contents of that file for more detailed information.