|
I don't have PHP installed, so I converted the function to C# and went from there.
If you want PHP to decode it for you, you'll need to do two things:
- Replace
eval with print on the line that starts eval(T7FC56270E7A70FA81A5935B72EACBE29("... - Remove the statement
if (count($TA5F3C6A11B03839D46AF9FB43C97C188)) exit; from the function.
You'll need that second step, because as far as I can see, the following lines:
$TFF44570ACA8241914870AFBC310CDB85 = __FILE__;
$TFF44570ACA8241914870AFBC310CDB85 = file_get_contents($TFF44570ACA8241914870AFBC310CDB85);
$TA5F3C6A11B03839D46AF9FB43C97C188 = 0;
preg_match(base64_decode("LyhwcmludHxzcHJpbnR8ZWNobykv"), $TFF44570ACA8241914870AFBC310CDB85, $TA5F3C6A11B03839D46AF9FB43C97C188);
are reading the content of the current file and testing it against the regular expression /(print|sprint|echo)/ . If it finds any matches, the if (count(...)) exit; line within the loop will terminate the current script.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks for quick reply. I'm a little confused! How do you convert php code to c# and decode it?
Mahdi 82161021
|
|
|
|
|
By hand.
- Find + replace helps to simplify the variable names so you can see what you're doing;
- Variables have to be declared first, and can't change type part-way through. The only one which seemed to change type was related to the regexp match on the current file contents, which I simply removed;
- You can't write to a string as if it's an array, so I had to replace one of the variables with a
List<char> ; - You can't poke characters into a
List<T> outside of the current range, so I had to add some code to populate the list with spaces when that happened; - Some of the code tries to read characters from out-of-bounds indexes, so I had to add some code to return a space when than happened;
base64_decode(x) ⇒ System.Text.Encoding.Default.GetString(Convert.FromBase64String(x)) ;ord(x) ⇒ Microsoft.VisualBasic.Strings.Asc(x) ;- String concatenation uses
+ instead of . ;
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks a lot Richard. Your replies was very helpful.
Mahdi 82161021
modified 21-Mar-14 12:00pm.
|
|
|
|
|
 It's not the cleanest code, but it works:
static void Main()
{
const string input = @"...";
Console.WriteLine(Decode(input));
}
static string Decode(string input)
{
input = base64_decode(input);
int a = 0;
int b = 0;
int c = 0;
int d = (ord(input[1]) << 8) + ord(input[2]);
int e = 3;
int f = 0;
int g = 16;
int length = input.Length;
var result = new List<char>(length << 2);
for (; e < length; )
{
if (g == 0)
{
d = (ord(input[e++]) << 8);
d += ord(input[e++]);
g = 16;
}
if ((d & 0x8000) != 0)
{
a = (ord(input[e++]) << 4);
a += (ord(input[e]) >> 4);
if (a != 0)
{
b = (ord(input[e++]) & 0x0F) + 3;
for (c = 0; c < b; c++)
Set(result, f+c, Get(result, f-a+c));
f += b;
}
else
{
b = (ord(input[e++]) << 8);
b += ord(input[e++]) + 16;
for (c = 0; c < b; Set(result, f+c++, input[e]));
e++;
f += b;
}
}
else
Set(result, f++, input[e++]);
d <<= 1;
g--;
if (e == length)
{
return new string(result.ToArray());
}
}
return null;
}
static string base64_decode(string value)
{
return System.Text.Encoding.Default.GetString(Convert.FromBase64String(value));
}
static int ord(char c)
{
return Microsoft.VisualBasic.Strings.Asc(c);
}
static T Get<T>(IList<T> list, int index)
{
if (index < 0 || index >= list.Count) return default(T);
return list[index];
}
static void Set<T>(IList<T> list, int index, T value)
{
while (list.Count <= index) list.Add(default(T));
list[index] = value;
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
My company is planning to make a new kind of messaging application and I'm trying to decide what technology to use on the back-end. We're thinking of the client-server model. Where client can be a web-app, native mobile or even a desktop application. As a developer, to me this means that the back-end server better be darn good and stable.
The current proposal is to use PHP. Is this really a good idea? Sure, wordpress proves that you can build really complicated things with PHP, but I'm not working with veterans. The programmers would have at best 1 or 2 years of experience. My concern is on extending the backend when requirements change as well as debugging errors.
For a new team, what technology would be easier to use? Can Java be used for this purpose? Will it be easy to debug? What about .NET ?
-chronodekar
|
|
|
|
|
Stability of your base technologies isn't really a factor. If you're building on top of another framework or library, then you can consider stability and performance. For example a good PHP framework will probably do just as well as out of the box ASP.Net.
I would just pick some technologies that me and my team were familiar with.
If you've got mainly .Net developers, use .Net. Same for if you have mainly Java, PHP, Python, Ruby, JavaScript, etc. developers.
You could pick your target based on things like licensing costs, but unless you've got someone with some server administration know-how you'll probably be better off paying a little bit extra for hosting where your stack is set up for you; in which case your licensing is probably part of your monthly fee.
|
|
|
|
|
Thank you for the reply.
In the end, we decided to go with a hybrid approach. Have the core backend done in Java, while administration and stuff would be in PHP.
-chronodekar
|
|
|
|
|
You can use Socket Tech n Node.js
Node.js is now known as an advance programming for such things
Installing and Beginning Node
Freelance makes perfect | http://codetrash.com
|
|
|
|
|
I have implemented facebook share button functionality in my application using below code. But that is not working in my application. can u provide some suggestion to solve this prob.
Snippet:
http://www.facebook.com/sharer.php?s=100&p[url]" + DomainName + "&p[images][0]=" + ImgUrlValue + "&p[title]=" + ProductDesc + "&p[summary]=" + product summary.
|
|
|
|
|
Shouldn't the link be
https://www.facebook.com/sharer/sharer.php?..........
|
|
|
|
|
smth like this ?
<div class="fb-share-button" data-href="http://codetrash.com/tutorial/nodejs/17/tutorial-install-nodejs-npm-and-express-in-ubuntu-1204" data-type="button_count"></div>
You can attach the required API from facebook. Demo my shared button[^]
Freelance makes perfect | http://codetrash.com
|
|
|
|
|
I used some examples but doesn't work on the computer or movil device.
when i run the proyect (f5) in the proyect this code works but when i go to chrome or explorer directly doesn't work. How can i do.....
This is the code.
one:
Dim player As New System.Media.SoundPlayer
player.SoundLocation = ("c:\sonidos\error.wav")
player.Play()
two:
Dim sp As SoundPlayer
sp = New SoundPlayer(My.Resources._error)
sp.Play()
Thanks a lot.
|
|
|
|
|
You have already posted this question[^] in the ASP.NET forum.
DO NOT post the same question to multiple forums on the same site. It will only annoy the people who would otherwise be trying to help you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
hello... can I render to "js" (Javascript) files as supposed to "cshtml"?
For example,
function GetCategories()
{
var sCategories;
var i;
i = 0;
@foreach (var Category in Categories)
{
if(i>0)
{
sCategories.concat(',');
}
sCategories.concat(Category);
i++;
}
return sCategories;
}
Thanks
|
|
|
|
|
|
It seems to me that they used ideas from parallax web design, however was unable to identify any common library for the implementation. It's maybe some home made...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
I had found a template at bootstraptor.com and it uses a library from HERE.
vbmike
|
|
|
|
|
|
I'm fairly new to Web API's, so this might be nothing....
I have a controller called "JobAssignmentHeaderController" and it has this method:
[HttpGet]
public List<JobAssignmentHeaderEntity> GetJobAssignmentHeaders(GetJobAssignmentHeadersArgs args)
{
return BO.GetJobAssignmentHeaders(args);
}
GetJobAssignmentHeadersArgs is
[DataContract]
[Serializable]
public class GetJobAssignmentHeadersArgs : BindableBase
{
private int _SupervisorId;
[DataMember]
public int SupervisorId
{
get { return _SupervisorId; }
set
{
if (_SupervisorId != value)
{
_SupervisorId = value;
RaisePropertyChanged("SupervisorId");
}
}
}
private DateTime _StartDate;
[DataMember]
public DateTime StartDate
{
get { return _StartDate; }
set
{
if (_StartDate != value)
{
_StartDate = value;
RaisePropertyChanged("StartDate");
}
}
}
private DateTime _EndDate;
[DataMember]
public DateTime EndDate
{
get { return _EndDate; }
set
{
if (_EndDate != value)
{
_EndDate = value;
RaisePropertyChanged("EndDate");
}
}
}
}
My proxy code this:
public List<JobAssignmentHeaderEntity> GetJobAssignmentHeaders(GetJobAssignmentHeadersArgs args)
{
WebAPIExecutor webAPIExecutor = new WebAPIExecutor("/JobAssignmentHeader/GetJobAssignmentHeaders/", Method.GET);
webAPIExecutor.AddParameter(args);
List<JobAssignmentHeaderEntity> results = webAPIExecutor.Execute<List<JobAssignmentHeaderEntity>>();
return results;
}
I'm calling it like this:
GetJobAssignmentHeadersArgs args = new GetJobAssignmentHeadersArgs
{
SupervisorId = SelectedJobSupervisor.Id,
StartDate = StartDateTime,
EndDate = EndDateTime
};
jobAssignmentsMasterList = Engine.APIProxy.GetJobAssignmentHeaders(args);
When I get into the controller, the parameter is null.
I don't really know how to debug this. I could use some help.
Thanks!
If it's not broken, fix it until it is
|
|
|
|
|
how to upload an image and store its path in my sql using php?
|
|
|
|
|
Hereafter use this forum[^] to post php & mysql related questions.
And did you search Google to get answer?
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
yes i am trying .i followed w3schools.but I observed most people save image name in database not the image can you guide me if we will save a image name in database than how will we retrieve those images?
|
|
|
|
|
Two ways.
0) File system - Store image location in database, image in server. Later, load image from server using the path stored in database.
1) Database - Store image as blob in database. Later, load blob as image in page.
Check the advantages & disadvantages of these two ways here. Clickety[^]
Here tons of resources for you
https://www.google.com/search?q=php+save+retrieve+image+database[^]
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
I didn't understood it.
Are you expecting someone to come forward and teach you over this forum (or over the proper forum) about PHP, MySQL and what in-between?
It's unlikely to happen - you are in a site for those who code, not for those who not...Until know you are not!
If you have a task, first learn, than make an attempt, than come to us here - with! your attempt...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|