Not logged in. · Lost password · Register
Forum: General discussion RSS
Automatic login possible?
mavas #1
Member since Feb 2003 · 24 posts
Group memberships: Members
Show profile · Link to this post
Hey all,

I have two pc's; one one which all the files are which plays the songs,
and one pc to select all the songs on with an internal network.

The main pc is 192.168.0.2
and the Select pc is 192.168.0.3

I have set browseamp to work on port 80.
And i made an guest account called 'gast' with the password 'gast'.

A while ago I was able to make the startpage for internet explorer on the Select pc
http://gast:[email protected]/index2.html
This way I could login automatically.

But that doesn't work anymore!
Does anybody see what I am missing???
Avatar
Azimuth #2
Member since Jan 2003 · 427 posts · Location: Chicago, Illinois - USA
Group memberships: Members
Show profile · Link to this post
That functionality was eliminated in a recent Microsoft patch for security.  :blink:
Go into BA config, then to the security tab, enable ip address management, and add your remote machine's ip address.
Guest_tarwin (Guest) #3
No profile available.
Link to this post
Because using username:[email protected]/ip is a browser only thing is there any other way to send username/password to be passed?

For exmaple, calling browserAmp as a URL from flash?
Avatar
Henry (Administrator) #4
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
If you find an other way to add the userid and the password to the header of the HTTP GET or POST request please let me know.
tarwin #5
Member since Nov 2004 · 3 posts
Group memberships: Members
Show profile · Link to this post
I found out how to do it in Flash ... using the following code:

this.addRequestHeader("Authorization", "Basic QWRtaW46Zm9vYmFy==");

That goblygook is the the usernmae and password sperated by a : base64 encoded. I'll post more when I actually get it working.
tarwin #6
Member since Nov 2004 · 3 posts
Group memberships: Members
Show profile · Link to this post
OK. Here's the code I'm using in flash to talk with BrowseAmp. More to come later. Example program, browseAmp skin etc etc

Also attached is the FLA file. I'm going to be adding heaps to it (including a nice design) over the next few days/weeks, so you can look forward to a better program.

The trick, and the bit of code that took the longest to get right was:
loadNow = function(action){
    l = new LoadVars();

    b64UP = encode(uname+":"+pword);
    hname = "Authorization";
    hvalue = "Basic " + b64UP;
    l.addRequestHeader(hname, hvalue);
   
    url = server+main+action;
    l.sendAndLoad(url, l, "POST");
    l.onLoad = refresh;
}

PS: Anyone with Flash Jester could make it windows tray compatible (hint hint)

Frame 1
stop();

version = "0.1.0";
server = "http://192.168.100.173";
main = "/main.txt?skin=flashAmp&refresh&";

inpPassword.password = true;

btnRandom.onRelease = function(){ login(); }
login = function(){
    uname = inpUsername.text;
    pword = inpPassword.text;
    inpUsername.text = "";
    inpPassword.text = "";
    gotoAndStop(2);
}
Frame 2
stop();

btnRandom.onRelease = function(){ loadNow("addrand&playaddedifnotplaying"); }
btnPrev.onRelease = function(){ loadNow("prev"); }
btnPlay.onRelease = function(){ loadNow("play"); }
btnPause.onRelease = function(){ loadNow("pause"); }
btnStop.onRelease = function(){ loadNow("stop"); }
btnNext.onRelease = function(){ loadNow("next"); }
btnOut.onRelease = function(){
    uName = "";
    pWord = "";
    gotoAndStop(1);
}

refresh = function(){
    txtSong.text = l.fsSongTitle;
    txtTime.text = l.faSongLengthMin+":"+l.faSongLengthSec;
    txtCurrentTime.text
}

loadNow = function(action){
    l = new LoadVars();

    b64UP = encode(uname+":"+pword);
    hname = "Authorization";
    hvalue = "Basic " + b64UP;
    l.addRequestHeader(hname, hvalue);
   
    url = server+main+action;
    l.sendAndLoad(url, l, "POST");
    l.onLoad = refresh;
}

loadNow("refresh");   
setInterval(function(){ loadNow("refresh") }, 1000);

function encode(opString:String):String {
    opString != undefined ? str=opString : str=str;
    var base64s:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    var bits, dual, i:Number = 0, encOut = '';
    while (str.length>=i+3) {
   bits = (str.charCodeAt(i++) & 0xff) << 16 | (str.charCodeAt(i++) & 0xff) << 8 | str.charCodeAt(i++) & 0xff;
   encOut += base64s.charAt((bits & 0x00fc0000) >> 18)+base64s.charAt((bits & 0x0003f000) >> 12)+base64s.charAt((bits & 0x00000fc0) >> 6)+base64s.charAt((bits & 0x0000003f));
    }
    if (str.length-i>0 && str.length-i<3) {
   dual = Boolean(str.length-i-1);
   bits = ((str.charCodeAt(i++) & 0xff) << 16) | (dual ? (str.charCodeAt(i) & 0xff) << 8 : 0);
   encOut += base64s.charAt((bits & 0x00fc0000) >> 18)+base64s.charAt((bits & 0x0003f000) >> 12)+(dual ? base64s.charAt((bits & 0x00000fc0) >> 6) : '=')+'=';
    }
    return encOut;
}
The author has attached one file to this post:
flashamp0.1.fla 56 kBytes
You have no permission to open this file.
This post was edited on 2004-11-16, 11:00 by Unknown user.
Avatar
Henry (Administrator) #7
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Can you please attach a zipped version of the .fla file. The current download is broken.
tarwin #8
Member since Nov 2004 · 3 posts
Group memberships: Members
Show profile · Link to this post
As requested: a zip file.

Includes the .fla, .swf and an .exe if you don't have a player.

This is version 0.1.2. You can now put default settings in the included flashamp.ini file. Things you can change include default server (you can include http:// or not), whether or not to automatically log in (set this if you have put default username and password of if you arn't using user management with browseAmp).

If you use this please tell me in this topic. If you change it / add functionality (I'm going to make it more usefull soon really), then please upload your additions (at least code) to this topic, thanks!

Have fun, and thanks to Henry for such an awesome winamp plugin!
The author has attached one file to this post:
flashAmp0.1.2.zip 539.3 kBytes
You have no permission to open this file.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Page created in 159.6 ms (73.9 ms) · 72 database queries in 58.2 ms
Current time: 2018-02-21, 13:17:11 (UTC +00:00)